|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.messagelet.MessageDrivenObjectSupport
org.apache.commons.messagelet.MessengerMDO
org.apache.commons.messagelet.BridgeMDO
org.apache.commons.messagelet.DistributeBridgeMDO
public class DistributeBridgeMDO
DistributeBridgeMDO
is an MDO which
consumes JMS from one destination and randomly distributes
them across a number of other destinations.
This MDO can be used to provide a simple load balancing mechanism
consuming from one destination and sending messages to a number of different
physical destinations.
Field Summary | |
---|---|
private static org.apache.commons.logging.Log |
log
Logger |
private java.util.List |
outputDestinations
a List of output Destination objects |
Constructor Summary | |
---|---|
DistributeBridgeMDO()
|
Method Summary | |
---|---|
void |
addOutputSubject(java.lang.String subject)
Adds a new output subject |
javax.jms.Destination |
getOutputDestination()
Randomly chooses a destination from the list of destinations |
java.util.List |
getOutputDestinations()
|
protected void |
validateOutputDestination()
Validates that there is a valid output destintation that we can use. |
Methods inherited from class org.apache.commons.messagelet.BridgeMDO |
---|
acknowledge, commit, createOutputBytesMessage, createOutputMapMessage, createOutputMessage, createOutputObjectMessage, createOutputStreamMessage, createOutputTextMessage, getBufferSize, getOutputConnection, getOutputMessenger, getOutputSubject, init, isTransacted, onMessage, processMessageHeaders, rollback, setBufferSize, setOutputConnection, setOutputDestination, setOutputMessenger, setOutputSubject, setTransacted |
Methods inherited from class org.apache.commons.messagelet.MessengerMDO |
---|
getMessenger, getMessengerManager, setMessenger, setMessengerManager |
Methods inherited from class org.apache.commons.messagelet.MessageDrivenObjectSupport |
---|
destroy, getLog, getServletContext, init, log, log |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final org.apache.commons.logging.Log log
private java.util.List outputDestinations
Constructor Detail |
---|
public DistributeBridgeMDO()
Method Detail |
---|
public java.util.List getOutputDestinations()
public void addOutputSubject(java.lang.String subject) throws javax.jms.JMSException
javax.jms.JMSException
public javax.jms.Destination getOutputDestination() throws javax.jms.JMSException
getOutputDestination
in class BridgeMDO
javax.jms.JMSException
protected void validateOutputDestination() throws javax.jms.JMSException, javax.servlet.ServletException
BridgeMDO
validateOutputDestination
in class BridgeMDO
javax.jms.JMSException
javax.servlet.ServletException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |