|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.servicemix.jbi.management.BaseLifeCycle
org.apache.servicemix.jbi.nmr.flow.AbstractFlow
org.apache.servicemix.jbi.nmr.flow.jms.AbstractJMSFlow
public abstract class AbstractJMSFlow
Use for message routing among a network of containers. All routing/registration happens automatically.
| Field Summary | |
|---|---|
protected Connection |
connection
|
protected ConnectionFactory |
connectionFactory
|
protected MessageConsumer |
monitorMessageConsumer
|
protected AtomicBoolean |
started
|
protected Set<String> |
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 | |
|---|---|
AbstractJMSFlow()
|
|
| Method Summary | |
|---|---|
protected void |
addClusterNode(String connectionId)
A new cluster node is announced. |
protected void |
broadcast(EndpointEvent event)
|
boolean |
canHandle(javax.jbi.messaging.MessageExchange me)
Check if the flow can support the requested QoS for this exchange |
protected abstract ConnectionFactory |
createConnectionFactoryFromUrl(String url)
|
void |
doRouting(MessageExchangeImpl me)
Distribute an ExchangePacket |
protected void |
doSend(MessageExchangeImpl me)
Distribute an ExchangePacket |
String |
getBroadcastDestinationName()
|
ConnectionFactory |
getConnectionFactory()
|
String |
getDescription()
The type of Flow |
String |
getJmsURL()
|
String |
getPassword()
|
String |
getUserName()
|
void |
init(Broker broker)
Initialize the Region |
int |
numberInNetwork()
useful for testing |
void |
onComponentStarted(ComponentEvent event)
|
void |
onComponentStopped(ComponentEvent event)
|
protected abstract void |
onConsumerMonitorMessage(Message message)
|
void |
onInternalEndpointRegistered(EndpointEvent event,
boolean broadcast)
|
void |
onInternalEndpointUnregistered(EndpointEvent event,
boolean broadcast)
|
void |
onMessage(Message message)
MessageListener implementation |
void |
onRemoteEndpointRegistered(EndpointEvent event)
|
void |
onRemoteEndpointUnregistered(EndpointEvent event)
|
protected void |
removeAllPackets(String containerName)
|
protected void |
removeClusterNode(String connectionId)
A cluster node leaves the cluster. |
void |
setBroadcastDestinationName(String broadcastDestinationName)
|
void |
setConnectionFactory(ConnectionFactory connectionFactory)
|
void |
setJmsURL(String jmsURL)
|
void |
setPassword(String password)
|
void |
setUserName(String userName)
|
void |
shutDown()
shutDown the flow |
void |
start()
start the flow |
abstract void |
startConsumerMonitor()
|
void |
stop()
stop the flow |
void |
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 |
| Field Detail |
|---|
protected ConnectionFactory connectionFactory
protected Connection connection
protected AtomicBoolean started
protected MessageConsumer monitorMessageConsumer
protected Set<String> subscriberSet
| Constructor Detail |
|---|
public AbstractJMSFlow()
| Method Detail |
|---|
public String getDescription()
getDescription in interface MBeanInfoProvidergetDescription in interface Flowpublic String getPassword()
public void setPassword(String password)
password - The password to set.public String getUserName()
public void setUserName(String userName)
userName - The userName to set.public ConnectionFactory getConnectionFactory()
public void setConnectionFactory(ConnectionFactory connectionFactory)
connectionFactory - The connectionFactory to set.public String getBroadcastDestinationName()
public void setBroadcastDestinationName(String broadcastDestinationName)
broadcastDestinationName - The broadcastDestinationName to set.public boolean canHandle(javax.jbi.messaging.MessageExchange me)
canHandle in interface Flowme - the exchange to check
public void init(Broker broker)
throws javax.jbi.JBIException
init in interface Flowinit in class AbstractFlowbroker -
javax.jbi.JBIExceptionprotected abstract ConnectionFactory createConnectionFactoryFromUrl(String url)
protected abstract void onConsumerMonitorMessage(Message message)
public abstract void startConsumerMonitor()
throws JMSException
JMSException
public void stopConsumerMonitor()
throws JMSException
JMSException
public void start()
throws javax.jbi.JBIException
start in interface javax.jbi.management.LifeCycleMBeanstart in class AbstractFlowjavax.jbi.JBIException
public void stop()
throws javax.jbi.JBIException
stop in interface javax.jbi.management.LifeCycleMBeanstop in class AbstractFlowjavax.jbi.JBIException
public void shutDown()
throws javax.jbi.JBIException
AbstractFlow
shutDown in interface javax.jbi.management.LifeCycleMBeanshutDown in class AbstractFlowjavax.jbi.JBIException - if the item fails to shut down.public int numberInNetwork()
public void onInternalEndpointRegistered(EndpointEvent event,
boolean broadcast)
public void onInternalEndpointUnregistered(EndpointEvent event,
boolean broadcast)
protected void broadcast(EndpointEvent event)
throws Exception
Exceptionpublic void onComponentStarted(ComponentEvent event)
public void onComponentStopped(ComponentEvent event)
public void onRemoteEndpointRegistered(EndpointEvent event)
public void onRemoteEndpointUnregistered(EndpointEvent event)
protected void doSend(MessageExchangeImpl me)
throws javax.jbi.messaging.MessagingException
doSend in class AbstractFlowme -
javax.jbi.messaging.MessagingException
public void doRouting(MessageExchangeImpl me)
throws javax.jbi.messaging.MessagingException
doRouting in class AbstractFlowme -
javax.jbi.messaging.MessagingExceptionpublic void onMessage(Message message)
onMessage in interface MessageListenermessage - protected void addClusterNode(String connectionId)
connectionId - protected void removeClusterNode(String connectionId)
connectionId - protected void removeAllPackets(String containerName)
public String getJmsURL()
public void setJmsURL(String jmsURL)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||