Class: RequestStream

Session.messages. RequestStream

new RequestStream()

Interface which specifies a request stream to receive request notifications.

Methods

onClose()

Called when the request stream is removed, or the session is closed.

onError(error)

Notification of a contextual error related to this stream. This is analogous to an Error being thrown. Situations in which onError is called include being unable to parse the request with the data type the stream was registered with. No further calls will be made to this stream.
Parameters:
Name Type Description
error Error The error

onRequest(path, request, responder)

Called to indicate a request has been received.
Parameters:
Name Type Description
path String The path the request was sent on
request Object The request that was received
responder Session.messages.Responder The responder to dispatch a response back to the requester