|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Requestor
Represents a JMS based requestor which is capable of performing various Message Exchange Patterns such as one-way, synchronous request-response, receive etc.
Method Summary | |
---|---|
void |
close()
Closes the Requestor and its session. |
String |
createCorrelationID()
Creates a new correlation ID. |
javax.jms.Connection |
getConnection()
Provides access to the underlying Connection this requestor is using |
javax.jms.MessageProducer |
getMessageProducer()
Returns the underying producer |
javax.jms.Session |
getSession()
Provides access to the underlying JMS session so that you can create messages. |
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 |
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 requestMessage,
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 |
send(javax.jms.Destination destination,
javax.jms.Message message)
Sends a one way message, not waiting for the response. |
void |
send(javax.jms.Destination destination,
javax.jms.Message message,
int deliveryMode,
int priority,
long timeToLive)
Sends a message to the given destination in a way that can be implemented in JMS 1.0.2b as well as using the JMS 1.1 send() method on MessageProducer |
Method Detail |
---|
void send(javax.jms.Destination destination, javax.jms.Message message) throws javax.jms.JMSException
destination
- the server side destinationmessage
- the message to send
javax.jms.JMSException
void send(javax.jms.Destination destination, javax.jms.Message message, int deliveryMode, int priority, long timeToLive) throws javax.jms.JMSException
MessageProducer
javax.jms.JMSException
- if the message could not be sentjavax.jms.Message request(javax.jms.Destination destination, javax.jms.Message message) throws javax.jms.JMSException
JMSReplyTo
destination, and only one reply per request
is expected.
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.javax.jms.Message request(javax.jms.Destination destination, javax.jms.Message message, long timeout) throws javax.jms.JMSException
JMSReplyTo
destination,
and only one reply per request is expected.
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.javax.jms.Message receive(long timeout) throws javax.jms.JMSException
javax.jms.JMSException
void request(javax.jms.Destination destination, javax.jms.Message requestMessage, ReplyHandler handler, long timeout) throws javax.jms.JMSException
javax.jms.JMSException
javax.jms.MessageProducer getMessageProducer()
javax.jms.Connection getConnection()
javax.jms.Session getSession()
void close() throws javax.jms.JMSException
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.
javax.jms.JMSException
- if the JMS provider fails to close the Requestor
due to some internal error.String createCorrelationID()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |