org.apache.servicemix.nmr.api.internal
Interface InternalExchange

All Superinterfaces:
Exchange, java.io.Serializable

public interface InternalExchange
extends Exchange

Since:
4.0
Version:
$Revision: $

Method Summary
 java.util.concurrent.Semaphore getConsumerLock(boolean create)
           
 InternalEndpoint getDestination()
          Retrieve the destination endpoint, i.e.
 java.util.concurrent.Semaphore getProviderLock(boolean create)
           
 InternalEndpoint getSource()
          Retrieve the source endpoint.
 void setDestination(InternalEndpoint destination)
          Set the destination endpoint.
 void setRole(Role role)
          Set the role of the exchange.
 void setSource(InternalEndpoint source)
          Set the source endpoint.
 
Methods inherited from interface org.apache.servicemix.nmr.api.Exchange
cancel, copy, copyFrom, display, ensureReReadable, getError, getFault, getFault, getId, getIn, getIn, getMessage, getMessage, getOperation, getOut, getOut, getPattern, getProperties, getProperty, getProperty, getProperty, getRole, getStatus, getTarget, removeProperty, removeProperty, setError, setFault, setIn, setMessage, setOperation, setOut, setProperties, setProperty, setProperty, setStatus, setTarget
 

Method Detail

setRole

void setRole(Role role)
Set the role of the exchange. This method is for internal use and will be called by the Channel when delivering the exchange.

Parameters:
role - the new role

getSource

InternalEndpoint getSource()
Retrieve the source endpoint. I.e. the one that created the exchange. This information will be set by the NMR when the exchange is sent using one of Channel.send(Exchange), Channel.sendSync(Exchange) or Channel.sendSync(Exchange, long)

Returns:
the endpoint that sent the exchange

setSource

void setSource(InternalEndpoint source)
Set the source endpoint. This method should be called by the Channel

Parameters:
source - the source endpoint

getDestination

InternalEndpoint getDestination()
Retrieve the destination endpoint, i.e. the one that receive the exchange. This information will be set by the InternalChannel.deliver(InternalExchange) method, just before calling the listeners and actually delegating to the Endpoint for processing.

Returns:
the destination endpoint

setDestination

void setDestination(InternalEndpoint destination)
Set the destination endpoint. This method should be called by the InternalChannel.deliver(InternalExchange)

Parameters:
destination - the destination endpoint

getConsumerLock

java.util.concurrent.Semaphore getConsumerLock(boolean create)

getProviderLock

java.util.concurrent.Semaphore getProviderLock(boolean create)


Copyright © 2005-2009 The Apache Software Foundation. All Rights Reserved.