|
|||||||||||
| 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.PooledTempQueue
This is a class that wraps a JMS TemporaryQueue and QueueReceiver that listens for responses sent on the TemporaryQueue. It is instantiated and stored in the TemporaryQueuePool for use by PointToPointProducers. These objects are created when the producer is initialized and retrieved from the pool by the producer's QueueRequestor when requests are produced. This is done so message production doesn't have to be slowed down by the creation of the temporary queues each time a request is produced. The TempQueuePool is responsible for determining if a PooledTempQueue is available and if not, it will create a new one for use by the current request. This way, there will never be two threads attempting to use the same TempoaryQueue at the same time.
QueueRequestor,
PointToPointProducer,
TempQueuePool| Field Summary |
| Fields inherited from class org.openeai.OpenEaiObject |
logger |
| Constructor Summary | |
PooledTempQueue(javax.jms.QueueSession session)
Constructor, creates a TemporaryQueue and QueueReceiver that will be used when the OpenEAI QueueRequestor produces a request. |
|
| Method Summary | |
void |
delete()
Frees up the resources allocated on behalf of the JMS resources. |
java.lang.String |
getQueueId()
Returns the Queue Id associated to this PooledTempQueue. |
javax.jms.QueueReceiver |
getQueueReceiver()
Returns the JMS QueueReceiver object associated to the PooledTempQueue. |
javax.jms.TemporaryQueue |
getTemporaryQueue()
Returns the JMS TempoaryQueue object associated to the PooledTempQueue. |
boolean |
inUse()
Returns true if this PooledTempQueue object is in use false if it's not. |
void |
setInUse(boolean inUse)
Sets the inUse flag associated to this PooledTempQueue. |
void |
setQueueId(java.lang.String id)
Sets the Queue Id associated to this PooledTempQueue. |
void |
setQueueReceiver(javax.jms.QueueReceiver receiver)
Sets the JMS QueueReceiver object associated to the PooledTempQueue. |
void |
setTemporaryQueue(javax.jms.TemporaryQueue tempQueue)
Sets the JMS TempoaryQueue object associated to the PooledTempQueue. |
| 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 PooledTempQueue(javax.jms.QueueSession session)
throws javax.jms.JMSException
| Method Detail |
public final void setQueueId(java.lang.String id)
public final java.lang.String getQueueId()
public final boolean inUse()
public final void setInUse(boolean inUse)
This is set to true each time a PooledTempQueue is retreived from the TempQueuePool and set to false when the PooledTempQueue is released. These objects are retrieved and released from the TempQueuePool by the OpenEAI QueueRequestor when requests are produced.
public final void setTemporaryQueue(javax.jms.TemporaryQueue tempQueue)
public final javax.jms.TemporaryQueue getTemporaryQueue()
public final void setQueueReceiver(javax.jms.QueueReceiver receiver)
public final javax.jms.QueueReceiver getQueueReceiver()
public final void delete()
throws javax.jms.JMSException
javax.jms.JMSException - if errors occur deleting and closing the JMS resources.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||