org.openorb.notify.queue
Class Pusher

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--org.openorb.notify.NotifyThread
              |
              +--org.openorb.notify.queue.Pusher
All Implemented Interfaces:
java.lang.Runnable, ThreadManagement
Direct Known Subclasses:
AnyPusher, SequencePusher, StructuredPusher

public abstract class Pusher
extends NotifyThread

This class is the base class for the various types of Pusher subclasses (e.g. AnyPusher, SequencePusher, etc) and contains all of the common code.

Author:
Shawn Boyce

Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
Pusher(java.lang.String id, EventQueue queue, ConsumerProxyManagement proxy, org.omg.CORBA.ORB orb, org.apache.avalon.framework.logger.Logger logger)
          Default constructor
 
Method Summary
 void pushEvent(java.lang.Object event)
          This method is invoked by the proxy upon receipt of a new event.
 void run()
          The run method waits for new events and pushes them in the queue
 void setConnectionActive(boolean isConnectionActive)
          This method sets the connection activity
 void stopThread()
          Stop the thread
 
Methods inherited from class org.openorb.notify.NotifyThread
finishWorkAndStopThread, resumeThread, startThread, suspendThread
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Pusher

public Pusher(java.lang.String id,
              EventQueue queue,
              ConsumerProxyManagement proxy,
              org.omg.CORBA.ORB orb,
              org.apache.avalon.framework.logger.Logger logger)
Default constructor
Method Detail

setConnectionActive

public void setConnectionActive(boolean isConnectionActive)
This method sets the connection activity

pushEvent

public void pushEvent(java.lang.Object event)
This method is invoked by the proxy upon receipt of a new event. If the class is threaded ( call to start() ) then it returns immediatly. Else it returns after delivering the event to the connected consumer.

run

public void run()
The run method waits for new events and pushes them in the queue
Overrides:
run in class java.lang.Thread

stopThread

public void stopThread()
Stop the thread
Overrides:
stopThread in class NotifyThread