org.apache.servicemix.jbi.nmr.flow.jms
Class JMSFlow

java.lang.Object
  extended by org.apache.servicemix.jbi.management.BaseLifeCycle
      extended by org.apache.servicemix.jbi.nmr.flow.AbstractFlow
          extended by org.apache.servicemix.jbi.nmr.flow.jms.AbstractJMSFlow
              extended by org.apache.servicemix.jbi.nmr.flow.jms.JMSFlow
All Implemented Interfaces:
javax.jbi.management.LifeCycleMBean, MessageListener, MBeanInfoProvider, Flow

public class JMSFlow
extends AbstractJMSFlow

Use for message routing among a network of containers. All routing/registration happens automatically.

Version:
$Revision: 596245 $

Field Summary
 
Fields inherited from class org.apache.servicemix.jbi.nmr.flow.jms.AbstractJMSFlow
connection, connectionFactory, monitorMessageConsumer, started, subscriberSet
 
Fields inherited from class org.apache.servicemix.jbi.nmr.flow.AbstractFlow
broker, executorFactory, log
 
Fields inherited from class org.apache.servicemix.jbi.management.BaseLifeCycle
currentState, INITIALIZED, listener
 
Fields inherited from interface javax.jbi.management.LifeCycleMBean
SHUTDOWN, STARTED, STOPPED, UNKNOWN
 
Constructor Summary
JMSFlow()
           
 
Method Summary
protected  ConnectionFactory createConnectionFactoryFromUrl(String jmsURL)
           
protected  void onConsumerMonitorMessage(Message advisoryMessage)
          Listener on the ActiveMQ advisory topic so we get messages when a cluster node is added or removed
 void shutDown()
          shutDown the flow
 void startConsumerMonitor()
           
 
Methods inherited from class org.apache.servicemix.jbi.nmr.flow.jms.AbstractJMSFlow
addClusterNode, broadcast, canHandle, doRouting, doSend, getBroadcastDestinationName, getConnectionFactory, getDescription, getJmsURL, getPassword, getUserName, init, numberInNetwork, onComponentStarted, onComponentStopped, onInternalEndpointRegistered, onInternalEndpointUnregistered, onMessage, onRemoteEndpointRegistered, onRemoteEndpointUnregistered, removeAllPackets, removeClusterNode, setBroadcastDestinationName, setConnectionFactory, setJmsURL, setPassword, setUserName, start, stop, stopConsumerMonitor
 
Methods inherited from class org.apache.servicemix.jbi.nmr.flow.AbstractFlow
getAttributeInfos, getBroker, getExecutorFactory, getName, getType, isClustered, isPersistent, isSynchronous, isTransacted, resume, send, setName, suspend
 
Methods inherited from class org.apache.servicemix.jbi.management.BaseLifeCycle
firePropertyChanged, getCurrentState, getObjectToManage, getOperationInfos, getSubType, init, isInitialized, isShutDown, isStarted, isStopped, isUnknown, setCurrentState, setPropertyChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.jbi.management.LifeCycleMBean
getCurrentState
 

Constructor Detail

JMSFlow

public JMSFlow()
Method Detail

createConnectionFactoryFromUrl

protected ConnectionFactory createConnectionFactoryFromUrl(String jmsURL)
Specified by:
createConnectionFactoryFromUrl in class AbstractJMSFlow

onConsumerMonitorMessage

protected void onConsumerMonitorMessage(Message advisoryMessage)
Listener on the ActiveMQ advisory topic so we get messages when a cluster node is added or removed

Specified by:
onConsumerMonitorMessage in class AbstractJMSFlow

startConsumerMonitor

public void startConsumerMonitor()
                          throws JMSException
Specified by:
startConsumerMonitor in class AbstractJMSFlow
Throws:
JMSException

shutDown

public void shutDown()
              throws javax.jbi.JBIException
Description copied from class: AbstractFlow
shutDown the flow

Specified by:
shutDown in interface javax.jbi.management.LifeCycleMBean
Overrides:
shutDown in class AbstractJMSFlow
Throws:
javax.jbi.JBIException - if the item fails to shut down.


Copyright © 2005-2008 Apache Software Foundation. All Rights Reserved.