OpenNMS API 1.2.9

## org.opennms.netmgt.eventd
Class EventIpcManagerDefaultImpl

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

All Implemented Interfaces:
  EventIpcManager

public class EventIpcManagerDefaultImpl
extends java.lang.Object
implements EventIpcManager

An implementation of the EventIpcManager interface that can be used to communicate between services in the same JVM

Author:
  Sowmya Nataraj , OpenNMS.org

Nested Class Summary
`private class` `EventIpcManagerDefaultImpl.ListenerThread` A thread dedicated to each listener.

Field Summary
`private RunnableConsumerThreadPool` `m_eventHandlerPool` The thread pool handling the events
`private java.lang.String` `m_getNextEventIdStr` The query string to get the next event id from the database sequence
`private java.util.List` `m_listeners` The list of event listeners interested in all events
`private java.util.HashMap` `m_listenerThreads` Hashtable of event listener threads keyed by the listener's id
`private java.util.HashMap` `m_ueiListeners` Hashtable of list of event listeners keyed by event UEI

Constructor Summary
`EventIpcManagerDefaultImpl()` Constructor

Method Summary
`void` `addEventListener(EventListener listener)` Register an event listener that is interested in all events
`void` `addEventListener(EventListener listener, java.util.List ueilist)` Register an event listener interested in the UEIs in the passed list
`void` `addEventListener(EventListener listener, java.lang.String uei)` Register an event listener interested in the passed UEI
`void` `broadcastNow(Event event)` Called by eventd to send an event to all interested listeners
`void` `removeEventListener(EventListener listener)` Removes a registered event listener.
`void` `removeEventListener(EventListener listener, java.util.List ueilist)` Removes a registered event listener.
`void` `removeEventListener(EventListener listener, java.lang.String uei)` Removes a registered event listener.
`void` `sendNow(Event event)` Called by a service to send an event to other listeners.
`void` `sendNow(Log eventLog)` Called by a service to send a set of events to other listeners.

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

Field Detail

### m_ueiListeners

    private java.util.HashMap m_ueiListeners

  Hashtable of list of event listeners keyed by event UEI

### m_listeners

    private java.util.List m_listeners

  The list of event listeners interested in all events

### m_listenerThreads

    private java.util.HashMap m_listenerThreads

  Hashtable of event listener threads keyed by the listener's id

### m_eventHandlerPool

    private RunnableConsumerThreadPool m_eventHandlerPool

  The thread pool handling the events

### m_getNextEventIdStr

    private java.lang.String m_getNextEventIdStr

  The query string to get the next event id from the database sequence

Constructor Detail

### EventIpcManagerDefaultImpl

    public EventIpcManagerDefaultImpl()

  Constructor

Method Detail

### sendNow

    public void sendNow(Event event)

  Called by a service to send an event to other listeners.

  Specified by:
    `sendNow` in interface `EventIpcManager`

### sendNow

    public void sendNow(Log eventLog)

  Called by a service to send a set of events to other listeners.

  Specified by:
    `sendNow` in interface `EventIpcManager`

### broadcastNow

    public void broadcastNow(Event event)

  Called by eventd to send an event to all interested listeners

  Specified by:
    `broadcastNow` in interface `EventIpcManager`

### addEventListener

    public void addEventListener(EventListener listener)

  Register an event listener that is interested in all events

  Specified by:
    `addEventListener` in interface `EventIpcManager`

### addEventListener

    public void addEventListener(EventListener listener,
                                 java.util.List ueilist)

  Register an event listener interested in the UEIs in the passed list

  Specified by:
    `addEventListener` in interface `EventIpcManager`

### addEventListener

    public void addEventListener(EventListener listener,
                                 java.lang.String uei)

  Register an event listener interested in the passed UEI

  Specified by:
    `addEventListener` in interface `EventIpcManager`

### removeEventListener

    public void removeEventListener(EventListener listener,
                                    java.util.List ueilist)

  Removes a registered event listener. The UEI list indicates the list of events the listener is no more interested in. Note: The listener thread for this listener is not stopped until the 'removeListener(EventListener listener)' method is called.

  Specified by:
    `removeEventListener` in interface `EventIpcManager`

### removeEventListener

    public void removeEventListener(EventListener listener,
                                    java.lang.String uei)

  Removes a registered event listener. The UEI indicates one the listener is no more interested in. Note: The listener thread for this listener is not stopped until the 'removeListener(EventListener listener)' method is called.

  Specified by:
    `removeEventListener` in interface `EventIpcManager`

### removeEventListener

    public void removeEventListener(EventListener listener)

  Removes a registered event listener. Note: Only this method stops the listener thread for the listener passed.

  Specified by:
    `removeEventListener` in interface `EventIpcManager`

OpenNMS API 1.2.9

Generated by ranger on May 19 2007 2335.