public abstract class ResponseSupport extends Object implements Response
Response.Type| Modifier and Type | Field and Description |
|---|---|
protected Command |
cmd |
protected boolean |
didRead |
protected boolean |
isError |
protected ResponseStatus |
status |
protected Response.Type |
type |
| Constructor and Description |
|---|
ResponseSupport(Command cmd,
Response.Type type) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
assertResponseRead()
a bit aggressive but to force out the little bugs ..
|
boolean |
didRead() |
protected boolean |
didRead(boolean value)
called by child classes to indicate if & when their read operation has completed
|
ResponseStatus |
getStatus() |
Response.Type |
getType() |
boolean |
isError() |
void |
write(OutputStream out)
Writes itself to the provided
OutputStream. |
protected Response.Type type
protected ResponseStatus status
protected Command cmd
protected boolean didRead
protected boolean isError
public ResponseSupport(Command cmd, Response.Type type)
protected final boolean didRead(boolean value)
protected final void assertResponseRead()
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 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.