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 responseReturnsRequest
object, which initiated this response.getTag()
Optional identification tag of the response.boolean
isLast()
Returnstrue
if this is last response in series of responses.boolean
Returnstrue
if the request was successfully completed.
-
Method Details
-
getRequest
ReturnsRequest
object, which initiated this response.- Returns:
- initial
Request
-
isLast
boolean isLast()Returnstrue
if this is last response in series of responses.- Returns:
true
if it is last response
-
isSuccess
boolean isSuccess()Returnstrue
if 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
-