|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Thread com.softwareag.entirex.aci.PublicationListener
public class PublicationListener
A simple listener for publications. This listener starts receiving after
calling start
. To stop the listener, use
stopListener
. The listener stops after a wait time of 10
seconds. If the listener receives the last message of a publication, it
commits this publication and starts receiving messages with a new
publication.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary |
---|
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
PublicationListener(Broker broker,
java.lang.String topicName,
java.lang.String wait,
MessageListener listener)
Creates a PublicationListener with a
MessageListener . |
Method Summary | |
---|---|
BrokerException |
getLastException()
Gets the last BrokerException which occurred in the run
method of this listener. |
void |
run()
Receives messages in publications. |
void |
stopListener()
Stop the listener. |
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PublicationListener(Broker broker, java.lang.String topicName, java.lang.String wait, MessageListener listener)
PublicationListener
with a
MessageListener
.
broker
- the Broker
object.topicName
- the name of the topic.wait
- the wait time for the receive calls.listener
- the object implementing the onMessage
method.Method Detail |
---|
public void run()
stopListener
or if a BrokerException
occurs.
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public void stopListener()
public BrokerException getLastException()
run
method of this listener.
BrokerException
.
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |