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 ClassesModifier and TypeClassDescriptionclassstatic final class -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidaddSupportedTDomain(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) longbyte[]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.AddressgetTargetAddress(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.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) removeSupportedTDomain(org.snmp4j.smi.OID transportDomain) removeTargetAddress(org.snmp4j.smi.OctetString name) removeTargetParams(org.snmp4j.smi.OctetString name) voidA 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 Details
-
ADDRESS_CACHE_TIMEOUT
public static final long ADDRESS_CACHE_TIMEOUT- See Also:
-
-
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
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
-
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: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
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
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
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
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, getSnmpTargetAddrEntry()? extends MOTableModel<SnmpTargetMIB.SnmpTargetAddrEntryRow>> -
getSnmpTargetParamsEntry
public DefaultMOTable<DefaultMOMutableRow2PC,MOColumn, getSnmpTargetParamsEntry()DefaultMOMutableTableModel<DefaultMOMutableRow2PC>> -
getCoexistenceProvider
-
setCoexistenceProvider
-