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

This session provides access to a request/response protocol provider. The data and format of the requests and responses are identified through their respective Types. While this session is used for structured conversations, it doesn't preclude the use of byte streams as part of a Request or Response.

A Request is retrieved via getRequest() and data is supplied to its corresponding record. The Request is then sent using sendRequest() along with an interface to be called when the Response arrives. The FSM of the protocol is indicated through the available Request Types that may change from one transaction to another.

While multiple requests may be submitted before receiving a response, the requests may or may not be queued.

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.
MethodgetRequest
Description

Gets a Request for use with sendRequest(). This is not a receive call.

Returnosid.transport.Requesta request
CompliancemandatoryThis method must be implemented.
MethodmakeRequest
Description

Sends a request to the remote transport endpoint and waits for a response.

Parametersosid.transport.Requestrequestthe request
osid.transport.Responseresponsecallback for the response
ErrorsNULL_ARGUMENT request or receiver is null
OPERATION_FAILEDunable to complete request
UNSUPPORTED request is not supported
CompliancemandatoryThis method must be implemented.
MethodsendRequest
Description

Sends data to the remote transport endpoint and sends the response to the callback.

Parametersosid.transport.Requestrequestthe request
osid.transport.MessageReceivercallbackcallback for the response
ErrorsNULL_ARGUMENT request or callback is null
OPERATION_FAILEDunable to complete request
UNSUPPORTED request is not supported
CompliancemandatoryThis method must be implemented.