net.sf.snmpadaptor4j.api
Interface SnmpTrapSender

All Known Implementing Classes:
OpennmsSnmpTrapSender

public interface SnmpTrapSender

Object responsible for sending of SNMP traps to one manager.

Classes implementing this interface encapsulate the SNMP API. To change the API, just create a new implementation of SnmpTrapSender.

Author:
Jean-Philippe MINETTI

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.
 

Method Detail

getName

String getName()
Returns the name given to SNMP manager.

Returns:
Name given to SNMP manager.

open

void open()
          throws Exception
Opens the connection to the SNMP manager.

Throws:
Exception - Exception if an error has occurred.

close

void close()
Closes the connection with the SNMP manager.


isConnected

boolean isConnected()
Returns TRUE if the connection is established to the SNMP manager.

Returns:
TRUE if the connection is established.

send

void send(SnmpTrap trap)
          throws Exception
Sends a SNMP trap to the manager.

Parameters:
trap - Object representing a specific or generic SNMP trap.
Throws:
Exception - Exception if an error has occurred.


Copyright © 2012-2013 snmpAdaptor4j. All Rights Reserved.