OpenNMS API 1.2.9

## org.opennms.netmgt.eventd.adaptors.udp
Class UdpProcessor

    java.lang.Object
      org.opennms.netmgt.eventd.adaptors.udp.UdpProcessor

All Implemented Interfaces:
  java.lang.Runnable

final class UdpProcessor
extends java.lang.Object
implements java.lang.Runnable

This class encapsulates the execution context for processing events received via UDP from remote agents. This is a separate event context to allow the event receiver to do minimum work to avoid dropping packets from the agents.

Author:
  Brian Weaver , Oculan Corporation

Field Summary
`private java.lang.Thread` `m_context` The UDP receiver thread.
`private java.net.DatagramSocket` `m_dgSock` The UDP socket for receipt and transmission of packets from agents.
`private java.util.List` `m_eventsIn` The list of incomming events.
`private java.util.List` `m_eventUuidsOut` The list of outgoing event-receipts by UUID.
`private java.util.List` `m_handlers` The list of registered event handlers.
`private java.lang.String` `m_logPrefix` The log prefix
`private boolean` `m_stop` The stop flag

Constructor Summary
`(package private)` `UdpProcessor(java.util.List handlers, java.util.List in, java.util.List out)`

Method Summary
`(package private) boolean` `isAlive()` Returns true if the thread is still alive
`void` `run()` The event processing execution context.
`(package private) void` `setLogPrefix(java.lang.String prefix)`
`(package private) void` `stop()` Stops the current context

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

Field Detail

### m_context

    private java.lang.Thread m_context

  The UDP receiver thread.

### m_eventsIn

    private java.util.List m_eventsIn

  The list of incomming events.

### m_eventUuidsOut

    private java.util.List m_eventUuidsOut

  The list of outgoing event-receipts by UUID.

### m_handlers

    private java.util.List m_handlers

  The list of registered event handlers.

### m_stop

    private volatile boolean m_stop

  The stop flag

### m_dgSock

    private java.net.DatagramSocket m_dgSock

  The UDP socket for receipt and transmission of packets from agents.

### m_logPrefix

    private java.lang.String m_logPrefix

  The log prefix

Constructor Detail

### UdpProcessor

    UdpProcessor(java.util.List handlers,
                 java.util.List in,
                 java.util.List out)

Method Detail

### isAlive

    boolean isAlive()

  Returns true if the thread is still alive

### stop

    void stop()
        throws java.lang.InterruptedException

  Stops the current context

  Throws:
    `java.lang.InterruptedException`

### run

    public void run()

  The event processing execution context.

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

### setLogPrefix

    void setLogPrefix(java.lang.String prefix)

OpenNMS API 1.2.9

Generated by ranger on May 19 2007 2335.