package com.boundary.camel.component.ssh;

import com.boundary.camel.component.common.ServiceInfo;

/**
 * 
 * @author davidg
 *
 */
public class SshxInfo extends ServiceInfo {
	
	private String command;
	private String expectedOutput;

	public SshxInfo() {
		// TODO Auto-generated constructor stub
	}
	
	public String getCommand() {
		return command;
	}

	public String getExpectedOutput() {
		return expectedOutput;
	}

	public void setCommand(String command) {
		this.command = command;
	}
	
	public void setExpectedOutput(String expectedOutput) {
		this.expectedOutput = expectedOutput;
	}

	@Override
	public String toString() {
		return "SsshxInfo [expectedOutput=" + expectedOutput + "]";
	}



}

@@ -1,8 +1,812 @@
+/**%0A * Licensed to the Apache Software Foundation (ASF) under one or more%0A * contributor license agreements.  See the NOTICE file distributed with%0A * this work for additional information regarding copyright ownership.%0A * The ASF licenses this file to You under the Apache License, Version 2.0%0A * (the %22License%22); you may not use this file except in compliance with%0A * the License.  You may obtain a copy of the License at%0A *%0A *      http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A
 package 
@@ -840,16 +840,45 @@
 t.ssh;%0A%0A
+import java.io.InputStream;%0A%0A
 import c
@@ -930,96 +930,585 @@
 o;%0A%0A
-/**%0A * %0A * @author davidg%0A *%0A */%0Apublic class SshxInfo extends ServiceInfo %7B%0A%09%0A%09
+public class SshxResult extends ServiceInfo %7B%0A    %0A    /**%0A     * The value of this header is a %7B@link InputStream%7D with the standard error%0A     * stream of the executable.%0A     */%0A    public static final String STDERR = %22CamelSshStderr%22;%0A%0A    /**%0A     * The value of this header is the exit value that is returned, after the%0A     * execution. By convention a non-zero status exit value indicates abnormal%0A     * termination. %3Cbr%3E%0A     * %3Cb%3ENote that the exit value is OS dependent.%3C/b%3E%0A     */%0A    public static final String EXIT_VALUE = %22CamelSshExitValue%22;%0A    %0A    
 private 
 Stri
@@ -1499,24 +1499,30 @@
     private 
+final 
 String comma
@@ -1529,110 +1529,351 @@
 nd;%0A
-%09private String expectedOutput;%0A%0A%09public SshxInfo() %7B%0A%09%09// TODO Auto-generated constructor stub%0A%09%7D%0A%09%0A%09
+    %0A    private final int exitValue;%0A%0A    private final InputStream stdout;%0A%0A    private final InputStream stderr;%0A    %0A    public SshxResult(String command, int exitValue, InputStream out, InputStream err) %7B%0A        this.command = command;%0A        this.exitValue = exitValue;%0A        this.stdout = out;%0A        this.stderr = err;%0A    %7D%0A%0A    
 publ
@@ -1893,26 +1893,32 @@
 Command() %7B%0A
-%09%09
+        
 return comma
@@ -1925,356 +1925,403 @@
 nd;%0A
-%09%7D%0A%0A%09
+    %7D%0A%0A    
 public 
-Str
 in
-g
+t
  getEx
-pectedOutput() %7B%0A%09%09return expectedOutput;%0A%09%7D%0A%0A%09public void setCommand(String command) %7B%0A%09%09this.command = command;%0A%09%7D%0A%09%0A%09public void setExpectedOut
+itValue() %7B%0A        return exitValue;%0A    %7D%0A%0A    public InputStream getStdout() %7B%0A        return stdout;%0A    %7D%0A%0A    public In
 put
-(
 Str
-ing expectedOutput) %7B%0A%09%09this.expectedOutput = expectedOutput;%0A%09%7D%0A%0A%09@Override%0A%09public String toString() %7B%0A%09%09return %22SsshxInfo %5BexpectedOutput=%22 + expectedOutput + %22%5D%22;%0A%09%7D%0A%0A%0A
+eam getStderr() %7B%0A        return stderr;%0A    %7D%0A    %0A    public String toString() %7B%0A    %09StringBuffer sb = new StringBuffer();%0A    %09sb.append(%22exitValue=%22 + exitValue);%0A    %09sb.append(%22command=%22 + command);%0A    %09return sb.toString();%0A    %7D
 %0A%7D%0A

Use code from Camel distribution for results