|
|||||||||||
| 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.PubSubProducer
The PubSubProducer produces messages to a JMS Topic.
PointToPointProducer,
PubSubConsumer| Nested Class Summary | |
protected class |
PubSubProducer.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 TemporaryTopic. |
| 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 | |
PubSubProducer()
|
|
PubSubProducer(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. |
PubSubProducer |
getLoggingProducer()
Returns the Logging Producer associated to this producer which is simply another PubSubProducer that may be configured in the deployment document to publish messages published by this producer to a second "logging" destination. |
javax.jms.Topic |
getTopic()
Returns the Producers's Topic object. |
javax.jms.TopicConnection |
getTopicConnection()
Returns the Producers's TopicConnection object. |
javax.jms.TopicConnectionFactory |
getTopicConnectionFactory()
Returns the Producers's TopicConnectionFactory object. |
javax.jms.TopicPublisher |
getTopicPublisher()
Returns the Producers's TopicPublisher object. |
javax.jms.TopicSession |
getTopicSession()
Returns the Producers's TopicSession object. |
boolean |
publishMessage(javax.jms.Message aMessage)
Publishes the message passed in to the Topic the producer is connected to. |
void |
setLoggingProducer(PubSubProducer producer)
Sets the Logging Producer associated to this producer which is simply another PubSubProducer that may be configured in the deployment document to publish messages published by this producer to a second "logging" destination. |
void |
setTopic(javax.jms.Topic topic)
Sets the Producers's Topic object. |
void |
setTopicConnection(javax.jms.TopicConnection topicConnection)
Sets the Producers's TopicConnection object. |
void |
setTopicConnectionFactory(javax.jms.TopicConnectionFactory tcf)
Sets the Producers's TopicConnectionFactory object. |
void |
setTopicPublisher(javax.jms.TopicPublisher topicPublisher)
Sets the Producers's TopicPublisher object. |
void |
setTopicSession(javax.jms.TopicSession session)
Sets the Producers's TopicSession object. |
boolean |
startPublisher()
Starts the producer making it ready to publish messages to the Topic that it connects to. |
void |
stopPublisher()
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 PubSubProducer()
public PubSubProducer(ProducerConfig pConfig)
throws java.io.IOException,
javax.jms.JMSException
ProducerConfig,
PointToPointProducer| Method Detail |
public final javax.jms.TopicConnectionFactory getTopicConnectionFactory()
See the JMS Specification to learn more about JMS objects.
public final void setTopicConnectionFactory(javax.jms.TopicConnectionFactory tcf)
See the JMS Specification to learn more about JMS objects.
public final javax.jms.Topic getTopic()
See the JMS Specification to learn more about JMS objects.
public final void setTopic(javax.jms.Topic topic)
See the JMS Specification to learn more about JMS objects.
public final javax.jms.TopicConnection getTopicConnection()
See the JMS Specification to learn more about JMS objects.
public final void setTopicConnection(javax.jms.TopicConnection topicConnection)
See the JMS Specification to learn more about JMS objects.
public final javax.jms.TopicSession getTopicSession()
See the JMS Specification to learn more about JMS objects.
public final void setTopicSession(javax.jms.TopicSession session)
See the JMS Specification to learn more about JMS objects.
public final javax.jms.TopicPublisher getTopicPublisher()
See the JMS Specification to learn more about JMS objects.
public final void setTopicPublisher(javax.jms.TopicPublisher topicPublisher)
See the JMS Specification to learn more about JMS objects.
public final void setLoggingProducer(PubSubProducer producer)
ProducerConfigpublic final PubSubProducer getLoggingProducer()
ProducerConfigpublic final void stopPublisher()
PubSubProducer.MonitorProducer
public final boolean startPublisher()
throws javax.jms.JMSException
javax.jms.JMSExceptionPointToPointProducer.startProducer()public final javax.jms.TextMessage createTextMessage()
public final boolean publishMessage(javax.jms.Message aMessage)
throws javax.jms.JMSException
If the "logging producer" is started, the message will also be published to the Topic it is connected to.
javax.jms.JMSException - if errors occur.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||