Package org.scictrl.csshell
Interface Request<C extends AbstractConnector<?>>
- Type Parameters:
C
- connector implementation
- All Known Implementing Classes:
EPICSConnection.GetRequest
,EPICSConnection.PutRequest
,RequestImpl
An interface which describes a request. A request can have a number of responses. Response
objects implement the
Response
interface.- Author:
- igor@scictrl.com
-
Method Summary
Modifier and TypeMethodDescriptionConnection
<C, ?, ?> Returns the source of the requestReturns the first response to this request.Returns the last arrived response.getTag()
Optional identification tag of the response.boolean
Returns true if there are any responses availableboolean
Returnstrue
if request has been completed.Returns the Iterator for the response storage.Blocks call until last response is received.Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Method Details
-
getTag
Object getTag()Optional identification tag of the response. Interpretation depends on asynchronus methods which generated this response.- Returns:
- identification tag.
-
responses
Returns the Iterator for the response storage.- Returns:
- Response iterator
-
hasResponse
boolean hasResponse()Returns true if there are any responses available- Returns:
- true if response available
-
getConnection
Connection<C,?, getConnection()?> Returns the source of the request- Returns:
- source of the request
-
isCompleted
boolean isCompleted()Returnstrue
if request has been completed.- Returns:
true
if request was completed.
-
getFirstResponse
Returns the first response to this request.- Returns:
- the first response
-
getLastResponse
Returns the last arrived response.- Returns:
- the last response
-
waitUntilDone
Blocks call until last response is received.
NOTE: call from this method is returned after events are dispatched on ResponseListeners.- Returns:
- final value received with done event.
-