Package com.bea.wli.sb.transports
Class CoLocatedMessageContext
java.lang.Object
com.bea.wli.sb.transports.CoLocatedMessageContext
- All Implemented Interfaces:
InboundTransportMessageContext,OutboundTransportMessageContext,TransportMessageContext
public abstract class CoLocatedMessageContext
extends Object
implements InboundTransportMessageContext, OutboundTransportMessageContext
This class needs to be extended by a transport provider that implements
optimization for co-located outbound calls to go through a Java method
invokation instead of transport layer. For an example implementation, see
com.bea.alsb.transports.sock.SocketCoLocatedMessageContext
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose(TransportOptions options) Commits the contents of this context and clean up any resources used by this context.client should not need to read the body of the response on the inbound messagegetURI()voidsend(TransportSendListener listener) voidSets the meta-data for the response part of the message, e.g.voidsetResponsePayload(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 untilInboundTransportMessageContext.close(TransportOptions)is called.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.bea.wli.sb.transports.InboundTransportMessageContext
createResponseMetaData, createResponseMetaData
-
Method Details
-
getURI
- Specified by:
getURIin interfaceTransportMessageContext- Returns:
- the base uri for to which the message was sent for an outbound message or from which the message was sent on an inbound message
-
getEndPoint
- Specified by:
getEndPointin interfaceInboundTransportMessageContext- Returns:
- the service endpoint object which has received this incoming message
-
getMessageId
- Specified by:
getMessageIdin interfaceTransportMessageContext- Returns:
- returns transport provider-specific message identifier. Ideally it should uniquely identify the message among other messages going through the OSB runtime, However, OSB does not depend on the message Id being unique. The message Id will be added to the message context and thus visible in the pipeline.
-
getRequestMetaData
- Specified by:
getRequestMetaDatain interfaceInboundTransportMessageContext- Returns:
- the meta-data for the request part of the message, e.g. headers, etc. Returns null if there is no request meta-data
- Throws:
TransportException
-
getRequestPayload
- Specified by:
getRequestPayloadin interfaceInboundTransportMessageContext- Returns:
- returns a source (e.g. input stream or a DOM object) for reading data in the body of the request of an inbound message or null if there is no body of the request. Note that the entire body of the payload is retrieved.
- Throws:
TransportException
-
getResponseMetaData
- Specified by:
getResponseMetaDatain interfaceOutboundTransportMessageContext- Returns:
- the meta-data for the response part of the message, e.g. headers, etc. Returns null if there is no response meta-data
-
setResponseMetaData
Description copied from interface:InboundTransportMessageContextSets the meta-data for the response part of the message, e.g. headers, etc.- Specified by:
setResponseMetaDatain interfaceInboundTransportMessageContext- Parameters:
rmd- Transport Provider-specific POJO that represents response meta data- Throws:
TransportException
-
getResponsePayload
client should not need to read the body of the response on the inbound message- Specified by:
getResponsePayloadin interfaceOutboundTransportMessageContext- Returns:
- returns a source for reading the body of the response of the outbound message. returns null if there is no response payload
- Throws:
TransportException
-
setResponsePayload
Description copied from interface:InboundTransportMessageContextSets 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 untilInboundTransportMessageContext.close(TransportOptions)is called. Any access of response payload source after close() has been called can lead to unpredictable results and is generally unsafe.- Specified by:
setResponsePayloadin interfaceInboundTransportMessageContext- Parameters:
src- source containing the response payload- Throws:
TransportException
-
send
- Throws:
TransportException
-
close
Description copied from interface:InboundTransportMessageContextCommits the contents of this context and clean up any resources used by this context. Note: Transport provider should NOT access response payload source after this method call has been made.- Specified by:
closein interfaceInboundTransportMessageContext- Parameters:
options- 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
-