public class RemoteInputStreamCommandResponse extends AbstractCommandResponse
| Constructor and Description |
|---|
RemoteInputStreamCommandResponse(Command cmd,
Object results)
Constructor for
RemoteInputStreamCommandResponse that defines a successfully invoked remote stream
method. |
RemoteInputStreamCommandResponse(CommandResponse responseToTransform)
Constructor for
RemoteInputStreamCommandResponse. |
RemoteInputStreamCommandResponse(Command cmd,
Throwable exception)
Constructor for
RemoteInputStreamCommandResponse that defines a failed remote stream invocation. |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getBytesReadFromStream()
Returns the actual bytes that were read off of the stream.
|
getCommand, getException, getResults, isSuccessful, setCommand, setException, setResults, setSuccessful, toStringpublic RemoteInputStreamCommandResponse(Command cmd, Object results)
RemoteInputStreamCommandResponse that defines a successfully invoked remote stream
method. It is expected that when a read() method call has succeeded, this constructor is used with the actual
command that was executed. This is because the command contains the byte array parameter that was used to store
the read bytes. In order to simulate pass-by-reference, the command must be stored in this response so that byte
array can be sent back with the response.cmd - the command that was executed (may be null)results - the results of the InputStream method callpublic RemoteInputStreamCommandResponse(Command cmd, Throwable exception)
RemoteInputStreamCommandResponse that defines a failed remote stream invocation.cmd - the command that was executed (may be null)exception - the exception that describes the failure, if available (may be null)public RemoteInputStreamCommandResponse(CommandResponse responseToTransform)
RemoteInputStreamCommandResponse.public byte[] getBytesReadFromStream()
null if the
command was successful and it executed one of the InputStream read methods that resulted in the read bytes stored
in the byte[] parameter passed to that method.null if the command was not a "read" method invocationCopyright © 2008-2013 Red Hat, Inc.. All Rights Reserved.