Class SnmpTargetMIB

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>
  • Field Details

    • ADDRESS_CACHE_TIMEOUT

      public static final long ADDRESS_CACHE_TIMEOUT
      See Also:
    • oidSnmpUnknownContexts

      public static final org.snmp4j.smi.OID oidSnmpUnknownContexts
    • oidSnmpUnavailableContexts

      public static final org.snmp4j.smi.OID oidSnmpUnavailableContexts
  • 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

      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 or null 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 interface MOGroup
      Parameters:
      server - the MOServer where to register the managed objects.
      context - the context to use (may be null 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 interface MOGroup
      Parameters:
      server - the MOServer where to unregister the managed objects.
      context - the context to use (may be null if no specific context is selected).
    • incrementCounter

      public void incrementCounter(org.snmp4j.event.CounterEvent event)
      Specified by:
      incrementCounter in interface org.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 interface MOTableRowListener<DefaultMOMutableRow2PC>
      Parameters:
      event - a MOTableRowEvent describing the event. To veto the event the MOTableRowEvent.setVetoStatus(int) and optionally also the MOTableRowEvent.setVetoColumn(int) can be called. If MOTableRowEvent.getNumberOfConsecutiveEventsOfSameOrigin() is greater than zero you need to set MOTableRowEvent.setSendNextEventsOfSameOrigin(boolean) to true 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 - if true 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

    • getSnmpTargetParamsEntry

    • getCoexistenceProvider

      public CoexistenceInfoProvider getCoexistenceProvider()
    • setCoexistenceProvider

      public void setCoexistenceProvider(CoexistenceInfoProvider coexistenceProvider)