org.ow2.petals.jbi.messaging.routing
Interface RouterService

All Known Implementing Classes:
RouterServiceImpl

public interface RouterService

Routes messages from the DeliveryChannel to their destinations. Perform an address resolution, finding the endpoint(s) satisfying the destination information, and select the appropriate transporter to convey the messages. Resolutions are based on defined rules. Routes messages pushed from the Transporter to the target DeliveryChannel

Author:
Adrien LOUIS - EBM WebSourcing, rnaudin - EBM WebSourcing, chamerling - EBM WebSourcing

Field Summary
static java.lang.String DEFAULT_PLATFORM_STRATEGY
           
static java.lang.String DEFAULT_POLICY
          The default QOS policy.
static java.lang.String DEFAULT_STANDALONE_STRATEGY
           
static java.lang.String FAST_POLICY
          Constant used to specify the fast policy.
static java.lang.String PROPERTY_ROUTER_CONSUMER_NOACK
          The message exchange properties to set the NOACK feature.
static java.lang.String PROPERTY_ROUTER_PROVIDER_LINKTYPE
          The message exchange property name to set the provider link type to resolve.
static java.lang.String PROPERTY_ROUTER_PROVIDER_NOACK
           
static java.lang.String PROPERTY_ROUTER_QOS
          Constant used to specify the property name to set the router policy.
static java.lang.String PROPERTY_ROUTER_SEND_ATTEMPT
          Constant used to specify the property name to set the router send attempt.
static java.lang.String PROPERTY_ROUTER_SEND_DELAY
          Constant used to specify the property name to set the delay between router send attempts.
static java.lang.String PROPERTY_ROUTER_TIMETOLIVE
          The message exchange property to set the TTL of the exchange.
static java.lang.String RELIABLE_POLICY
          Constant used to specify the reliable policy.
static java.lang.String SECURE_POLICY
          Constant used to specify the secure policy.
 
Method Summary
 void addComponent(ComponentContext componentContext)
          Inform that a component is installing.
 void modifiedSALifeCycle(java.util.List<ServiceUnitLifeCycle> serviceUnitLifes)
          Inform that a SA life-cycle has changed its state.
 org.ow2.petals.jbi.messaging.exchange.MessageExchangeWrapper receive(ComponentContext componentContext, long timeoutMS)
          Ask to receive a message from MNR and return it.
 void removeComponent(ComponentContext componentContext)
          Inform that a component is uninstalling.
 void send(ComponentContext componentContext, org.ow2.petals.jbi.messaging.exchange.MessageExchangeWrapper exchangeDecorator)
          Send the message into the NMR.
 void sendSync(ComponentContext componentContext, org.ow2.petals.jbi.messaging.exchange.MessageExchangeWrapper exchangeDecorator, long timeout)
          Send the message synchronously into the NMR.
 void stopTraffic()
          Prepare the stopping of the component.
 

Field Detail

PROPERTY_ROUTER_TIMETOLIVE

static final java.lang.String PROPERTY_ROUTER_TIMETOLIVE
The message exchange property to set the TTL of the exchange.

See Also:
Constant Field Values

PROPERTY_ROUTER_CONSUMER_NOACK

static final java.lang.String PROPERTY_ROUTER_CONSUMER_NOACK
The message exchange properties to set the NOACK feature.

See Also:
Constant Field Values

PROPERTY_ROUTER_PROVIDER_NOACK

static final java.lang.String PROPERTY_ROUTER_PROVIDER_NOACK
See Also:
Constant Field Values

PROPERTY_ROUTER_PROVIDER_LINKTYPE

static final java.lang.String PROPERTY_ROUTER_PROVIDER_LINKTYPE
The message exchange property name to set the provider link type to resolve. See JBI specification section 5.4.3.3 for more details.

See Also:
Constant Field Values

DEFAULT_PLATFORM_STRATEGY

static final java.lang.String DEFAULT_PLATFORM_STRATEGY
See Also:
Constant Field Values

DEFAULT_STANDALONE_STRATEGY

