public interface OutboundStreamSession extends OsidSession
The outbound stream session is used to send and receive arbitrary data to and from a remote end point. The methods accept and return a data stream. Some protocols may send or receive all data within a single stream while others may use the streams as channels or frames of data.
A stream may be available for reading before all the data as arrived and as such multiple streams may be processed simultaneously.
Modifier and Type | Method and Description |
---|---|
Endpoint |
getEndpoint()
Gets the
Endpoint associated with this session. |
Id |
getEndpointId()
Gets the
Endpoint Id associated with
this session. |
boolean |
hasDataAvailable()
Tests to see if an input stream is available for retrieval.
|
DataInputStream |
receiveData()
Receives data from the remote transport endpoint.
|
DataOutputStream |
sendData()
Sends data to the remote transport endpoint.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getEndpointId()
Endpoint
Id
associated with
this session. Endpoint
Id
associated with
this sessionmandatory
- This method must be implemented. Endpoint getEndpoint() throws OperationFailedException, PermissionDeniedException
Endpoint
associated with this session. Endpoint
associated with this sessionOperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DataOutputStream sendData() throws OperationFailedException
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. boolean hasDataAvailable()
true
if a stream is available for reading,
false
otherwisemandatory
- This method must be implemented. DataInputStream receiveData() throws OperationFailedException
IllegalStateException
- hasDataAvailable()
is false
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented.