|
||||||||||
| 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
public class 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(Connection connection,
Session session,
MessageProducer producer,
Destination serverDestination,
boolean ownsConnection)
|
|
SingleThreadedRequestor(Connection connection,
Session session,
MessageProducer producer,
Destination serverDestination,
Destination clientDestination,
boolean ownsConnection)
|
|
SingleThreadedRequestor(JmsProducerConfig config,
Destination serverDestination,
Destination clientDestination)
|
|
| Method Summary | |
|---|---|
void |
close()
Closes the Requestor and its session. |
protected static TemporaryQueue |
createTemporaryDestination(Session session)
|
Destination |
getInboundDestination()
|
protected MessageConsumer |
getReceiver()
|
boolean |
isDeleteTemporaryDestinationsOnClose()
|
protected void |
populateHeaders(Message message)
A hook to allow custom implementations to process headers differently. |
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. |
void |
setDeleteTemporaryDestinationsOnClose(boolean deleteTemporaryDestinationsOnClose)
|
| Methods inherited from class org.logicblaze.lingo.jms.impl.OneWayRequestor |
|---|
createCorrelationID, destroy, doSend, doSend, getConnection, getDeliveryMode, getMessageProducer, getPriority, getSession, getTimeToLive, newInstance, nextCounter, request, 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 SingleThreadedRequestor(JmsProducerConfig config,
Destination serverDestination,
Destination clientDestination)
throws JMSException
JMSException
public SingleThreadedRequestor(Connection connection,
Session session,
MessageProducer producer,
Destination serverDestination,
Destination clientDestination,
boolean ownsConnection)
throws JMSException
JMSException
public SingleThreadedRequestor(Connection connection,
Session session,
MessageProducer producer,
Destination serverDestination,
boolean ownsConnection)
throws JMSException
JMSException| Method Detail |
|---|
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 OneWayRequestordestination - 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 OneWayRequestordestination - 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 receive(long timeout)
throws JMSException
Requestor
receive in interface Requestorreceive in class OneWayRequestorJMSException
public void close()
throws JMSException
RequestorRequestor 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 Requestorclose in class OneWayRequestorJMSException - if the JMS provider fails to close the Requestor
due to some internal error.public boolean isDeleteTemporaryDestinationsOnClose()
public void setDeleteTemporaryDestinationsOnClose(boolean deleteTemporaryDestinationsOnClose)
protected static TemporaryQueue createTemporaryDestination(Session session)
throws JMSException
JMSException
protected void populateHeaders(Message message)
throws JMSException
OneWayRequestor
populateHeaders in class OneWayRequestorJMSException
protected MessageConsumer getReceiver()
throws JMSException
JMSException
public Destination getInboundDestination()
throws JMSException
JMSException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||