org.servicemix.jbi.nmr.flow.seda
Class SedaFlow

java.lang.Object
  extended byorg.servicemix.jbi.management.BaseLifeCycle
      extended byorg.servicemix.jbi.nmr.flow.AbstractFlow
          extended byorg.servicemix.jbi.nmr.flow.seda.SedaFlow
All Implemented Interfaces:
ComponentPacketEventListener, Flow, LifeCycleMBean, MBeanInfoProvider
Direct Known Subclasses:
ClusterFlow

public class SedaFlow
extends AbstractFlow
implements ComponentPacketEventListener

A simple Straight through flow

Version:
$Revision: 1.8 $

Nested Class Summary
protected static class SedaFlow.SedaFlowThreadFactory
           
 
Field Summary
protected  int capacity
           
protected  Map queueMap
           
protected  EDU.oswego.cs.dl.util.concurrent.SynchronizedBoolean started
           
protected  EDU.oswego.cs.dl.util.concurrent.PooledExecutor threadPool
           
 
Fields inherited from class org.servicemix.jbi.nmr.flow.AbstractFlow
broker
 
Fields inherited from class org.servicemix.jbi.management.BaseLifeCycle
currentState, listener
 
Fields inherited from interface javax.jbi.management.LifeCycleMBean
RUNNING, SHUTDOWN, STOPPED, UNKNOWN
 
Constructor Summary
SedaFlow()
           
 
Method Summary
 MBeanAttributeInfo[] getAttributeInfos()
          Get an array of MBeanAttributeInfo
 int getCapacity()
           
 String getDescription()
          The type of Flow
 int getQueueNumber()
          Get Queue number
 void init(Broker broker)
          Initialize the Region
 void onEvent(ComponentPacketEvent event)
          Process state changes in Components
 void send(ExchangePacket packet)
          Distribute an ExchangePacket
 void setCapacity(int capacity)
           
 void shutDown()
          shutDown the flow
 void start()
          start the flow
 void stop()
          stop the flow
 
Methods inherited from class org.servicemix.jbi.nmr.flow.AbstractFlow
doRouting
 
Methods inherited from class org.servicemix.jbi.management.BaseLifeCycle
firePropertyChanged, getCurrentState, getName, getObjectToManage, getOperationInfos, setCurrentState, setPropertyChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

threadPool

protected EDU.oswego.cs.dl.util.concurrent.PooledExecutor threadPool

queueMap

protected Map queueMap

capacity

protected int capacity

started

protected EDU.oswego.cs.dl.util.concurrent.SynchronizedBoolean started
Constructor Detail

SedaFlow

public SedaFlow()
Method Detail

getDescription

public String getDescription()
The type of Flow

Specified by:
getDescription in interface Flow
Returns:
the type

init

public void init(Broker broker)
          throws JBIException
Initialize the Region

Specified by:
init in interface Flow
Overrides:
init in class AbstractFlow
Parameters:
broker -
Throws:
JBIException

start

public void start()
           throws JBIException
start the flow

Specified by:
start in interface Flow
Overrides:
start in class AbstractFlow
Throws:
JBIException

stop

public void stop()
          throws JBIException
stop the flow

Specified by:
stop in interface Flow
Overrides:
stop in class AbstractFlow
Throws:
JBIException

shutDown

public void shutDown()
              throws JBIException
shutDown the flow

Specified by:
shutDown in interface Flow
Overrides:
shutDown in class AbstractFlow
Throws:
JBIException

send

public void send(ExchangePacket packet)
          throws JBIException
Distribute an ExchangePacket

Specified by:
send in interface Flow
Parameters:
packet -
Throws:
JBIException

onEvent

public void onEvent(ComponentPacketEvent event)
Process state changes in Components

Specified by:
onEvent in interface ComponentPacketEventListener
Parameters:
event -

getCapacity

public int getCapacity()
Returns:
Returns the capacity.

setCapacity

public void setCapacity(int capacity)
Parameters:
capacity - The capacity to set.

getQueueNumber

public int getQueueNumber()
Get Queue number

Returns:
number of running Queues

getAttributeInfos

public MBeanAttributeInfo[] getAttributeInfos()
                                       throws JMException
Get an array of MBeanAttributeInfo

Specified by:
getAttributeInfos in interface MBeanInfoProvider
Overrides:
getAttributeInfos in class AbstractFlow
Returns:
array of AttributeInfos
Throws:
JMException


Copyright © 2005 ServiceMix.. All Rights Reserved.