public class SnmpPeer extends Object implements Cloneable
SnmpSession, 
SnmpPeer| Modifier and Type | Field and Description | 
|---|---|
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 and Description | 
|---|
SnmpPeer(InetAddress peer)
Class constructor. 
 | 
SnmpPeer(InetAddress peer,
        int port)
Class constructor. 
 | 
SnmpPeer(SnmpPeer second)
Class copy constructor. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
Object | 
clone()
Used to get a newly created copy of the current object. 
 | 
SnmpParameters | 
getParameters()
Retuns the current parameters for the peer agent. 
 | 
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(InetAddress addr)
Used to set the peer's internet address for the remote agent. 
 | 
void | 
setPeer(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. 
 | 
public static final int defaultRemotePort
public static final int defaultRetries
public static final int defaultTimeout
public SnmpPeer(InetAddress peer)
peer - The remote internet addresspublic SnmpPeer(InetAddress peer, int port)
peer - The remote agent addressport - The SNMP port on the remotepublic SnmpPeer(SnmpPeer second)
second - The peer object to copy.public InetAddress getPeer()
public void setPeer(InetAddress addr)
addr - The remote agents internet addresspublic void setPeer(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)
params - The SnmpParameters for the peer.Copyright © 2020. All rights reserved.