OpenNMS API 1.2.9

## org.opennms.netmgt.eventd
Class EventIpcManagerDefaultImpl.ListenerThread

    java.lang.Object
      org.opennms.netmgt.eventd.EventIpcManagerDefaultImpl.ListenerThread

All Implemented Interfaces:
  java.lang.Runnable

Enclosing class:
  EventIpcManagerDefaultImpl

private class EventIpcManagerDefaultImpl.ListenerThread
extends java.lang.Object
implements java.lang.Runnable

A thread dedicated to each listener. The events meant for each listener is added to a dedicated queue when the 'sendNow()' is called. The ListenerThread reads events off of this queue and sends it to the appropriate listener

Field Summary
`private java.lang.Thread` `m_delegateThread` The thread that is running this runnable.
`private EventListener` `m_listener` Listener to which this thread is dedicated
`private FifoQueue` `m_queue` Queue from which events for the listener are to be read
`private boolean` `m_shutdown` if set true then the thread should exist as soon as possible.

Constructor Summary
`(package private)` `EventIpcManagerDefaultImpl.ListenerThread(EventListener listener, FifoQueue lq)` Constructor

Method Summary
`FifoQueue` `getQueue()`
`void` `run()` The run method preforms the actual work for the runnable.
`void` `start()` Starts up the thread.
`void` `stop()` Sets the stop flag in the thread.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### m_listener

    private EventListener m_listener

  Listener to which this thread is dedicated

### m_queue

    private FifoQueue m_queue

  Queue from which events for the listener are to be read

### m_delegateThread

    private java.lang.Thread m_delegateThread

  The thread that is running this runnable.

### m_shutdown

    private volatile boolean m_shutdown

  if set true then the thread should exist as soon as possible.

Constructor Detail

### EventIpcManagerDefaultImpl.ListenerThread

    EventIpcManagerDefaultImpl.ListenerThread(EventListener listener,
                                              FifoQueue lq)

  Constructor

Method Detail

### getQueue

    public FifoQueue getQueue()

### run

    public void run()

  The run method preforms the actual work for the runnable. It loops infinitely until the shutdown flag is set, during which time it processes queue elements. Each element in the queue should be a instance of `Event`. After each event is read, the 'onEvent' method of the listener is invoked.

  Specified by:
    `run` in interface `java.lang.Runnable`

### start

    public void start()

  Starts up the thread.

### stop

    public void stop()

  Sets the stop flag in the thread.

OpenNMS API 1.2.9

Generated by ranger on May 19 2007 2335.