Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Service Bus
11g Release 1 (11.1.1.6.3)

E15033-08


com.bea.wli.sb.transports
Class CoLocatedMessageContext

java.lang.Object
  extended by com.bea.wli.sb.transports.CoLocatedMessageContext

All Implemented Interfaces:
InboundTransportMessageContext, OutboundTransportMessageContext, TransportMessageContext

public abstract class CoLocatedMessageContext
extends java.lang.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
 void close(TransportOptions options)
          Commits the contents of this context and clean up any resources used by this context.
 TransportEndPoint getEndPoint()
           
 java.lang.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
 java.net.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.

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Methods inherited from interface com.bea.wli.sb.transports.InboundTransportMessageContext
createResponseMetaData, createResponseMetaData

 

Method Detail

getURI

public java.net.URI getURI()
Specified by:
getURI in interface TransportMessageContext
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

public TransportEndPoint getEndPoint()
Specified by:
getEndPoint in interface InboundTransportMessageContext
Returns:
the service endpoint object which has received this incoming message

getMessageId

public java.lang.String getMessageId()
Specified by:
getMessageId in interface TransportMessageContext
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

public RequestMetaData getRequestMetaData()
                                   throws TransportException
Specified by:
getRequestMetaData in interface InboundTransportMessageContext
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

public Source getRequestPayload()
                         throws TransportException
Specified by:
getRequestPayload in interface InboundTransportMessageContext
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

public ResponseMetaData getResponseMetaData()
Specified by:
getResponseMetaData in interface OutboundTransportMessageContext
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

public void setResponseMetaData(ResponseMetaData rmd)
                         throws TransportException
Description copied from interface: InboundTransportMessageContext
Sets the meta-data for the response part of the message, e.g. headers, etc.
Specified by:
setResponseMetaData in interface InboundTransportMessageContext
Parameters:
rmd - Transport Provider-specific POJO that represents response meta data
Throws:
TransportException

getResponsePayload

public Source getResponsePayload()
                          throws TransportException
client should not need to read the body of the response on the inbound message
Specified by:
getResponsePayload in interface OutboundTransportMessageContext
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

public void setResponsePayload(Source src)
                        throws TransportException
Description copied from interface: InboundTransportMessageContext
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. Any access of response payload source after close() has been called can lead to unpredictable results and is generally unsafe.
Specified by:
setResponsePayload in interface InboundTransportMessageContext
Parameters:
src - source containing the response payload
Throws:
TransportException

send

public void send(TransportSendListener listener)
          throws TransportException
Throws:
TransportException

close

public void close(TransportOptions options)
Description copied from interface: InboundTransportMessageContext
Commits 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:
close in interface InboundTransportMessageContext
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

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Service Bus
11g Release 1 (11.1.1.6.3)

E15033-08


Copyright © 2008, 2012, Oracle. All rights reserved.