org.apache.cxf.transport
Class AbstractDestination

java.lang.Object
  extended by org.apache.cxf.transport.AbstractObservable
      extended by org.apache.cxf.transport.AbstractDestination
All Implemented Interfaces:
Destination, Observable
Direct Known Subclasses:
AbstractMultiplexDestination, JBIDestination, LocalDestination

public abstract class AbstractDestination
extends AbstractObservable
implements Destination

Abstract base class factoring out common Destination logic, allowing non-decoupled transports to be written without any regard for the decoupled back-channel or partial response logic.


Nested Class Summary
protected  class AbstractDestination.AbstractBackChannelConduit
          Backchannel conduit.
 
Field Summary
protected  Bus bus
           
protected  EndpointInfo endpointInfo
           
protected  org.apache.cxf.ws.addressing.EndpointReferenceType reference
           
 
Fields inherited from class org.apache.cxf.transport.AbstractObservable
incomingObserver
 
Constructor Summary
AbstractDestination(Bus b, org.apache.cxf.ws.addressing.EndpointReferenceType ref, EndpointInfo ei)
           
AbstractDestination(org.apache.cxf.ws.addressing.EndpointReferenceType ref, EndpointInfo ei)
           
 
Method Summary
 org.apache.cxf.ws.addressing.EndpointReferenceType getAddress()
           
 Conduit getBackChannel(Message inMessage, Message partialResponse, org.apache.cxf.ws.addressing.EndpointReferenceType address)
          Retreive a back-channel Conduit, which must be policy-compatible with the current Message and associated Destination.
protected  ConduitInitiator getConduitInitiator()
           
protected abstract  Conduit getInbuiltBackChannel(Message inMessage)
           
protected  boolean markPartialResponse(Message partialResponse, org.apache.cxf.ws.addressing.EndpointReferenceType decoupledTarget)
          Mark message as a partial message.
 void shutdown()
          Shutdown the Destination, i.e.
 
Methods inherited from class org.apache.cxf.transport.AbstractObservable
activate, deactivate, getLogger, getMessageObserver, getTargetReference, getTargetReference, setMessageObserver
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.cxf.transport.Destination
getMessageObserver
 
Methods inherited from interface org.apache.cxf.transport.Observable
setMessageObserver
 

Field Detail

reference

protected final org.apache.cxf.ws.addressing.EndpointReferenceType reference

endpointInfo

protected final EndpointInfo endpointInfo

bus

protected final Bus bus
Constructor Detail

AbstractDestination

public AbstractDestination(org.apache.cxf.ws.addressing.EndpointReferenceType ref,
                           EndpointInfo ei)

AbstractDestination

public AbstractDestination(Bus b,
                           org.apache.cxf.ws.addressing.EndpointReferenceType ref,
                           EndpointInfo ei)
Method Detail

getAddress

public org.apache.cxf.ws.addressing.EndpointReferenceType getAddress()
Specified by:
getAddress in interface Destination
Returns:
the reference associated with this Destination

getBackChannel

public Conduit getBackChannel(Message inMessage,
                              Message partialResponse,
                              org.apache.cxf.ws.addressing.EndpointReferenceType address)
                       throws java.io.IOException
Retreive a back-channel Conduit, which must be policy-compatible with the current Message and associated Destination. For example compatible Quality of Protection must be asserted on the back-channel. This would generally only be an issue if the back-channel is decoupled.

Specified by:
getBackChannel in interface Destination
Parameters:
inMessage - the current inbound message (null to indicate a disassociated back-channel)
partialResponse - in the decoupled case, this is expected to be the outbound Message to be sent over the in-built back-channel.
address - the backchannel address (null to indicate anonymous)
Returns:
a suitable Conduit
Throws:
java.io.IOException

shutdown

public void shutdown()
Shutdown the Destination, i.e. stop accepting incoming messages.

Specified by:
shutdown in interface Destination

markPartialResponse

protected boolean markPartialResponse(Message partialResponse,
                                      org.apache.cxf.ws.addressing.EndpointReferenceType decoupledTarget)
Mark message as a partial message. Only required if decoupled mode is supported.

Parameters:
partialResponse - the partial response message
the - decoupled target
Returns:
true iff partial responses are supported

getConduitInitiator

protected ConduitInitiator getConduitInitiator()
Returns:
the associated conduit initiator, or null if decoupled mode not supported.

getInbuiltBackChannel

protected abstract Conduit getInbuiltBackChannel(Message inMessage)
Parameters:
inMessage - the incoming message
Returns:
the inbuilt backchannel


Apache CXF