net.sf.snmpadaptor4j
Interface SnmpAdaptorMBean

All Known Implementing Classes:
SnmpAdaptor

public interface SnmpAdaptorMBean

JMX adaptor for SNMP protocol.

Author:
Jean-Philippe MINETTI

Method Summary
 void addAppContext(ClassLoader classLoader, SnmpAppContext appContext)
          Adds a new application context.
 String getListenerAddress()
          Returns the listening IP address of SNMP daemon (127.0.0.1 by default).
 Integer getListenerPort()
          Returns the UDP port of SNMP daemon (161 by default).
 String getListenerReadCommunity()
          Returns the read community of SNMP daemon ("public" by default).
 Integer getListenerSnmpVersion()
          Returns the protocol version of SNMP daemon (SNMP v2 by default).
 String getListenerWriteCommunity()
          Returns the write community of SNMP daemon ("private" by default).
 List<SnmpManagerConfiguration> getManagerList()
          Returns the list of managers where to send all notifications (SNMP traps).
 boolean isStarted()
          Returns TRUE if the SNMP daemon is started.
 void removeAppContext(ClassLoader classLoader)
          Removes an application context.
 void setListenerAddress(String listenerAddress)
          Sets the listening IP address of SNMP daemon.
 void setListenerPort(Integer listenerPort)
          Sets the UDP port of SNMP daemon.
 void setListenerReadCommunity(String listenerReadCommunity)
          Sets the read community of SNMP daemon.
 void setListenerSnmpVersion(Integer listenerSnmpVersion)
          Sets the protocol version of SNMP daemon.
 void setListenerWriteCommunity(String listenerWriteCommunity)
          Sets the write community of SNMP daemon.
 void start()
          Starts the SNMP daemon.
 void stop()
          Stops the SNMP daemon.
 

Method Detail

addAppContext

void addAppContext(ClassLoader classLoader,
                   SnmpAppContext appContext)
Adds a new application context.

SnmpAdaptor4j may be used by an application server. In this case you will inform the SNMP adapter to each deployment of a new application.

Parameters:
classLoader - Class loader of application.
appContext - Application context.

removeAppContext

void removeAppContext(ClassLoader classLoader)
Removes an application context.

Parameters:
classLoader - Class loader of application.

getListenerAddress

String getListenerAddress()
Returns the listening IP address of SNMP daemon (127.0.0.1 by default).

Returns:
Listening IP address.

setListenerAddress

void setListenerAddress(String listenerAddress)
Sets the listening IP address of SNMP daemon.

Parameters:
listenerAddress - Listening IP address.

getListenerPort

Integer getListenerPort()
Returns the UDP port of SNMP daemon (161 by default).

Returns:
UDP port.

setListenerPort

void setListenerPort(Integer listenerPort)
Sets the UDP port of SNMP daemon.

Parameters:
listenerPort - UDP port.

getListenerSnmpVersion

Integer getListenerSnmpVersion()
Returns the protocol version of SNMP daemon (SNMP v2 by default).

Returns:
SNMP protocol version.

setListenerSnmpVersion

void setListenerSnmpVersion(Integer listenerSnmpVersion)
Sets the protocol version of SNMP daemon.

Parameters:
listenerSnmpVersion - SNMP protocol version.

getListenerReadCommunity

String getListenerReadCommunity()
Returns the read community of SNMP daemon ("public" by default).

Returns:
Read community of SNMP daemon.

setListenerReadCommunity

void setListenerReadCommunity(String listenerReadCommunity)
Sets the read community of SNMP daemon.

Parameters:
listenerReadCommunity - Read community of SNMP daemon.

getListenerWriteCommunity

String getListenerWriteCommunity()
Returns the write community of SNMP daemon ("private" by default).

Returns:
Write community of SNMP daemon.

setListenerWriteCommunity

void setListenerWriteCommunity(String listenerWriteCommunity)
Sets the write community of SNMP daemon.

Parameters:
listenerWriteCommunity - Write community of SNMP daemon.

getManagerList

List<SnmpManagerConfiguration> getManagerList()
Returns the list of managers where to send all notifications (SNMP traps).

Returns:
List of managers.

start

void start()
           throws Exception
Starts the SNMP daemon.

Throws:
Exception - Exception if an error has occurred.

stop

void stop()
          throws Exception
Stops the SNMP daemon.

Throws:
Exception - Exception if an error has occurred.

isStarted

boolean isStarted()
Returns TRUE if the SNMP daemon is started.

Returns:
TRUE if the SNMP daemon is started.


Copyright © 2012-2013 snmpAdaptor4j. All Rights Reserved.