public final class VirtualResponse extends Object implements Response
Response.Type| Constructor and Description |
|---|
VirtualResponse() |
VirtualResponse(ResponseStatus status) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
didRead() |
ResponseStatus |
getStatus() |
Response.Type |
getType() |
boolean |
isError() |
void |
read(InputStream in)
Reads itself from the provided
InputStream |
void |
write(OutputStream out)
Writes itself to the provided
OutputStream. |
public VirtualResponse()
public VirtualResponse(ResponseStatus status)
public boolean didRead()
didRead in interface ResponseMessage.read(java.io.InputStream)public ResponseStatus getStatus()
public Response.Type getType()
getType in interface ResponseResponse.Type of this response.public boolean isError()
public void read(InputStream in) throws ClientRuntimeException, ProviderException
MessageInputStreamread in interface Messagein - the steam to read from.ClientRuntimeException - to indicate a system error, potentially network related
and hopefully recoverable. Typically used to wrap and propagate the IO stream's thrown
IOExceptions.ProviderException - to indicate operational error not directly related to the stream,
and should be treated as a bug.public void write(OutputStream out) throws ClientRuntimeException, ProviderException
MessageOutputStream.write in interface Messageout - the stream to write to.ClientRuntimeException - to indicate a system error, potentially network related
and hopefully recoverable. Typically used to wrap and propagate the IO stream's thrown
IOExceptions.ProviderException - to indicate operational error not directly related to the stream,
and should be treated as a bug.Copyright © 2009–2021. All rights reserved.