Class ServerResponseContext
java.lang.Object
no.mnemonic.messaging.requestsink.jms.context.ServerResponseContext
- All Implemented Interfaces:
ServerContext
,RequestContext
The server response context is the context object sent to the server side RequestSink along with the signal received from the client.
It will encode all responses into JMS messages and submit back to client.
When RequestSink closes stream or notifies an exception, this will also be notified to the client.
Multiple responses will be encoded as multiple messages, creating a response stream back to the client. When channel is closed, responses will be ignored.
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
abort()
Request that this context is aborted.void
Acknowledgement from client that a response has been processed at the clientvoid
addListener
(RequestListener listener) boolean
addResponse
(Message msg) Deprecated.boolean
addResponse
(Message msg, ResponseListener responseListener) builder()
void
void
Method to implementServerChannelUploadContext.UploadHandler
boolean
isClosed()
boolean
keepAlive
(long until) void
void
void
removeListener
(RequestListener listener)
-
Method Details
-
handle
Method to implementServerChannelUploadContext.UploadHandler
-
keepAlive
public boolean keepAlive(long until) - Specified by:
keepAlive
in interfaceRequestContext
-
addResponse
Deprecated.- Specified by:
addResponse
in interfaceRequestContext
-
addResponse
- Specified by:
addResponse
in interfaceRequestContext
-
abort
public void abort()Description copied from interface:ServerContext
Request that this context is aborted. No more responses should be allowed Ongoing execution should be interrupted.- Specified by:
abort
in interfaceServerContext
-
isClosed
public boolean isClosed()- Specified by:
isClosed
in interfaceRequestContext
- Specified by:
isClosed
in interfaceServerContext
- Returns:
- true if this context has been closed
-
notifyClose
public void notifyClose()- Specified by:
notifyClose
in interfaceRequestContext
-
notifyError
- Specified by:
notifyError
in interfaceRequestContext
-
endOfStream
public void endOfStream()- Specified by:
endOfStream
in interfaceRequestContext
-
addListener
- Specified by:
addListener
in interfaceRequestContext
-
removeListener
- Specified by:
removeListener
in interfaceRequestContext
-
acknowledgeResponse
public void acknowledgeResponse()Description copied from interface:ServerContext
Acknowledgement from client that a response has been processed at the client- Specified by:
acknowledgeResponse
in interfaceServerContext
-
builder
-