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

TibrvDispatcher()

Create a dispatcher thread.

Constant

Description

TibrvDispatcher.DEFAULT_NAME

When the constructor does not receive a thread name, it gives the new dispatcher thread this default name.

Inherited Methods

java.lang.Thread.activeCount

java.lang.Thread.checkAccess

java.lang.Thread.countStackFrames

java.lang.Thread.currentThread

java.lang.Thread.destroy (override)

java.lang.Thread.dumpStack

java.lang.Thread.enumerate

java.lang.Thread.getContextClassLoader

java.lang.Thread.getName

java.lang.Thread.getPriority

java.lang.Thread.getThreadGroup

java.lang.Thread.interrupt

java.lang.Thread.interrupted

java.lang.Thread.isAlive

java.lang.Thread.isDaemon

java.lang.Thread.isInterrupted

java.lang.Thread.join

java.lang.Thread.resume

java.lang.Thread.run (override)

java.lang.Thread.setContextClassLoader

java.lang.Thread.setDaemon

java.lang.Thread.setName

java.lang.Thread.setPriority

java.lang.Thread.sleep

java.lang.Thread.start

java.lang.Thread.stop

java.lang.Thread.suspend

java.lang.Thread.toString

java.lang.Thread.yield

java.lang.Object.equals

java.lang.Object.getClass

java.lang.Object.hashCode

java.lang.Object.notify

java.lang.Object.notifyAll

java.lang.Object.wait

See Also

Tibrv.isNativeImpl()

Tibrv.open()

TibrvQueue.dispatch()