|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsnmp.SNMPv1AgentInterface
The class SNMPv1AgentInterface implements an interface for responding to requests sent from a remote SNMP manager. The agent simply listens for requests for information, and passes requested OIDs on to concrete subclasses of SNMPRequestListener. These are expected to retrieve requested information from the system, and return this to the agent interface for inclusion in a response to the manager. The approach is that from version 1 of SNMP, using no encryption of data. Communication occurs via UDP, using port 162, the standard SNMP trap port, as the destination port.
Field Summary | |
static int |
MAXSIZE
|
static int |
SNMP_PORT
|
Constructor Summary | |
SNMPv1AgentInterface(int version)
Construct a new agent object to listen for requests from remote SNMP managers. |
|
SNMPv1AgentInterface(int version,
int localPort)
Construct a new agent object to listen for requests from remote SNMP managers. |
Method Summary | |
void |
addRequestListener(SNMPRequestListener listener)
|
void |
removeRequestListener(SNMPRequestListener listener)
|
void |
run()
The run() method for the agent interface's listener. |
void |
startReceiving()
Start listening for requests from remote managers. |
void |
stopReceiving()
Stop listening for requests from remote managers. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int SNMP_PORT
public static final int MAXSIZE
Constructor Detail |
public SNMPv1AgentInterface(int version) throws java.net.SocketException
public SNMPv1AgentInterface(int version, int localPort) throws java.net.SocketException
Method Detail |
public void addRequestListener(SNMPRequestListener listener)
public void removeRequestListener(SNMPRequestListener listener)
public void startReceiving()
public void stopReceiving() throws java.net.SocketException
java.net.SocketException
public void run()
run
in interface java.lang.Runnable
Thread.run()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |