|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--org.openeai.OpenEaiObject
|
+--org.openeai.jms.producer.QueueRequestor
JMS provides a QueueRequestor helper class to simplify making service requests. This is the OpenEAI version of that class which leverages several other OpenEAI foundation components like TempQueuePool to increase the performance of request production. It is thread safe so multiple threads can make requests using the same producer and queue requestor.
TempQueuePool,
PointToPointProducer| Field Summary |
| Fields inherited from class org.openeai.OpenEaiObject |
logger |
| Constructor Summary | |
QueueRequestor(javax.jms.QueueSession session,
javax.jms.Queue queue)
Constructor for the QueueRequestor class. |
|
| Method Summary | |
void |
close()
Since a provider may allocate some resources on behalf of a QueueRequestor outside the JVM, clients should close them when they are not needed. |
TempQueuePool |
getTempQueuePool()
Returns the Temporary Queue Pool associated to this QueueRequestor. |
int |
getTimeoutInterval()
Returns the request timeout interval assoicated to this QueueRequestor. |
javax.jms.Message |
request(javax.jms.Message message)
Send a request and wait for a reply. |
void |
setTempQueuePool(TempQueuePool tempQueuePool)
Sets the Temporary Queue Pool associated to this QueueRequestor. |
void |
setTimeoutInterval(int timeout)
Sets the request timeout interval assoicated to this QueueRequestor. |
| Methods inherited from class org.openeai.OpenEaiObject |
addLog4jProperty, getAppName, getDebug, getFromAddr, getLog4jProperties, getMailHost, getMailService, getProperties, getToAddr, initializeLog4j, initializeLog4j, initializeLog4j, setAppName, setDebug, setFromAddr, setMailHost, setMailService, setProperties, setToAddr |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public QueueRequestor(javax.jms.QueueSession session,
javax.jms.Queue queue)
throws javax.jms.JMSException
This implementation assumes the session parameter to be non-transacted and either AUTO_ACKNOWLEDGE or DUPS_OK_ACKNOWLEDGE.
session - the queue session the queue belongs to.queue - the queue to perform the request/reply call on.
javax.jms.JMSException - if a JMS error occurs.| Method Detail |
public TempQueuePool getTempQueuePool()
TempQueuePoolpublic void setTempQueuePool(TempQueuePool tempQueuePool)
TempQueuePool,
ProducerConfigpublic int getTimeoutInterval()
public void setTimeoutInterval(int timeout)
This method is called by the PointToPointProducer when it uses the QueueRequestor to send a request in the produceRequest method.
PointToPointProducer.produceRequest(Message)
public javax.jms.Message request(javax.jms.Message message)
throws JMSTimeoutException,
javax.jms.JMSException
This method retrieves a PooledTempQueue object from the TempQueuePool associated to this QueueRequestor and uses the TemporaryQueue and QueueReceiver associated to that PooledTempQueue for the request and subsequent response.
message - the message to send.
javax.jms.JMSException - if a JMS error occurs.
JMSTimeoutException - if the response isn't returned in the allowed time.
public void close()
throws javax.jms.JMSException
Note that this method closes the Session object passed to the QueueRequestor constructor and all objects in the TempQueuePool.
javax.jms.JMSException - if a JMS error occurs.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||