Module org.snmp4j
Package org.snmp4j

Interface Target<A extends Address>

  • All Superinterfaces:
    All Known Implementing Classes:
    AbstractTarget, CertifiedTarget, CommunityTarget, SecureTarget, UserTarget

    public interface Target<A extends Address>
    extends, java.lang.Cloneable
    A Target interface defines an abstract representation of a remote SNMP entity. It represents a target with an Address object, as well protocol parameters such as retransmission and timeout policy.
    Frank Fock
    • Method Detail

      • getAddress

        A getAddress()
        Gets the address of this target.
        an Address instance.
      • setAddress

        void setAddress​(A address)
        Sets the address of the target.
        address - an Address instance.
      • setRetries

        void setRetries​(int retries)
        Sets the number of retries to be performed before a request is timed out.
        retries - the number of retries. Note: If the number of retries is set to 0, then the request will be sent out exactly once.
      • getRetries

        int getRetries()
        Gets the number of retries.
        an integer >= 0.
      • setTimeout

        void setTimeout​(long timeout)
        Sets the timeout for a target.
        timeout - timeout in milliseconds before a confirmed request is resent or timed out.
      • getTimeout

        long getTimeout()
        Gets the timeout for a target.
        the timeout in milliseconds.
      • getMaxSizeRequestPDU

        int getMaxSizeRequestPDU()
        Gets the maximum size of request PDUs that this target is able to respond to. The default is 65535.
        the maximum PDU size of request PDUs for this target. Which is always greater than 484.
      • setMaxSizeRequestPDU

        void setMaxSizeRequestPDU​(int maxSizeRequestPDU)
        Sets the maximum size of request PDUs that this target is able to receive.
        maxSizeRequestPDU - the maximum PDU (SNMP message) size this session will be able to process.
      • getPreferredTransports

        java.util.List<TransportMapping<? super A>> getPreferredTransports()
        Gets the prioritised list of transport mappings to be used for this target. The first mapping in the list that matches the target address is chosen for sending new requests.
        an ordered list of TransportMapping instances.
      • clone

        java.lang.Object clone()
      • getSecurityModel

        int getSecurityModel()
        Gets the security model associated with this target.
        an int value as defined in the SecurityModel interface or any third party subclass thereof.
      • getSecurityName

        OctetString getSecurityName()
        Gets the security name associated with this target. The security name is used by the security model to lookup further parameters like authentication and privacy protocol settings from the security model dependent internal storage.
        an OctetString instance (never null).
      • setSecurityModel

        void setSecurityModel​(int securityModel)
        Sets the security model for this target.
        securityModel - an int value as defined in the SecurityModel interface or any third party subclass thereof.
      • setSecurityName

        void setSecurityName​(OctetString securityName)
        Sets the security name to be used with this target.
        securityName - an OctetString instance (must not be null).
        See Also: