|
|||||||||||
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
A simple Requestor
which can only be used by one thread at once
and only used for one message exchange at once.
Constructor Summary | |
SingleThreadedRequestor(Session session,
JmsProducer producer,
Destination serverDestination)
|
|
SingleThreadedRequestor(Session session,
JmsProducer producer,
Destination serverDestination,
Destination clientDestination)
|
Method Summary | |
void |
close()
Closes the Requestor and its session. |
protected TemporaryQueue |
createTemporaryDestination(Session session)
|
protected MessageConsumer |
getReceiver()
|
static Requestor |
newInstance(ConnectionFactory connectionFactory,
Destination serverDestination)
|
protected void |
populateHeaders(Message message)
|
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 |
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. |
Methods inherited from class org.logicblaze.lingo.jms.impl.OneWayRequestor |
createCorrelationID, doSend, getDeliveryMode, getPriority, getSession, getTimeToLive, nextCounter, oneWay, oneWay, setDeliveryMode, setPriority, setTimeToLive |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SingleThreadedRequestor(Session session, JmsProducer producer, Destination serverDestination, Destination clientDestination) throws JMSException
public SingleThreadedRequestor(Session session, JmsProducer producer, Destination serverDestination) throws JMSException
Method Detail |
public static Requestor newInstance(ConnectionFactory connectionFactory, Destination serverDestination) throws JMSException
JMSException
public Message request(Destination destination, Message message) throws JMSException
Requestor
JMSReplyTo
destination, and only one reply per request
is expected.
request
in interface Requestor
request
in class OneWayRequestor
JMSException
public Message request(Destination destination, Message message, long timeout) throws JMSException
Requestor
JMSReplyTo
destination, and only one reply per request
is expected.
request
in interface Requestor
request
in class OneWayRequestor
JMSException
public Message receive(long timeout) throws JMSException
Requestor
receive
in interface Requestor
receive
in class OneWayRequestor
JMSException
public void close() throws JMSException
Requestor
Requestor
and its session.
Since a provider may allocate some resources on behalf of a
Requestor
outside the Java virtual machine, clients
should close them when they
are not needed. Relying on garbage collection to eventually reclaim
these resources may not be timely enough.
Note that this method closes the Session
object
passed to the Requestor
constructor.
close
in interface Requestor
close
in class OneWayRequestor
JMSException
protected TemporaryQueue createTemporaryDestination(Session session) throws JMSException
JMSException
protected void populateHeaders(Message message) throws JMSException
populateHeaders
in class OneWayRequestor
JMSException
protected MessageConsumer getReceiver()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |