net.sf.snmpadaptor4j.api.opennms
Class OpennmsSnmpTrapSender

java.lang.Object
  extended by net.sf.snmpadaptor4j.api.opennms.OpennmsSupport
      extended by net.sf.snmpadaptor4j.api.opennms.OpennmsSnmpTrapSender
All Implemented Interfaces:
SnmpTrapSender

public final class OpennmsSnmpTrapSender
extends OpennmsSupport
implements SnmpTrapSender

SNMP trap sender implementation for joesnmp API.

Author:
Jean-Philippe MINETTI

Nested Class Summary
protected  class OpennmsSnmpTrapSender.NullHandler
          Null SNMP handler.
 
Field Summary
 
Fields inherited from class net.sf.snmpadaptor4j.api.opennms.OpennmsSupport
logger
 
Method Summary
 void close()
          Closes the connection with the SNMP manager.
 String getName()
          Returns the name given to SNMP manager.
 boolean isConnected()
          Returns TRUE if the connection is established to the SNMP manager.
 void open()
          Opens the connection to the SNMP manager.
 void send(SnmpTrap trap)
          Sends a SNMP trap to the manager.
 String toString()
           
 
Methods inherited from class net.sf.snmpadaptor4j.api.opennms.OpennmsSupport
newJmxValue, newSnmpValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getName

public String getName()
Description copied from interface: SnmpTrapSender
Returns the name given to SNMP manager.

Specified by:
getName in interface SnmpTrapSender
Returns:
Name given to SNMP manager.

open

public void open()
          throws Exception
Description copied from interface: SnmpTrapSender
Opens the connection to the SNMP manager.

Specified by:
open in interface SnmpTrapSender
Throws:
Exception - Exception if an error has occurred.

close

public void close()
Description copied from interface: SnmpTrapSender
Closes the connection with the SNMP manager.

Specified by:
close in interface SnmpTrapSender

isConnected

public boolean isConnected()
Description copied from interface: SnmpTrapSender
Returns TRUE if the connection is established to the SNMP manager.

Specified by:
isConnected in interface SnmpTrapSender
Returns:
TRUE if the connection is established.

send

public void send(SnmpTrap trap)
          throws Exception
Description copied from interface: SnmpTrapSender
Sends a SNMP trap to the manager.

Specified by:
send in interface SnmpTrapSender
Parameters:
trap - Object representing a specific or generic SNMP trap.
Throws:
Exception - Exception if an error has occurred.

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2012-2013 snmpAdaptor4j. All Rights Reserved.