public abstract class CoLocatedMessageContext extends Object implements InboundTransportMessageContext, OutboundTransportMessageContext
| Modifier and Type | Method and Description |
|---|---|
void |
close(TransportOptions options)
Commits the contents of this context and clean up any resources used by this context.
|
TransportEndPoint |
getEndPoint() |
String |
getMessageId() |
RequestMetaData |
getRequestMetaData() |
Source |
getRequestPayload() |
ResponseMetaData |
getResponseMetaData() |
Source |
getResponsePayload()
client should not need to read the body of the response on the inbound message
|
URI |
getURI() |
void |
send(TransportSendListener listener) |
void |
setResponseMetaData(ResponseMetaData rmd)
Sets the meta-data for the response part of the message, e.g.
|
void |
setResponsePayload(Source src)
Sets the response payload into the message context Important note: the transport provider is free to access the response payload source from the moment this method call is made up all the way until
InboundTransportMessageContext.close(TransportOptions) is called. |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateResponseMetaData, createResponseMetaDatapublic URI getURI()
getURI in interface TransportMessageContextpublic TransportEndPoint getEndPoint()
getEndPoint in interface InboundTransportMessageContextpublic String getMessageId()
getMessageId in interface TransportMessageContextpublic RequestMetaData getRequestMetaData() throws TransportException
getRequestMetaData in interface InboundTransportMessageContextTransportExceptionpublic Source getRequestPayload() throws TransportException
getRequestPayload in interface InboundTransportMessageContextTransportExceptionpublic ResponseMetaData getResponseMetaData()
getResponseMetaData in interface OutboundTransportMessageContextpublic void setResponseMetaData(ResponseMetaData rmd) throws TransportException
InboundTransportMessageContextsetResponseMetaData in interface InboundTransportMessageContextrmd - Transport Provider-specific POJO that represents response meta dataTransportExceptionpublic Source getResponsePayload() throws TransportException
getResponsePayload in interface OutboundTransportMessageContextTransportExceptionpublic void setResponsePayload(Source src) throws TransportException
InboundTransportMessageContextInboundTransportMessageContext.close(TransportOptions) is called. Any access of response payload source after close() has been called can lead to unpredictable results and is generally unsafe.setResponsePayload in interface InboundTransportMessageContextsrc - source containing the response payloadTransportExceptionpublic void send(TransportSendListener listener) throws TransportException
TransportExceptionpublic void close(TransportOptions options)
InboundTransportMessageContextclose in interface InboundTransportMessageContextoptions - specifies additional run-time parameters with respect to processing of inbound response. E.g. it can signal the mode of a given message: one-way versus request/response