1 /**********************************************************************
2 * Copyright (c) 2012, 2013 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
.control
.ui
.views
.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];
37 private String
[] fErrorOutput
= new String
[0];
39 // ------------------------------------------------------------------------
41 // ------------------------------------------------------------------------
47 * The result of the command
49 * The output, as an array of strings
51 * THe error output as an array of strings
53 public CommandResult(int result
, String
[] output
, String
[] errorOutput
) {
56 fOutput
= Arrays
.copyOf(output
, output
.length
);
58 if (errorOutput
!= null) {
59 fErrorOutput
= Arrays
.copyOf(errorOutput
, errorOutput
.length
);
63 // ------------------------------------------------------------------------
65 // ------------------------------------------------------------------------
68 public int getResult() {
73 public void setResult(int result
) {
78 public String
[] getOutput() {
79 return Arrays
.copyOf(fOutput
, fOutput
.length
);
83 public void setOutput(String
[] output
) {
84 fOutput
= new String
[0];
86 fOutput
= Arrays
.copyOf(output
, output
.length
);
91 public String
[] getErrorOutput() {
92 return Arrays
.copyOf(fErrorOutput
, fErrorOutput
.length
);
96 public void setErrorOutput(String
[] output
) {
97 fErrorOutput
= new String
[0];
99 fErrorOutput
= Arrays
.copyOf(output
, output
.length
);
This page took 0.035287 seconds and 5 git commands to generate.