Module org.snmp4j

Class UsmSecurityStateReference

  • All Implemented Interfaces:
    SecurityStateReference

    public class UsmSecurityStateReference
    extends java.lang.Object
    implements SecurityStateReference
    The UsmSecurityStateReference holds cached security data for the USM security model.
    Version:
    3.4.0
    Author:
    Frank Fock
    • Constructor Detail

      • UsmSecurityStateReference

        public UsmSecurityStateReference()
    • Method Detail

      • setSecurityName

        public void setSecurityName​(byte[] securityName)
      • getSecurityName

        public byte[] getSecurityName()
      • setSecurityEngineID

        public void setSecurityEngineID​(byte[] securityEngineID)
      • getSecurityEngineID

        public byte[] getSecurityEngineID()
      • setAuthenticationProtocol

        public void setAuthenticationProtocol​(AuthenticationProtocol authenticationProtocol)
      • setPrivacyProtocol

        public void setPrivacyProtocol​(PrivacyProtocol privacyProtocol)
      • setAuthenticationKey

        public void setAuthenticationKey​(byte[] authenticationKey)
      • getAuthenticationKey

        public byte[] getAuthenticationKey()
      • setPrivacyKey

        public void setPrivacyKey​(byte[] privacyKey)
      • getPrivacyKey

        public byte[] getPrivacyKey()
      • setSecurityLevel

        public void setSecurityLevel​(int securityLevel)
      • getSecurityLevel

        public int getSecurityLevel()
      • setCachedForResponseProcessing

        public void setCachedForResponseProcessing​(boolean isCachedForResponseProcessing)
        Description copied from interface: SecurityStateReference
        Sets the isCachedForResponseProcessing flag to indicate whether this security state reference has been cached for response processing which means it will be used later for response or report processing rather than for requests or notifications (traps).
        Specified by:
        setCachedForResponseProcessing in interface SecurityStateReference
        Parameters:
        isCachedForResponseProcessing - if true, this security state reference has been cached for response processing.
      • isCachedForResponseProcessing

        public boolean isCachedForResponseProcessing()
        Description copied from interface: SecurityStateReference
        Returns the isCachedForResponseProcessing flag indicating whether this security state reference has been cached for response processing which means it can be used later for response or report processing rather than for requests or notifications (traps).
        Specified by:
        isCachedForResponseProcessing in interface SecurityStateReference
        Returns:
        if true, this security state reference has been cached for response processing.
      • applyTargetSecurityInformation

        public boolean applyTargetSecurityInformation​(Target<?> target)
        Description copied from interface: SecurityStateReference
        After a SecurityStateReference has been created for on outgoing message, this method might be called by the MPv3 to apply security information contained in the target object to the security state information. By default, this method does nothing and defers the security state information initialization the the corresponding SecurityModel and returns false.
        Specified by:
        applyTargetSecurityInformation in interface SecurityStateReference
        Parameters:
        target - a Target subclass instance with security information.
        Returns:
        true if the security information of the supplied target could be applied and false otherwise.