org.ow2.petals.jbi.messaging.routing.module
Class PriorityOrdererModule

java.lang.Object
  extended by org.ow2.petals.jbi.messaging.routing.module.PriorityOrdererModule
All Implemented Interfaces:
java.util.EventListener, javax.management.NotificationListener, PriorityModifier, SenderModule

public class PriorityOrdererModule
extends java.lang.Object
implements SenderModule, javax.management.NotificationListener, PriorityModifier

The module orderer the exchange according to their priority, proposing a Priority Queue mechanism. It is possible to reassign a priority by using the PriorityModifier Interface.

Since:
3.1
Author:
rnaudin - EBM Websourcing

Field Summary
static java.lang.String PROPERTY_ROUTER_PRIORITY
          The priority property to set in message exchange.
static long TIMEOUT_MANAGER_PERIOD
          The period to run the Timeout Manager task
 
Constructor Summary
PriorityOrdererModule()
           
 
Method Summary
 void electEndpoints(java.util.Map<ServiceEndpoint,TransportSendContext> electedEndpoints, ComponentContext sourceComponentContext, org.ow2.petals.jbi.messaging.exchange.MessageExchangeWrapper exchangeDecorator)
          Elect a list of candidate endpoints to be destination of the exchange.
 void handleNotification(javax.management.Notification notification, java.lang.Object handback)
           
 void modifyPriority(org.ow2.petals.jbi.messaging.exchange.MessageExchangeWrapper exchangeDecorator, short priority)
           
protected  void start()
          Start the Fractal component
protected  void stop()
          Stop the Fractal component
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROPERTY_ROUTER_PRIORITY

public static final java.lang.String PROPERTY_ROUTER_PRIORITY
The priority property to set in message exchange.

See Also:
Constant Field Values

TIMEOUT_MANAGER_PERIOD

public static final long TIMEOUT_MANAGER_PERIOD
The period to run the Timeout Manager task

See Also:
Constant Field Values
Constructor Detail

PriorityOrdererModule

public PriorityOrdererModule()
Method Detail

electEndpoints

public void electEndpoints(java.util.Map<ServiceEndpoint,TransportSendContext> electedEndpoints,
                           ComponentContext sourceComponentContext,
                           org.ow2.petals.jbi.messaging.exchange.MessageExchangeWrapper exchangeDecorator)
                    throws RoutingException
Description copied from interface: SenderModule
Elect a list of candidate endpoints to be destination of the exchange.

Specified by:
electEndpoints in interface SenderModule
exchangeDecorator - the exchange decorator to send
Throws:
RoutingException

handleNotification

public void handleNotification(javax.management.Notification notification,
                               java.lang.Object handback)
Specified by:
handleNotification in interface javax.management.NotificationListener

modifyPriority

public void modifyPriority(org.ow2.petals.jbi.messaging.exchange.MessageExchangeWrapper exchangeDecorator,
                           short priority)
                    throws RoutingException
Specified by:
modifyPriority in interface PriorityModifier
Throws:
RoutingException

start

protected void start()
Start the Fractal component

Throws:
RoutingException

stop

protected void stop()
Stop the Fractal component



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