|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.sun.management.snmp.manager.SnmpPeer
com.sun.management.snmp.manager.usm.SnmpUsmPeer
This class models a distant SNMP V3 agent using the User based Security Model for V3 requests.
| Field Summary |
| Fields inherited from class com.sun.management.snmp.manager.SnmpPeer |
defaultSnmpRequestPktSize, defaultSnmpResponsePktSize |
| Constructor Summary | |
SnmpUsmPeer(SnmpEngine engine,
InetAddress netaddr)
Creates an SNMP peer object for a device. |
|
SnmpUsmPeer(SnmpEngine engine,
InetAddress netaddr,
SnmpEngineId id)
Creates an SNMP peer object for a device. |
|
SnmpUsmPeer(SnmpEngine engine,
String host)
Creates an SNMP peer object for a device. |
|
SnmpUsmPeer(SnmpEngine engine,
String host,
int port)
Creates an SNMP peer object for a device with the specified port. |
|
SnmpUsmPeer(SnmpEngine engine,
String host,
int port,
SnmpEngineId id)
Creates an SNMP peer object for a device with the specified port. |
|
SnmpUsmPeer(SnmpEngine engine,
String host,
SnmpEngineId id)
Creates an SNMP peer object for a device. |
|
| Method Summary | |
int |
getEngineBoots()
Returns the nb boots of the distant engine. |
SnmpEngineId |
getEngineId()
Returns the distant engine Id or null if not yet known. |
int |
getEngineTime()
Returns the time of the distant engine. |
boolean |
isAuthoritative()
A peer is authoritative if the remote engine Id is useless when making requests. |
boolean |
isTimelinessSynchronized()
Test is the peer is synchronized with distant Engine time and boots. |
void |
processUsmTimelinessDiscovery()
Call this method in order to discover Usm timeliness needed infos. |
void |
setParams(SnmpParams p)
Set the params used when making requests. |
| Methods inherited from class com.sun.management.snmp.manager.SnmpPeer |
allowSnmpSets, equals, getAvgRtt, getDestAddr, getDestAddrList, getDestPort, getDevName, getMaxRtt, getMaxSnmpPktSize, getMaxTries, getMinRtt, getParams, getTimeout, getVarBindLimit, ipAddressInUse, setDestPort, setMaxSnmpPktSize, setMaxTries, setTimeout, setVarBindLimit, toString, useAddressList, useIPAddress, useNextAddress |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public SnmpUsmPeer(SnmpEngine engine,
String host)
throws UnknownHostException,
SnmpUnknownModelException,
SnmpStatusException
engine - The SNMP engine.host - The peer name.
UnknownHostException - If the host name cannot be resolved.
SnmpUnknownModelException - If Usm is not present in the passed engine.
SnmpStatusException - If an error occurred when discovering the distant engine Id.
public SnmpUsmPeer(SnmpEngine engine,
InetAddress netaddr)
throws SnmpUnknownModelException,
SnmpStatusException
engine - The SNMP engine.netaddr - The peer InetAddress.
SnmpUnknownModelException - If Usm is not present in the passed engine.
SnmpStatusException - If an error occurred when discovering the distant engine Id.
public SnmpUsmPeer(SnmpEngine engine,
String host,
int port)
throws UnknownHostException,
SnmpUnknownModelException,
SnmpStatusException
engine - The SNMP engine.host - The peer name.port - The port number.
UnknownHostException - If the host name cannot be resolved.
SnmpUnknownModelException - If Usm is not present in the passed engine.
SnmpStatusException - If an error occurred when discovering the distant engine Id.
public SnmpUsmPeer(SnmpEngine engine,
String host,
SnmpEngineId id)
throws UnknownHostException,
SnmpUnknownModelException,
SnmpStatusException
engine - The SNMP engine.host - The peer name.id - The remote agent engine Id. If no discovery is to be done and the engine Id is useless (when sending trap from the SnmpV3AdaptorServer , null can be provided as the engineId. Having null as engineId will make the other requests to fail (thrown of a SnmpStatusException/CODE> when sending get, set, inform, ...).
- Throws:
UnknownHostException - If the host name cannot be resolved.
SnmpUnknownModelException - If Usm is not present in the passed engine.
SnmpStatusException - If the passed engine Id is equal to the local engine Id.
public SnmpUsmPeer(SnmpEngine engine,
InetAddress netaddr,
SnmpEngineId id)
throws SnmpUnknownModelException,
SnmpStatusException
engine - The SNMP engine.netaddr - The peer InetAddress.id - The remote agent engine Id. If no discovery is to be done and the engine Id is useless (when sending trap from the SnmpV3AdaptorServer , null can be provided as the engineId. Having null as engineId will make the other requests to fail (thrown of a SnmpStatusException when sending get, set, inform, ...).
SnmpUnknownModelException - If Usm is not present in the passed engine.
SnmpStatusException - If the passed engine Id is equal to the local engine Id.
public SnmpUsmPeer(SnmpEngine engine,
String host,
int port,
SnmpEngineId id)
throws UnknownHostException,
SnmpUnknownModelException,
SnmpStatusException
engine - The SNMP engine.host - The peer name.port - The port number.id - The remote agent engine Id. If no discovery is to be done and the engine Id is useless (when sending trap from the SnmpV3AdaptorServer ) you should provide null for this parameter. Doing so will make the SnmpUsmPeer an authoritative one. Sending get,set,getnext,getbulk,informs, ... with an authoritative peer will make the requests to fail.
UnknownHostException - If the host name cannot be resolved.
SnmpUnknownModelException - If Usm is not present in the passed engine.
SnmpStatusException - If the passed engine Id is equal to the local engine Id.| Method Detail |
public boolean isTimelinessSynchronized()
processUsmTimelinessDiscovery() has been successfully called. False not synchronized.public boolean isAuthoritative()
SnmpUsmPeer for trap sending. Every SnmpUsmPeer created with a null SnmpEngineId is an authoritative peer.
public int getEngineBoots()
public int getEngineTime()
public SnmpEngineId getEngineId()
public void processUsmTimelinessDiscovery()
throws SnmpStatusException
SnmpStatusException - If an error occurs during timeliness discovery. Check SnmpDefinitions in order to define error status.public void setParams(SnmpParams p)
setParams in class SnmpPeerp - The params to set.
|
FCS Release jdmk-5_1-b34.1 2005.02.10_16:46:09_MET |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||