OSID Logo
OSID Specifications
transport package
Version 3.0.0
Release Candidate Preview
Interfaceosid.transport.OutboundStreamSession
Implementsosid.OsidSession
Description

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.

MethodgetEndpointId
Description

Gets the Endpoint Id associated with this session.

Returnosid.id.Idthe Endpoint Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetEndpoint
Description

Gets the Endpoint associated with this session.

Returnosid.transport.Endpointthe Endpoint associated with this session
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodsendData
Description

Sends data to the remote transport endpoint.

Returnosid.transport.DataOutputStreamthe output stream in which to send data
ErrorsOPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodhasDataAvailable
Description

Tests to see if an input stream is available for retrieval.

Returnboolean true if a stream is available for reading, false otherwise
CompliancemandatoryThis method must be implemented.
MethodreceiveData
Description

Receives data from the remote transport endpoint.

Returnosid.transport.DataInputStreamthe input stream containing the received data
ErrorsILLEGAL_STATE hasDataAvailable() is false
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.