java.lang.Object
org.snmp4j.agent.mo.snmp.SnmpTargetMIB
- All Implemented Interfaces:
EventListener
,MOTableRowListener<DefaultMOMutableRow2PC>
,MOGroup
,org.snmp4j.event.CounterListener
public class SnmpTargetMIB
extends Object
implements MOGroup, org.snmp4j.event.CounterListener, MOTableRowListener<DefaultMOMutableRow2PC>
-
Nested Class Summary
Modifier and TypeClassDescriptionclass
static final class
-
Field Summary
Modifier and TypeFieldDescriptionstatic final long
static final org.snmp4j.smi.OID
static final org.snmp4j.smi.OID
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
addSupportedTDomain
(org.snmp4j.smi.OID transportDomain, TDomainAddressFactory factory) boolean
addTargetAddress
(org.snmp4j.smi.OctetString name, org.snmp4j.smi.OID transportDomain, org.snmp4j.smi.OctetString address, int timeout, int retries, org.snmp4j.smi.OctetString tagList, org.snmp4j.smi.OctetString params, int storageType) boolean
addTargetParams
(org.snmp4j.smi.OctetString name, int mpModel, int secModel, org.snmp4j.smi.OctetString secName, int secLevel, int storageType) long
byte[]
Returns the local SNMPv3 engine ID.DefaultMOTable
<SnmpTargetMIB.SnmpTargetAddrEntryRow, ? extends MOColumn, ? extends MOTableModel<SnmpTargetMIB.SnmpTargetAddrEntryRow>> org.snmp4j.Target
<?> getTarget
(org.snmp4j.smi.OctetString name, org.snmp4j.smi.OctetString contextEngineID, org.snmp4j.smi.OctetString contextName) Gets the (active) target definition with the specified name, context and address type.<A extends org.snmp4j.smi.Address>
org.snmp4j.Target<A> getTarget
(org.snmp4j.smi.OctetString name, org.snmp4j.smi.OctetString contextEngineID, org.snmp4j.smi.OctetString contextName, A addressType) Gets the (active) target definition with the specified name, context and address type.org.snmp4j.smi.Address
getTargetAddress
(org.snmp4j.smi.OctetString name) getTargetAddrRowsForTag
(org.snmp4j.smi.OctetString tag) getTargetParamsRow
(org.snmp4j.smi.OctetString paramsName) Returns the SNMP Target Parameters row for the specified name.getTargetParamsRow
(org.snmp4j.smi.OctetString paramsName, boolean activeOnly) Returns the SNMP Target Parameters row for the specified name.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.protected void
removeRowFromTargetAddrTagIndex
(MOTableRow removedRow) removeSupportedTDomain
(org.snmp4j.smi.OID transportDomain) removeTargetAddress
(org.snmp4j.smi.OctetString name) removeTargetParams
(org.snmp4j.smi.OctetString name) void
A column or a complete row is changed/has been changed.void
setAddressCacheTimeoutNanos
(long addressCacheTimeoutNanos) void
setCoexistenceProvider
(CoexistenceInfoProvider coexistenceProvider) void
setTlsTmMib
(SnmpTlsTmMib tlsTmMib) 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.
-
Field Details
-
ADDRESS_CACHE_TIMEOUT
public static final long ADDRESS_CACHE_TIMEOUT- See Also:
-
oidSnmpUnknownContexts
public static final org.snmp4j.smi.OID oidSnmpUnknownContexts
-
-
Constructor Details
-
SnmpTargetMIB
public SnmpTargetMIB(org.snmp4j.MessageDispatcher messageDispatcher)
-
-
Method Details
-
getTargetAddrRowsForTag
public Collection<SnmpTargetMIB.SnmpTargetAddrEntryRow> getTargetAddrRowsForTag(org.snmp4j.smi.OctetString tag) -
getAddressCacheTimeoutNanos
public long getAddressCacheTimeoutNanos() -
setAddressCacheTimeoutNanos
public void setAddressCacheTimeoutNanos(long addressCacheTimeoutNanos) -
getTlsTmMib
-
setTlsTmMib
-
getLocalEngineID
public byte[] getLocalEngineID()Returns the local SNMPv3 engine ID.- Returns:
- the SNMP3v local engine ID, if the
MPv3
is available ornull
otherwise. - Since:
- 1.2
-
getTargetAddress
public org.snmp4j.smi.Address getTargetAddress(org.snmp4j.smi.OctetString name) -
getTarget
public org.snmp4j.Target<?> getTarget(org.snmp4j.smi.OctetString name, org.snmp4j.smi.OctetString contextEngineID, org.snmp4j.smi.OctetString contextName) Gets the (active) target definition with the specified name, context and address type.- Parameters:
name
- the name of the target.contextEngineID
- the context engine ID of the target engine.contextName
- the context name.- Returns:
- the target definition if an active (RowStatus) row with
name
and the specified context attributes could be found.
-
getTarget
public <A extends org.snmp4j.smi.Address> org.snmp4j.Target<A> getTarget(org.snmp4j.smi.OctetString name, org.snmp4j.smi.OctetString contextEngineID, org.snmp4j.smi.OctetString contextName, A addressType) Gets the (active) target definition with the specified name, context and address type.- Type Parameters:
A
- the Address class supported by the caller.- Parameters:
name
- the name of the target.contextEngineID
- the context engine ID of the target engine.contextName
- the context name.addressType
- the address type expected.- Returns:
- the target definition if an active (RowStatus) row with
name
and the specified context attributes could be found.
-
addDefaultTDomains
public void addDefaultTDomains() -
addSupportedTDomain
-
removeSupportedTDomain
-
addTargetAddress
public boolean addTargetAddress(org.snmp4j.smi.OctetString name, org.snmp4j.smi.OID transportDomain, org.snmp4j.smi.OctetString address, int timeout, int retries, org.snmp4j.smi.OctetString tagList, org.snmp4j.smi.OctetString params, int storageType) -
removeTargetAddress
-
removeRowFromTargetAddrTagIndex
-
addTargetParams
public boolean addTargetParams(org.snmp4j.smi.OctetString name, int mpModel, int secModel, org.snmp4j.smi.OctetString secName, int secLevel, int storageType) -
removeTargetParams
-
registerMOs
public void registerMOs(MOServer server, org.snmp4j.smi.OctetString context) throws DuplicateRegistrationException Description copied from interface:MOGroup
Registers the managed objects of this group with the server for the supplied context.- Specified by:
registerMOs
in interfaceMOGroup
- Parameters:
server
- theMOServer
where to register the managed objects.context
- the context to use (may benull
if no specific context is selected).- Throws:
DuplicateRegistrationException
- if a managed object's scope (i.e. lower bound) is already registered at the server.
-
unregisterMOs
Description copied from interface:MOGroup
Unregisters the managed objects of this group from the supplied server and from the supplied context.- Specified by:
unregisterMOs
in interfaceMOGroup
- Parameters:
server
- theMOServer
where to unregister the managed objects.context
- the context to use (may benull
if no specific context is selected).
-
incrementCounter
public void incrementCounter(org.snmp4j.event.CounterEvent event) - Specified by:
incrementCounter
in interfaceorg.snmp4j.event.CounterListener
-
rowChanged
Description copied from interface:MOTableRowListener
A column or a complete row is changed/has been changed.- Specified by:
rowChanged
in interfaceMOTableRowListener<DefaultMOMutableRow2PC>
- Parameters:
event
- aMOTableRowEvent
describing the event. To veto the event theMOTableRowEvent.setVetoStatus(int)
and optionally also theMOTableRowEvent.setVetoColumn(int)
can be called. IfMOTableRowEvent.getNumberOfConsecutiveEventsOfSameOrigin()
is greater than zero you need to setMOTableRowEvent.setSendNextEventsOfSameOrigin(boolean)
totrue
in order to receive those consecutive events too. Otherwise they will be ignored and not been propagated to this listener.
-
getTargetParamsRow
Returns the SNMP Target Parameters row for the specified name.- Parameters:
paramsName
- the name of the parameters set to return.- Returns:
- if the row containing the target parameters if such an entry exists or
null
if no such entry exists
-
getTargetParamsRow
Returns the SNMP Target Parameters row for the specified name.- Parameters:
paramsName
- the name of the parameters set to return.activeOnly
- iftrue
only an active row will be returned.- Returns:
- if the row containing the target parameters if such an entry exists or
null
if no such entry exists
-
getSnmpTargetAddrEntry
public DefaultMOTable<SnmpTargetMIB.SnmpTargetAddrEntryRow,? extends MOColumn, getSnmpTargetAddrEntry()? extends MOTableModel<SnmpTargetMIB.SnmpTargetAddrEntryRow>> -
getSnmpTargetParamsEntry
public DefaultMOTable<DefaultMOMutableRow2PC,MOColumn, getSnmpTargetParamsEntry()DefaultMOMutableTableModel<DefaultMOMutableRow2PC>> -
getCoexistenceProvider
-
setCoexistenceProvider
-