|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A PublicationMsgProvider is the interface that defines how messages are created and produced. The caller creates an instance of a PublicationMsgProvider by using the PublicationMsgProviderFactory class. Once you have an instance, then add a listener to the provider and call dispatchMsgs. Note that dispatchMsgs is a synchronous call, so you might want to create a new thread to call dispatchMsgs.
Method Summary | |
---|---|
void |
addPublicationMsgListener(PublicationMsgListener listener)
Add a listener to get the messages. |
void |
dispatchMsgs(javax.jms.MessageConsumer messageConsumer,
int timeout,
boolean ignoreErrors)
This will start the messages to be dispatched to any listeners. |
void |
removePublicationMsgListener(PublicationMsgListener listener)
Remove a listener. |
void |
stopMsgDispatching()
This will stop the dispatching of messages, and cause the thread to return from dispatchMsgs(). |
Method Detail |
public void dispatchMsgs(javax.jms.MessageConsumer messageConsumer, int timeout, boolean ignoreErrors) throws java.lang.Exception
messageConsumer
- Dispatch messages from this JMS message queue.timeout
- The time in milliseconds before the thread returns and stops dispatching msgs.ignoreErrors
- True: Ingore any errors when dispatching & formatting msgs. Any msg
that contains an error will be thrown away.
False: Throw exception on any msg errors.
java.lang.Exception
public void stopMsgDispatching()
public void addPublicationMsgListener(PublicationMsgListener listener)
listener
- The listener will be notified of all msgs.public void removePublicationMsgListener(PublicationMsgListener listener)
listener
- The listener to remove.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |