|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.logicblaze.lingo.jms.impl.OneWayRequestor
org.logicblaze.lingo.jms.impl.SingleThreadedRequestor
org.logicblaze.lingo.jms.impl.MultiplexingRequestor
public class MultiplexingRequestor
A Requestor
which will use a single
producer, consumer and temporary topic for resource efficiency, but will use
correlation IDs on each message and response to ensure that each threads
requests can occur synchronously.
Constructor Summary | |
---|---|
MultiplexingRequestor(javax.jms.Connection connection,
javax.jms.Session session,
javax.jms.MessageProducer producer,
javax.jms.Destination serverDestination,
javax.jms.Destination clientDestination,
boolean ownsConnection)
|
|
MultiplexingRequestor(JmsProducerConfig config,
javax.jms.Destination serverDestination,
javax.jms.Destination clientDestination)
|
Method Summary | |
---|---|
protected javax.jms.JMSException |
createJMSException(java.lang.Exception e)
|
protected void |
doSend(javax.jms.Destination destination,
javax.jms.Message message,
long timeout)
|
TimeoutMap |
getRequestMap()
|
static Requestor |
newInstance(javax.jms.ConnectionFactory connectionFactory,
JmsProducerConfig config,
javax.jms.Destination destination)
|
static Requestor |
newInstance(javax.jms.ConnectionFactory connectionFactory,
JmsProducerConfig config,
javax.jms.Destination destination,
javax.jms.Destination responseDestination)
|
void |
onMessage(javax.jms.Message message)
Processes inbound responses from requests |
javax.jms.Message |
receive(long timeout)
Receives a message waiting for a maximum timeout if the timeout value is > 0 ir waiting forever if the timeout is < 0 or not waiting at all if the timeout is zero |
void |
registerHandler(java.lang.String correlationID,
ReplyHandler handler,
long timeout)
|
javax.jms.Message |
request(javax.jms.Destination destination,
javax.jms.Message message)
Sends a request and waits for a reply. |
javax.jms.Message |
request(javax.jms.Destination destination,
javax.jms.Message message,
long timeout)
Sends a request and waits for a reply up to a maximum timeout. |
void |
request(javax.jms.Destination destination,
javax.jms.Message message,
ReplyHandler handler,
long timeout)
Sends a request and provides a handler for all responses until the request is considered dead (or it is timed out). |
void |
setRequestMap(TimeoutMap requests)
|
Methods inherited from class org.logicblaze.lingo.jms.impl.SingleThreadedRequestor |
---|
close, createTemporaryDestination, getInboundDestination, getReceiver, isDeleteTemporaryDestinationsOnClose, populateHeaders, setDeleteTemporaryDestinationsOnClose |
Methods inherited from class org.logicblaze.lingo.jms.impl.OneWayRequestor |
---|
createCorrelationID, destroy, doSend, getConnection, getDeliveryMode, getMessageProducer, getPriority, getSession, getTimeToLive, newInstance, nextCounter, send, send, send, setDeliveryMode, setPriority, setTimeToLive, validateDestination |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MultiplexingRequestor(JmsProducerConfig config, javax.jms.Destination serverDestination, javax.jms.Destination clientDestination) throws javax.jms.JMSException
javax.jms.JMSException
public MultiplexingRequestor(javax.jms.Connection connection, javax.jms.Session session, javax.jms.MessageProducer producer, javax.jms.Destination serverDestination, javax.jms.Destination clientDestination, boolean ownsConnection) throws javax.jms.JMSException
javax.jms.JMSException
Method Detail |
---|
public static Requestor newInstance(javax.jms.ConnectionFactory connectionFactory, JmsProducerConfig config, javax.jms.Destination destination, javax.jms.Destination responseDestination) throws javax.jms.JMSException
javax.jms.JMSException
public static Requestor newInstance(javax.jms.ConnectionFactory connectionFactory, JmsProducerConfig config, javax.jms.Destination destination) throws javax.jms.JMSException
javax.jms.JMSException
public void registerHandler(java.lang.String correlationID, ReplyHandler handler, long timeout)
public javax.jms.Message request(javax.jms.Destination destination, javax.jms.Message message) throws javax.jms.JMSException
Requestor
JMSReplyTo
destination, and only one reply per request
is expected.
request
in interface Requestor
request
in class SingleThreadedRequestor
destination
- the server side destinationmessage
- the message to send
javax.jms.JMSException
- if the JMS provider fails to complete the request due to some
internal error.public javax.jms.Message request(javax.jms.Destination destination, javax.jms.Message message, long timeout) throws javax.jms.JMSException
Requestor
JMSReplyTo
destination,
and only one reply per request is expected.
request
in interface Requestor
request
in class SingleThreadedRequestor
destination
- the server side destinationmessage
- the message to send
javax.jms.JMSException
- if the JMS provider fails to complete the request due to some
internal error.public void request(javax.jms.Destination destination, javax.jms.Message message, ReplyHandler handler, long timeout) throws javax.jms.JMSException
Requestor
request
in interface Requestor
request
in class OneWayRequestor
javax.jms.JMSException
public void onMessage(javax.jms.Message message)
onMessage
in interface javax.jms.MessageListener
public javax.jms.Message receive(long timeout) throws javax.jms.JMSException
Requestor
receive
in interface Requestor
receive
in class SingleThreadedRequestor
javax.jms.JMSException
protected void doSend(javax.jms.Destination destination, javax.jms.Message message, long timeout) throws javax.jms.JMSException
doSend
in class OneWayRequestor
javax.jms.JMSException
public TimeoutMap getRequestMap()
public void setRequestMap(TimeoutMap requests)
protected javax.jms.JMSException createJMSException(java.lang.Exception e)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |