Package org.jclouds.compute.domain
Class ExecChannel
- java.lang.Object
-
- org.jclouds.compute.domain.ExecChannel
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class ExecChannel extends Object implements Closeable
A current connection to an exec'd command. Please ensure you callclose()
-
-
Constructor Summary
Constructors Constructor Description ExecChannel(OutputStream input, InputStream output, InputStream error, com.google.common.base.Supplier<Integer> exitStatus, Closeable closer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()closes resources associated with this channel.InputStreamgetError()com.google.common.base.Supplier<Integer>getExitStatus()OutputStreamgetInput()InputStreamgetOutput()
-
-
-
Constructor Detail
-
ExecChannel
public ExecChannel(OutputStream input, InputStream output, InputStream error, com.google.common.base.Supplier<Integer> exitStatus, Closeable closer)
-
-
Method Detail
-
getInput
public OutputStream getInput()
- Returns:
- the command's
stdinstream.
-
getError
public InputStream getError()
- Returns:
- the command's
stderrstream.
-
getOutput
public InputStream getOutput()
- Returns:
- the command's
stdoutstream.
-
getExitStatus
public com.google.common.base.Supplier<Integer> getExitStatus()
- Returns:
- the exit status of the command if it was received, or
nullif this information was not received.
-
close
public void close() throws IOExceptioncloses resources associated with this channel.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
-