- 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
Nested Classes Modifier and Type Class Description class
SnmpTargetMIB.SnmpTargetAddrEntryRow
static class
SnmpTargetMIB.SnmpTargetParamsSecurityLevelEnum
-
Field Summary
Fields Modifier and Type Field Description static long
ADDRESS_CACHE_TIMEOUT
-
Constructor Summary
Constructors Constructor Description SnmpTargetMIB(org.snmp4j.MessageDispatcher messageDispatcher)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addDefaultTDomains()
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
getAddressCacheTimeoutNanos()
CoexistenceInfoProvider
getCoexistenceProvider()
byte[]
getLocalEngineID()
Returns the local SNMPv3 engine ID.DefaultMOTable<SnmpTargetMIB.SnmpTargetAddrEntryRow,? extends MOColumn,? extends MOTableModel<SnmpTargetMIB.SnmpTargetAddrEntryRow>>
getSnmpTargetAddrEntry()
DefaultMOTable<DefaultMOMutableRow2PC,MOColumn,DefaultMOMutableTableModel<DefaultMOMutableRow2PC>>
getSnmpTargetParamsEntry()
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)
Collection<SnmpTargetMIB.SnmpTargetAddrEntryRow>
getTargetAddrRowsForTag(org.snmp4j.smi.OctetString tag)
MOTableRow
getTargetParamsRow(org.snmp4j.smi.OctetString paramsName)
Returns the SNMP Target Parameters row for the specified name.MOTableRow
getTargetParamsRow(org.snmp4j.smi.OctetString paramsName, boolean activeOnly)
Returns the SNMP Target Parameters row for the specified name.SnmpTlsTmMib
getTlsTmMib()
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)
TDomainAddressFactory
removeSupportedTDomain(org.snmp4j.smi.OID transportDomain)
MOTableRow
removeTargetAddress(org.snmp4j.smi.OctetString name)
MOTableRow
removeTargetParams(org.snmp4j.smi.OctetString name)
void
rowChanged(MOTableRowEvent<DefaultMOMutableRow2PC> event)
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 Detail
-
ADDRESS_CACHE_TIMEOUT
public static final long ADDRESS_CACHE_TIMEOUT
- See Also:
- Constant Field Values
-
-
Method Detail
-
getTargetAddrRowsForTag
public Collection<SnmpTargetMIB.SnmpTargetAddrEntryRow> getTargetAddrRowsForTag(org.snmp4j.smi.OctetString tag)
-
getAddressCacheTimeoutNanos
public long getAddressCacheTimeoutNanos()
-
setAddressCacheTimeoutNanos
public void setAddressCacheTimeoutNanos(long addressCacheTimeoutNanos)
-
getTlsTmMib
public SnmpTlsTmMib getTlsTmMib()
-
setTlsTmMib
public void setTlsTmMib(SnmpTlsTmMib tlsTmMib)
-
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
public void addSupportedTDomain(org.snmp4j.smi.OID transportDomain, TDomainAddressFactory factory)
-
removeSupportedTDomain
public TDomainAddressFactory removeSupportedTDomain(org.snmp4j.smi.OID transportDomain)
-
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
public MOTableRow removeTargetAddress(org.snmp4j.smi.OctetString name)
-
removeRowFromTargetAddrTagIndex
protected void removeRowFromTargetAddrTagIndex(MOTableRow removedRow)
-
addTargetParams
public boolean addTargetParams(org.snmp4j.smi.OctetString name, int mpModel, int secModel, org.snmp4j.smi.OctetString secName, int secLevel, int storageType)
-
removeTargetParams
public MOTableRow removeTargetParams(org.snmp4j.smi.OctetString name)
-
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
public void unregisterMOs(MOServer server, org.snmp4j.smi.OctetString context)
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
public void rowChanged(MOTableRowEvent<DefaultMOMutableRow2PC> event)
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
public MOTableRow getTargetParamsRow(org.snmp4j.smi.OctetString paramsName)
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
public MOTableRow getTargetParamsRow(org.snmp4j.smi.OctetString paramsName, boolean activeOnly)
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,? extends MOTableModel<SnmpTargetMIB.SnmpTargetAddrEntryRow>> getSnmpTargetAddrEntry()
-
getSnmpTargetParamsEntry
public DefaultMOTable<DefaultMOMutableRow2PC,MOColumn,DefaultMOMutableTableModel<DefaultMOMutableRow2PC>> getSnmpTargetParamsEntry()
-
getCoexistenceProvider
public CoexistenceInfoProvider getCoexistenceProvider()
-
setCoexistenceProvider
public void setCoexistenceProvider(CoexistenceInfoProvider coexistenceProvider)
-
-