TibrvDispatcher
Class
Declaration
class com.tibco.tibrv.TibrvDispatcher
extends java.lang.Thread
Purpose
Dispatch events from a queue or queue group.
Remarks
Upon creation, this thread class loops indefinitely, repeatedly dispatching a queue or queue group.
This class is a programming convenience. Programs can implement specialized dispatcher threads, and use them instead of this class.
Exceptions
If the thread catches a TibrvException, it presents the DISPATCHER.THREAD_EXITED
advisory on the process transport, and exits. (The program destroyed the queue or queue group object, so this thread can no longer dispatch it.)
If the thread catches an interruption (java.lang.InterruptedException
), it presents the DISPATCHER.THREAD_EXITED
advisory on the process transport, and exits.
Interrupting a Dispatcher Thread
To interrupt a dispatcher thread in the Java implementation (see Tibrv.open()), use either the Java method Thread.interrupt()
or TibrvDispatcher.destroy()
.
In either the JNI (native) implementation or the Java implementation, you can interrupt a dispatcher thread by calling its TibrvDispatcher.destroy()
method. Destroying the thread insures prompt thread exit—at the latest, after the return of a program callback method (if one is in progress).
Method |
Description |
Constant |
Description |
|
When the constructor does not receive a thread name, it gives the new dispatcher thread this default name. |
Inherited Methods |
|
|