public class SNMPv2MIB extends Object implements MOGroup, org.snmp4j.event.CounterListener, AgentCapabilityList
SystemGroup implements the objects in the SNMPv2-MIB
specification.
Since version 2.0, the SysUpTime class uses System.nanoTime()
instead System.currentTimeMillis() for up-time computation
which makes the implementation stable against system time changes.| Modifier and Type | Class and Description |
|---|---|
static class |
SNMPv2MIB.SnmpEnableAuthenTrapsEnum |
class |
SNMPv2MIB.SysOREntry |
static class |
SNMPv2MIB.SysUpTimeImpl |
| Modifier | Constructor and Description |
|---|---|
|
SNMPv2MIB(org.snmp4j.smi.OctetString sysDescr,
org.snmp4j.smi.OID sysOID,
org.snmp4j.smi.Integer32 sysServices)
Create a new SNMPv2MIB instance with description, OID, services indicator, and system up-time which starts
when this constuctor is being called.
|
protected |
SNMPv2MIB(org.snmp4j.smi.OctetString sysDescr,
org.snmp4j.smi.OID sysOID,
org.snmp4j.smi.Integer32 sysServices,
SysUpTime sysUpTime)
Create a new SNMPv2MIB instance with description, OID, services indicator, and system up-time.
|
| Modifier and Type | Method and Description |
|---|---|
org.snmp4j.smi.OID |
addSysOREntry(org.snmp4j.smi.OID sysORID,
org.snmp4j.smi.OctetString sysORDescr)
Add a capabilities description to the exported list.
|
org.snmp4j.smi.OctetString |
getContact() |
org.snmp4j.smi.OctetString |
getDescr() |
org.snmp4j.smi.OctetString |
getLocation() |
org.snmp4j.smi.OctetString |
getName() |
NotificationOriginator |
getNotificationOriginator()
Gets the notification originator used for sending authenticationFailure
traps.
|
org.snmp4j.smi.OID |
getObjectID() |
org.snmp4j.smi.Integer32 |
getServices() |
SysUpTime |
getSysUpTime() |
static SysUpTime |
getSysUpTime(org.snmp4j.smi.OctetString context)
Returns the sysUpTime for the supplied context.
|
org.snmp4j.smi.TimeTicks |
getUpTime() |
void |
incrementCounter(org.snmp4j.event.CounterEvent event) |
void |
registerMOs(MOServer server,
org.snmp4j.smi.OctetString context)
Registers the managed objects of this group with the server for the
supplied context.
|
MOTableRow |
removeSysOREntry(org.snmp4j.smi.OID index)
Remove a capabilities description from the exported list.
|
void |
setContact(org.snmp4j.smi.OctetString contact) |
void |
setLocation(org.snmp4j.smi.OctetString sysLocation) |
void |
setName(org.snmp4j.smi.OctetString sysName) |
void |
setNotificationOriginator(NotificationOriginator notificationOriginator)
Sets the
NotificationOriginator to be used for sending the
authenticationFailure trap. |
void |
unregisterMOs(MOServer server,
org.snmp4j.smi.OctetString context)
Unregisters the managed objects of this group from the supplied server and
from the supplied context.
|
protected void |
updateSysORLastChange() |
public SNMPv2MIB(org.snmp4j.smi.OctetString sysDescr,
org.snmp4j.smi.OID sysOID,
org.snmp4j.smi.Integer32 sysServices)
sysDescr - the description of the system.sysOID - the (unique) OID of the OBJECT-IDENTITY construct identifying this system.sysServices - the services indicator that roughly describes which network services this entity supports.
See sysServices MIB description.protected SNMPv2MIB(org.snmp4j.smi.OctetString sysDescr,
org.snmp4j.smi.OID sysOID,
org.snmp4j.smi.Integer32 sysServices,
SysUpTime sysUpTime)
sysDescr - the description of the system.sysOID - the (unique) OID of the OBJECT-IDENTITY construct identifying this system.sysServices - the services indicator that roughly describes which network services this entity supports.
See sysServices MIB description.sysUpTime - the up-time service whose SysUpTime.get() is called when the system up-time needs to be determined.protected void updateSysORLastChange()
public org.snmp4j.smi.OID addSysOREntry(org.snmp4j.smi.OID sysORID,
org.snmp4j.smi.OctetString sysORDescr)
AgentCapabilityListaddSysOREntry in interface AgentCapabilityListsysORID - the OID of an AGENT-CAPABILITIES statement.sysORDescr - A textual description of the capabilities identified
by the corresponding instance of sysORID.public MOTableRow removeSysOREntry(org.snmp4j.smi.OID index)
AgentCapabilityListremoveSysOREntry in interface AgentCapabilityListindex - the index OID previously returned by AgentCapabilityList.addSysOREntry(org.snmp4j.smi.OID, org.snmp4j.smi.OctetString).null if such a row
could not be found.public void registerMOs(MOServer server, org.snmp4j.smi.OctetString context) throws DuplicateRegistrationException
MOGroupregisterMOs in interface MOGroupserver - the MOServer where to register the managed objects.context - the context to use (may be null if no specific context
is selected).DuplicateRegistrationException - if a managed object's scope (i.e. lower bound) is already registered
at the server.public void unregisterMOs(MOServer server, org.snmp4j.smi.OctetString context)
MOGroupunregisterMOs in interface MOGroupserver - the MOServer where to unregister the managed objects.context - the context to use (may be null if no specific context
is selected).public org.snmp4j.smi.OctetString getContact()
public void setContact(org.snmp4j.smi.OctetString contact)
public org.snmp4j.smi.OctetString getDescr()
public org.snmp4j.smi.OctetString getLocation()
public void setLocation(org.snmp4j.smi.OctetString sysLocation)
public org.snmp4j.smi.OctetString getName()
public void setName(org.snmp4j.smi.OctetString sysName)
public org.snmp4j.smi.OID getObjectID()
public org.snmp4j.smi.Integer32 getServices()
public org.snmp4j.smi.TimeTicks getUpTime()
public SysUpTime getSysUpTime()
public void incrementCounter(org.snmp4j.event.CounterEvent event)
incrementCounter in interface org.snmp4j.event.CounterListenerpublic static SysUpTime getSysUpTime(org.snmp4j.smi.OctetString context)
context - a context or null for the default context.null if such a sysUpTime instance has not been
registered yet.public void setNotificationOriginator(NotificationOriginator notificationOriginator)
NotificationOriginator to be used for sending the
authenticationFailure trap.notificationOriginator - a NotificationOriginator instance or null to disable
authenticationFailure traps (default).public NotificationOriginator getNotificationOriginator()
Copyright © 2020 SNMP4J.org. All rights reserved.