Package org.scictrl.csshell
Interface Response<C extends AbstractConnector<?>>
- Type Parameters:
C- connector implementation
- All Known Implementing Classes:
ResponseImpl
public interface Response<C extends AbstractConnector<?>>
This interface describes a response to a request. A response to request can be for example
a change of value, an error, ...
- Author:
- igor@scictrl.com
-
Method Summary
Modifier and TypeMethodDescriptionConnection<C, ?, ?> Returns the source of the response, same as in associated Request.getError()If result of the request is an error this method will return it.Poop<?, ?> getPoop()Returns the condition of the responseReturnsRequestobject, which initiated this response.getTag()Optional identification tag of the response.booleanisLast()Returnstrueif this is last response in series of responses.booleanReturnstrueif the request was successfully completed.
-
Method Details
-
getRequest
ReturnsRequestobject, which initiated this response.- Returns:
- initial
Request
-
isLast
boolean isLast()Returnstrueif this is last response in series of responses.- Returns:
trueif it is last response
-
isSuccess
boolean isSuccess()Returnstrueif the request was successfully completed.- Returns:
- returns true if response is a success
-
getTag
Object getTag()Optional identification tag of the response. Interpretation depends on asynchronus methods which generated this response.- Returns:
- identification tag.
-
getError
Exception getError()If result of the request is an error this method will return it. Otherwise it will returnnull- Returns:
- error
-
getConnection
Connection<C,?, getConnection()?> Returns the source of the response, same as in associated Request.- Returns:
- response source
-
getPoop
Poop<?,?> getPoop()Returns the condition of the response- Returns:
- response condition
-