|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object snmp.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 | |
int |
receiveBufferSize
|
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. |
|
SNMPv1AgentInterface(int version,
int localPort,
java.io.PrintWriter errorReceiver)
Construct a new agent object to listen for requests from remote SNMP managers. |
|
SNMPv1AgentInterface(int version,
java.io.PrintWriter errorReceiver)
Construct a new agent object to listen for requests from remote SNMP managers. |
Method Summary | |
void |
addRequestListener(SNMPRequestListener listener)
|
int |
getReceiveBufferSize()
Returns the current size of the buffer used to receive response packets. |
void |
removeRequestListener(SNMPRequestListener listener)
|
void |
run()
The run() method for the agent interface's listener. |
void |
setErrorReceiver(java.io.PrintWriter errorReceiver)
Set the specified PrintWriter to receive error messages. |
void |
setReceiveBufferSize(int receiveBufferSize)
Set the size of the buffer used to receive response packets. |
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 int receiveBufferSize
Constructor Detail |
public SNMPv1AgentInterface(int version) throws java.net.SocketException
public SNMPv1AgentInterface(int version, int localPort) throws java.net.SocketException
public SNMPv1AgentInterface(int version, java.io.PrintWriter errorReceiver) throws java.net.SocketException
public SNMPv1AgentInterface(int version, int localPort, java.io.PrintWriter errorReceiver) throws java.net.SocketException
Method Detail |
public void setErrorReceiver(java.io.PrintWriter errorReceiver)
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
public void setReceiveBufferSize(int receiveBufferSize)
public int getReceiveBufferSize()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |