|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.adventnet.snmp.snmp2.agent.MultipleAgent
public class MultipleAgent
This class instatiates multiple SnmpAgents on different IpAddresses specified by a IpAddressfile.
In a single JVM you could have a multiple instance of SnmpAgent.
SnmpAgent| Constructor Summary | |
|---|---|
MultipleAgent()
Constructor for MultipleAgent. |
|
| Method Summary | |
|---|---|
void |
addSnmpPduRequestListener(SnmpPduRequestListener p1)
Adds a Listener to which the pdu is forwarded. |
void |
finalize()
Destructor for MultipleAgent stop all SnmpAgents. |
java.lang.String |
getIpAddrFileName()
The ipAddrFileName , contains ipAddresses on which the agent are running |
int |
getPort()
The port on which agents are running |
void |
removeSnmpPduRequestListener(SnmpPduRequestListener p1)
Removes the Listener registered for this uni-cast bean. |
void |
restartMultipleSnmpAgent()
Restarts the receiver Thread for receiving requests. |
void |
setIpAddrFileName(java.lang.String ipAddrFileName)
The file name which has localAddresses on which the agent are going to listen for requests on. |
void |
setPort(int port)
The port on which the agents are going to run. |
void |
stopMultipleSnmpAgent()
Stops the receiver Thread and closes the socket used by this agent. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MultipleAgent()
| Method Detail |
|---|
public void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwable - If it is not able stop the Agents.
public void setPort(int port)
throws AgentRuntimeException
This restarts all SnmpAgents at the specified port.
port - The udp port number to whcih the SnmpSession is start.
AgentRuntimeException - If the Port is already in use.getPort()public int getPort()
setPort()public void setIpAddrFileName(java.lang.String ipAddrFileName)
It stops all agents which are currently running and restarts Agents on new ipAddresses specified in the file.
ipAddrFileName - file contains the addresses.getIpAddrFileName()public java.lang.String getIpAddrFileName()
setIpAddrFileName()
public void addSnmpPduRequestListener(SnmpPduRequestListener p1)
throws RegistrationListenerException
p1 - The SnmpPduRequestListener to be added.
java.util.TooManyListenersException - if already there is a
SnmpPduRequestListener is registered.
RegistrationListenerExceptionpublic void removeSnmpPduRequestListener(SnmpPduRequestListener p1)
p1 - The Snmp PDU Request listener that is to be removed.
public void restartMultipleSnmpAgent()
throws AgentRuntimeException
AgentRuntimeException - If unable to restart the Snmp Agents.public void stopMultipleSnmpAgent()
This thread doesn't kill all the threads and sessions.
SnmpStore
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||