|
|||||||||||
| 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.MessageProducer
|
+--org.openeai.jms.producer.PointToPointProducer
The PointToPointProducer produces messages to a Queue. If the method being called to produce the message is 'produceRequest' the Producer will use the QueueRequestor object to produce the message and wait for a response from the consuming application. If the method called is 'produceMessage' it will not wait for a response.
PubSubProducer,
PointToPointConsumer| Nested Class Summary | |
protected class |
PointToPointProducer.MonitorProducer
This Thread will sleep for 30 seconds and then wake up and check the status of the producer by attempting to create/delete a TemporaryQueue. |
| Field Summary |
| Fields inherited from class org.openeai.jms.producer.MessageProducer |
m_messages, STARTED, STOPPED, STOPPING |
| Fields inherited from class org.openeai.OpenEaiObject |
logger |
| Constructor Summary | |
PointToPointProducer()
|
|
PointToPointProducer(ProducerConfig pConfig)
As AppConfig reads through an application's deployment document, it will build a ProducerConfig Java object and pass that object to this constructor. |
|
| Method Summary | |
javax.jms.TextMessage |
createTextMessage()
Convenience method that allows calling applications to use this producer to create a JMS TextMessage that is used during message production. |
javax.jms.Queue |
getQueue()
Returns the Producers's Queue object. |
javax.jms.QueueConnection |
getQueueConnection()
Returns the Producers's QueueConnection object. |
javax.jms.QueueConnectionFactory |
getQueueConnectionFactory()
Returns the Producers's QueueConnectionFactory object. |
QueueRequestor |
getQueueRequestor()
Returns the Producers's QueueRequestor object. |
javax.jms.QueueSender |
getQueueSender()
Returns the Producers's QueueSender object. |
javax.jms.QueueSession |
getQueueSession()
Returns the Producers's QueueSession object. |
int |
getRequestTimeoutInterval()
Returns the request timeout interval that will be used by this producer to determine when a timeout occurrs. |
protected void |
init(java.util.Properties props)
Invokes MessageProducer.init(Properties). |
void |
produceMessage(javax.jms.Message aMessage)
Creates a QueueSender and produces the message passed in to the Queue the producer is connected to. |
javax.jms.Message |
produceRequest(javax.jms.Message aMessage)
Uses the pre-started QueueRequestor to send a request to a consumer and wait for a response. |
void |
setQueue(javax.jms.Queue queue)
Sets the Producers's Queue object. |
void |
setQueueConnection(javax.jms.QueueConnection queueConnection)
Sets the Producers's QueueConnection object. |
void |
setQueueConnectionFactory(javax.jms.QueueConnectionFactory qcf)
Sets the Producers's QueueConnectionFactory object. |
void |
setQueueRequestor(QueueRequestor queueRequestor)
Sets the Producers's QueueRequestor object. |
void |
setQueueSender(javax.jms.QueueSender queueSender)
Sets the Producers's QueueSender object. |
void |
setQueueSession(javax.jms.QueueSession session)
Sets the Producers's QueueSession object. |
void |
setRequestTimeoutInterval(int timeout)
Sets the request timeout interval that will be used by this producer to determine when a timeout occurrs. |
boolean |
startProducer()
Starts the producer making it ready to produce messages to the Queue that it connects to. |
void |
stopProducer()
Attempts to cleanly shutdown the Producer. |
| 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 PointToPointProducer()
public PointToPointProducer(ProducerConfig pConfig)
throws java.io.IOException,
javax.jms.JMSException
ProducerConfig,
PubSubProducer| Method Detail |
protected void init(java.util.Properties props)
throws java.io.IOException
init in class MessageProducerjava.io.IOExceptionMessageProducer.init(Properties)public final int getRequestTimeoutInterval()
public final void setRequestTimeoutInterval(int timeout)
public final javax.jms.QueueConnectionFactory getQueueConnectionFactory()
See the JMS Specification to learn more about JMS objects.
public final void setQueueConnectionFactory(javax.jms.QueueConnectionFactory qcf)
See the JMS Specification to learn more about JMS objects.
public final javax.jms.Queue getQueue()
See the JMS Specification to learn more about JMS objects.
public final void setQueue(javax.jms.Queue queue)
See the JMS Specification to learn more about JMS objects.
public final javax.jms.QueueConnection getQueueConnection()
See the JMS Specification to learn more about JMS objects.
public final void setQueueConnection(javax.jms.QueueConnection queueConnection)
See the JMS Specification to learn more about JMS objects.
public final javax.jms.QueueSession getQueueSession()
See the JMS Specification to learn more about JMS objects.
public final void setQueueSession(javax.jms.QueueSession session)
See the JMS Specification to learn more about JMS objects.
public final javax.jms.QueueSender getQueueSender()
See the JMS Specification to learn more about JMS objects.
public final void setQueueSender(javax.jms.QueueSender queueSender)
See the JMS Specification to learn more about JMS objects.
public final QueueRequestor getQueueRequestor()
See the JMS Specification to learn more about JMS objects.
QueueRequestorpublic final void setQueueRequestor(QueueRequestor queueRequestor)
See the JMS Specification to learn more about JMS objects.
QueueRequestorpublic final void stopProducer()
PointToPointProducer.MonitorProducer
public boolean startProducer()
throws javax.jms.JMSException
javax.jms.JMSExceptionPubSubProducer.startPublisher(),
QueueRequestorpublic final javax.jms.TextMessage createTextMessage()
public final void produceMessage(javax.jms.Message aMessage)
throws javax.jms.JMSException
javax.jms.JMSException - if errors occur.
public final javax.jms.Message produceRequest(javax.jms.Message aMessage)
throws javax.jms.JMSException
javax.jms.JMSException - if errors occur and the producer can't successfully restart itself
and re-send the message.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||