|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opennms.protocols.snmp.SnmpPeer
The peer object defines a SNMP peer agent that is communicated with. The SnmpPeer object is used by the SnmpSession class to define the remote agent. The information includes the peer's port and address. Also included is the number of retries and timeouts that should be used when sending packets to the agent.
SnmpSession,
SnmpPeer| Field Summary | |
static int |
defaultRemotePort
The default remote port. |
static int |
defaultRetries
The library default for the number of retries. |
static int |
defaultTimeout
The library default for the number of milliseconds to wait for a reply from the remote agent. |
| Constructor Summary | |
SnmpPeer(java.net.InetAddress peer)
Class constructor. |
|
SnmpPeer(java.net.InetAddress peer,
int port)
Class constructor. |
|
SnmpPeer(SnmpPeer second)
Class copy constructor. |
|
| Method Summary | |
java.lang.Object |
clone()
Used to get a newly created copy of the current object. |
SnmpParameters |
getParameters()
Retuns the current parameters for the peer agent. |
java.net.InetAddress |
getPeer()
Returns the peer agent's internet address to the caller |
int |
getPort()
Returns the remote agent's port for communications |
int |
getRetries()
Returns the currently set number of retries defined by this peer |
int |
getServerPort()
Returns the local agent's port for communications |
int |
getTimeout()
Retreives the currently configured timeout for the remote agent in milliseconds (1/1000th second). |
void |
setParameters(SnmpParameters params)
Used to set the current parameters for the SnmpPeer object. |
void |
setPeer(java.net.InetAddress addr)
Used to set the peer's internet address for the remote agent. |
void |
setPeer(java.net.InetAddress addr,
int port)
Used to set the peer's internet address and port for communications. |
void |
setPort(int port)
Used to set the remote communication port |
void |
setRetries(int retry)
Used to set the default number of retries for this peer agent. |
void |
setServerPort(int port)
Used to set the local communication port |
void |
setTimeout(int timeout)
Sets the millisecond timeout for the communications with the remote agent. |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int defaultRemotePort
public static final int defaultRetries
public static final int defaultTimeout
| Constructor Detail |
public SnmpPeer(java.net.InetAddress peer)
peer - The remote internet address
public SnmpPeer(java.net.InetAddress peer,
int port)
peer - The remote agent addressport - The snmp port on the remotepublic SnmpPeer(SnmpPeer second)
second - The peer object to copy.| Method Detail |
public java.net.InetAddress getPeer()
public void setPeer(java.net.InetAddress addr)
addr - The remote agents internet address
public void setPeer(java.net.InetAddress addr,
int port)
addr - The remote agent's internet addressport - The remote agent's portpublic int getPort()
public void setPort(int port)
port - The remote communication portpublic int getServerPort()
public void setServerPort(int port)
port - The local communication portpublic int getRetries()
public void setRetries(int retry)
retry - The new number of retries for the peerpublic int getTimeout()
public void setTimeout(int timeout)
timeout - The timeout in millisecondspublic SnmpParameters getParameters()
public void setParameters(SnmpParameters params)
public java.lang.Object clone()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||