static final java.lang.String DEFAULT_STANDALONE_STRATEGY
See Also:
Constant Field Values

PROPERTY_ROUTER_QOS

static final java.lang.String PROPERTY_ROUTER_QOS
Constant used to specify the property name to set the router policy. Used only in plaform distribution. The default policy is fast.

See Also:
Constant Field Values

PROPERTY_ROUTER_SEND_ATTEMPT

static final java.lang.String PROPERTY_ROUTER_SEND_ATTEMPT
Constant used to specify the property name to set the router send attempt. Used only in plaform distribution. The default attempt is 2.

See Also:
Constant Field Values

PROPERTY_ROUTER_SEND_DELAY

static final java.lang.String PROPERTY_ROUTER_SEND_DELAY
Constant used to specify the property name to set the delay between router send attempts. Used only in plaform distribution. The default attempt is 1 second.

See Also:
Constant Field Values

SECURE_POLICY

static final java.lang.String SECURE_POLICY
Constant used to specify the secure policy. It assures the security of the exchange by encrypting the exchange sent

See Also:
Constant Field Values

RELIABLE_POLICY

static final java.lang.String RELIABLE_POLICY
Constant used to specify the reliable policy. It assures the persistence of the exchange. Message are never lost, but there is effort on the duration of the exchange

See Also:
Constant Field Values

FAST_POLICY

static final java.lang.String FAST_POLICY
Constant used to specify the fast policy. It assures the fastest exchange processing. If there is a problem during communication, the message can be lost.

See Also:
Constant Field Values

DEFAULT_POLICY

static final java.lang.String DEFAULT_POLICY
The default QOS policy.

See Also:
Constant Field Values
Method Detail

send

void send(ComponentContext componentContext,
          org.ow2.petals.jbi.messaging.exchange.MessageExchangeWrapper exchangeDecorator)
          throws RoutingException
Send the message into the NMR.

Parameters:
componentContext - the source component context
exchangeDecorator - the MessageExchangeWrapper
Throws:
RoutingException - impossible to send the message

sendSync

void sendSync(ComponentContext componentContext,
              org.ow2.petals.jbi.messaging.exchange.MessageExchangeWrapper exchangeDecorator,
              long timeout)
              throws RoutingException
Send the message synchronously into the NMR.

Parameters:
componentContext - the source component context
exchangeDecorator - the MessageExchangeWrapper
timeOut - timeout of the message (in ms). 0 for no timeout
Throws:
RoutingException - impossible to process a synchronous send

receive

org.ow2.petals.jbi.messaging.exchange.MessageExchangeWrapper receive(ComponentContext componentContext,
                                                                     long timeoutMS)
                                                                     throws RoutingException
Ask to receive a message from MNR and return it.

Parameters:
componentContext - The source component context MUST be non null
timeoutMS - parameter which represents
  • The time to wait if greater than 0
  • A non blocking call if equal to 0
  • Infinite Blocking call if less than 0
Returns:
The message exchange decorator retrieved from the Transporter
Throws:
RoutingException - impossible to receive the message

addComponent

void addComponent(ComponentContext componentContext)
                  throws RoutingException
Inform that a component is installing. The Router must inform its Transporters about the component installation.

Parameters:
componentContext - The component context
Throws:
RoutingException - impossible to add the component

removeComponent

void removeComponent(ComponentContext componentContext)
                     throws RoutingException
Inform that a component is uninstalling. The Router must inform its Transporters about the component uninstallation.

Parameters:
componentContext - The component context
Throws:
RoutingException - impossible to remove the component

modifiedSALifeCycle

void modifiedSALifeCycle(java.util.List<ServiceUnitLifeCycle> serviceUnitLifes)
Inform that a SA life-cycle has changed its state.

Parameters:
serviceUnitDescriptors - the list of bound SU JBI descriptors

stopTraffic

void stopTraffic()
Prepare the stopping of the component. It means that all ongoing message traffic must terminate during the method invocation and all new message traffic is rejected.



Copyright © 2005-2011 Petals Link (EBM Websourcing). All Rights Reserved.