com.ibm.di.queue
Class QNotification

java.lang.Object
  extended by java.lang.Thread
      extended by com.ibm.di.queue.QNotification
All Implemented Interfaces:
Runnable

public class QNotification
extends Thread


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
static int OP_AVAILABLE
           
static int OP_EMPTY
           
static int OP_FULL
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
QNotification(Log l, MemBufferQ src)
           
 
Method Summary
 void register(QCallback a, int purpose)
          register : registers a callback which will be called when memQ is empty/full/data available it is assumed that the callback implements the handle()function
 void run()
          run : the thread run method issues full/empty/data available triggers to objects registered for respective triggers
 void setPurpose(int p)
          setPurpose set the operation that should be handled
 void unregister(QCallback a, int purpose)
          unregister : unregisters a callback
 
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
 

Field Detail

OP_FULL

public static final int OP_FULL
See Also:
Constant Field Values

OP_EMPTY

public static final int OP_EMPTY
See Also:
Constant Field Values

OP_AVAILABLE

public static final int OP_AVAILABLE
See Also:
Constant Field Values
Constructor Detail

QNotification

public QNotification(Log l,
                     MemBufferQ src)
Method Detail

setPurpose

public void setPurpose(int p)
setPurpose set the operation that should be handled

Parameters:
p - full/empty/data available

register

public void register(QCallback a,
                     int purpose)
register : registers a callback which will be called when memQ is empty/full/data available it is assumed that the callback implements the handle()function

Parameters:
a - object to be triggered
purpose - full/empty/data available

unregister

public void unregister(QCallback a,
                       int purpose)
                throws Exception
unregister : unregisters a callback

Parameters:
a - object to be unregistered
purpose - full/empty/data available if -1 unregister the object from all callbacks
Throws:
Exception - if callback object is not found

run

public void run()
run : the thread run method issues full/empty/data available triggers to objects registered for respective triggers

Specified by:
run in interface Runnable
Overrides:
run in class Thread