- 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 classSnmpTargetMIB.SnmpTargetAddrEntryRowstatic classSnmpTargetMIB.SnmpTargetParamsSecurityLevelEnum
-
Field Summary
Fields Modifier and Type Field Description static longADDRESS_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 voidaddDefaultTDomains()voidaddSupportedTDomain(org.snmp4j.smi.OID transportDomain, TDomainAddressFactory factory)booleanaddTargetAddress(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)booleanaddTargetParams(org.snmp4j.smi.OctetString name, int mpModel, int secModel, org.snmp4j.smi.OctetString secName, int secLevel, int storageType)longgetAddressCacheTimeoutNanos()CoexistenceInfoProvidergetCoexistenceProvider()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.AddressgetTargetAddress(org.snmp4j.smi.OctetString name)Collection<SnmpTargetMIB.SnmpTargetAddrEntryRow>getTargetAddrRowsForTag(org.snmp4j.smi.OctetString tag)MOTableRowgetTargetParamsRow(org.snmp4j.smi.OctetString paramsName)Returns the SNMP Target Parameters row for the specified name.MOTableRowgetTargetParamsRow(org.snmp4j.smi.OctetString paramsName, boolean activeOnly)Returns the SNMP Target Parameters row for the specified name.SnmpTlsTmMibgetTlsTmMib()voidincrementCounter(org.snmp4j.event.CounterEvent event)voidregisterMOs(MOServer server, org.snmp4j.smi.OctetString context)Registers the managed objects of this group with the server for the supplied context.protected voidremoveRowFromTargetAddrTagIndex(MOTableRow removedRow)TDomainAddressFactoryremoveSupportedTDomain(org.snmp4j.smi.OID transportDomain)MOTableRowremoveTargetAddress(org.snmp4j.smi.OctetString name)MOTableRowremoveTargetParams(org.snmp4j.smi.OctetString name)voidrowChanged(MOTableRowEvent<DefaultMOMutableRow2PC> event)A column or a complete row is changed/has been changed.voidsetAddressCacheTimeoutNanos(long addressCacheTimeoutNanos)voidsetCoexistenceProvider(CoexistenceInfoProvider coexistenceProvider)voidsetTlsTmMib(SnmpTlsTmMib tlsTmMib)voidunregisterMOs(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
MPv3is available ornullotherwise. - 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
nameand 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
nameand 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:MOGroupRegisters the managed objects of this group with the server for the supplied context.- Specified by:
registerMOsin interfaceMOGroup- Parameters:
server- theMOServerwhere to register the managed objects.context- the context to use (may benullif 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:MOGroupUnregisters the managed objects of this group from the supplied server and from the supplied context.- Specified by:
unregisterMOsin interfaceMOGroup- Parameters:
server- theMOServerwhere to unregister the managed objects.context- the context to use (may benullif no specific context is selected).
-
incrementCounter
public void incrementCounter(org.snmp4j.event.CounterEvent event)
- Specified by:
incrementCounterin interfaceorg.snmp4j.event.CounterListener
-
rowChanged
public void rowChanged(MOTableRowEvent<DefaultMOMutableRow2PC> event)
Description copied from interface:MOTableRowListenerA column or a complete row is changed/has been changed.- Specified by:
rowChangedin interfaceMOTableRowListener<DefaultMOMutableRow2PC>- Parameters:
event- aMOTableRowEventdescribing 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)totruein 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
nullif 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- iftrueonly an active row will be returned.- Returns:
- if the row containing the target parameters if such an entry exists or
nullif 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)
-
-