org.opennms.netmgt.syslogd
Class SyslogHandler

java.lang.Object
  extended by org.opennms.netmgt.syslogd.SyslogHandler

public final class SyslogHandler
extends Object

This class implements the User Datagram Protocol (UDP) event receiver. When the an agent sends an event via UDP/IP the receiver will process the event and then add the UUIDs to the internal list. If the event is successfully processed then an event-receipt is returned to the caller.

Author:
Johan Edstrom, Brian Weaver , Oculan Corporation

Nested Class Summary
static interface SyslogHandler.EventHandler
           
 
Field Summary
static int RUNNING
          This state is used to define the normal runtime condition of a Fiber.
static int START_PENDING
          This is the initial Fiber state.
static int STARTING
          This state is used to define when a Fiber has begun the initilization process.
static String[] STATUS_NAMES
          The string names that correspond to the states of the fiber.
static int STOP_PENDING
          This state is used to denote when the Fiber is terminating processing.
static int STOPPED
          This state represents the final resting state of a Fiber.
 
Constructor Summary
SyslogHandler()
           
 
Method Summary
 void destroy()
           
 String getName()
           
 Integer getPort()
           
 int getStatus()
           
 void init()
           
 void setLogPrefix(String prefix)
          Removes an event handler from the list of handler called when an event is received.
 void setPort(Integer port)
           
static void setSyslogConfig(SyslogdConfig syslogdConfig)
           
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STATUS_NAMES

public static final String[] STATUS_NAMES
The string names that correspond to the states of the fiber.


START_PENDING

public static final int START_PENDING
This is the initial Fiber state. When the Fiber begins it startup process it will transition to the STARTING state. A Fiber in a start pending state has not begun any of the initilization process.

See Also:
Constant Field Values

STARTING

public static final int STARTING
This state is used to define when a Fiber has begun the initilization process. Once the initilization process is completed the Fiber will transition to a RUNNING status.

See Also:
Constant Field Values

RUNNING

public static final int RUNNING
This state is used to define the normal runtime condition of a Fiber. When a Fiber is in this state then it is processing normally.

See Also:
Constant Field Values

STOP_PENDING

public static final int STOP_PENDING
This state is used to denote when the Fiber is terminating processing. This state is always followed by the state ST0PPED.

See Also:
Constant Field Values

STOPPED

public static final int STOPPED
This state represents the final resting state of a Fiber. Depending on the implementation it may be possible to resurect the Fiber from this state.

See Also:
Constant Field Values
Constructor Detail

SyslogHandler

public SyslogHandler()
Method Detail

setSyslogConfig

public static void setSyslogConfig(SyslogdConfig syslogdConfig)

start

public void start()

stop

public void stop()

getName

public String getName()

getStatus

public int getStatus()

init

public void init()

destroy

public void destroy()

setPort

public void setPort(Integer port)

getPort

public Integer getPort()

setLogPrefix

public void setLogPrefix(String prefix)
Removes an event handler from the list of handler called when an event is received. The handler is removed based upon the method equals() inherieted from the Object class.

A reference to the event handler.



Copyright © 2009. All Rights Reserved.