|
||||||||||
| 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(Connection connection,
Session session,
MessageProducer producer,
Destination serverDestination,
Destination clientDestination,
boolean ownsConnection)
|
|
MultiplexingRequestor(JmsProducerConfig config,
Destination serverDestination,
Destination clientDestination)
|
|
| Method Summary | |
|---|---|
protected JMSException |
createJMSException(Exception e)
|
protected void |
doSend(Destination destination,
Message message,
long timeout)
|
TimeoutMap |
getRequestMap()
|
static Requestor |
newInstance(ConnectionFactory connectionFactory,
JmsProducerConfig config,
Destination destination)
|
static Requestor |
newInstance(ConnectionFactory connectionFactory,
JmsProducerConfig config,
Destination destination,
Destination responseDestination)
|
void |
onMessage(Message message)
Processes inbound responses from requests |
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(String correlationID,
ReplyHandler handler,
long timeout)
|
Message |
request(Destination destination,
Message message)
Sends a request and waits for a reply. |
Message |
request(Destination destination,
Message message,
long timeout)
Sends a request and waits for a reply up to a maximum timeout. |
void |
request(Destination destination,
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,
Destination serverDestination,
Destination clientDestination)
throws JMSException
JMSException
public MultiplexingRequestor(Connection connection,
Session session,
MessageProducer producer,
Destination serverDestination,
Destination clientDestination,
boolean ownsConnection)
throws JMSException
JMSException| Method Detail |
|---|
public static Requestor newInstance(ConnectionFactory connectionFactory,
JmsProducerConfig config,
Destination destination,
Destination responseDestination)
throws JMSException
JMSException
public static Requestor newInstance(ConnectionFactory connectionFactory,
JmsProducerConfig config,
Destination destination)
throws JMSException
JMSException
public void registerHandler(String correlationID,
ReplyHandler handler,
long timeout)
public Message request(Destination destination,
Message message)
throws JMSException
RequestorJMSReplyTo destination, and only one reply per request
is expected.
request in interface Requestorrequest in class SingleThreadedRequestordestination - the server side destinationmessage - the message to send
JMSException - if the JMS provider fails to complete the request due to some
internal error.
public Message request(Destination destination,
Message message,
long timeout)
throws JMSException
RequestorJMSReplyTo destination,
and only one reply per request is expected.
request in interface Requestorrequest in class SingleThreadedRequestordestination - the server side destinationmessage - the message to send
JMSException - if the JMS provider fails to complete the request due to some
internal error.
public void request(Destination destination,
Message message,
ReplyHandler handler,
long timeout)
throws JMSException
Requestor
request in interface Requestorrequest in class OneWayRequestorJMSExceptionpublic void onMessage(Message message)
onMessage in interface MessageListener
public Message receive(long timeout)
throws JMSException
Requestor
receive in interface Requestorreceive in class SingleThreadedRequestorJMSException
protected void doSend(Destination destination,
Message message,
long timeout)
throws JMSException
doSend in class OneWayRequestorJMSExceptionpublic TimeoutMap getRequestMap()
public void setRequestMap(TimeoutMap requests)
protected JMSException createJMSException(Exception e)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||