1 /**********************************************************************
2 * Copyright (c) 2012 Ericsson
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * Bernd Hufmann - Initial API and implementation
11 **********************************************************************/
12 package org
.eclipse
.linuxtools
.internal
.lttng2
.ui
.views
.control
.remote
;
14 import java
.util
.Arrays
;
18 * Class containing command result of remote command execution.
21 * @author Bernd Hufmann
23 public class CommandResult
implements ICommandResult
{
25 // ------------------------------------------------------------------------
27 // ------------------------------------------------------------------------
29 * The result of the command. 0 if successful else > 0
34 * The output as String array.
36 private String
[] fOutput
= new String
[0];
38 // ------------------------------------------------------------------------
40 // ------------------------------------------------------------------------
46 * The result of the command
48 * The output, as an array of strings
50 public CommandResult(int result
, String
[] output
) {
53 fOutput
= Arrays
.copyOf(output
, output
.length
);
57 // ------------------------------------------------------------------------
59 // ------------------------------------------------------------------------
62 * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.service.ICommandResult#getResult()
65 public int getResult() {
71 * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.service.ICommandResult#setResult(int)
74 public void setResult(int result
) {
80 * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.service.ICommandResult#getOutput()
83 public String
[] getOutput() {
84 return Arrays
.copyOf(fOutput
, fOutput
.length
);
89 * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.service.ICommandResult#setOutput(java.lang.String[])
92 public void setOutput(String
[] output
) {
93 fOutput
= new String
[0];
95 fOutput
= Arrays
.copyOf(output
, output
.length
);
This page took 0.034544 seconds and 6 git commands to generate.