OpenNMS API 1.1.3

org.opennms.netmgt.utils
Class TcpEventProxy

java.lang.Object
  extended byorg.opennms.netmgt.utils.TcpEventProxy
All Implemented Interfaces:
EventProxy

public final class TcpEventProxy
extends java.lang.Object
implements EventProxy

This is the interface used to send events into the event subsystem - It is typically used by the poller framework plugins that perform service monitoring to send out aprropriate events. Can also be used by capsd, discovery etc.

Author:
Sowmya Kumaraswamy, OpenNMS

Field Summary
private static java.net.InetAddress DEFAULT_HOST
           
private static int DEFAULT_PORT
           
private  int m_port
           
private  java.lang.Thread m_rdrThread
           
private  java.io.Reader m_reader
           
private  java.net.Socket m_sock
           
private  java.net.InetAddress m_target
           
private  java.io.Writer m_writer
           
 
Constructor Summary
TcpEventProxy()
           
TcpEventProxy(java.net.InetAddress target)
           
TcpEventProxy(java.net.InetAddress target, int port)
           
TcpEventProxy(int port)
           
 
Method Summary
 void close()
           
protected  void finalize()
           
 void send(Event event)
          This method is called to send the event out
 void send(Log eventLog)
          This method is called to send an event log containing multiple events out
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_PORT

private static final int DEFAULT_PORT
See Also:
Constant Field Values

DEFAULT_HOST

private static final java.net.InetAddress DEFAULT_HOST

m_target

private java.net.InetAddress m_target

m_port

private int m_port

m_sock

private java.net.Socket m_sock

m_writer

private java.io.Writer m_writer

m_reader

private java.io.Reader m_reader

m_rdrThread

private java.lang.Thread m_rdrThread
Constructor Detail

TcpEventProxy

public TcpEventProxy()
              throws java.io.IOException

TcpEventProxy

public TcpEventProxy(int port)
              throws java.io.IOException

TcpEventProxy

public TcpEventProxy(java.net.InetAddress target)
              throws java.io.IOException

TcpEventProxy

public TcpEventProxy(java.net.InetAddress target,
                     int port)
              throws java.io.IOException
Method Detail

close

public void close()

finalize

protected void finalize()
                 throws java.lang.Throwable
Throws:
java.lang.Throwable

send

public void send(Event event)
This method is called to send the event out

Specified by:
send in interface EventProxy
Parameters:
event - the event to be sent out
Throws:
java.lang.RuntimeException - thrown if the send fails for any reason

send

public void send(Log eventLog)
This method is called to send an event log containing multiple events out

Specified by:
send in interface EventProxy
Parameters:
eventLog - the events to be sent out
Throws:
java.lang.RuntimeException - thrown if the send fails for any reason

OpenNMS API 1.1.3

Generated by root on August 18 2004 0350.