- java.lang.Object
-
- org.snmp4j.security.UsmSecurityStateReference
-
- All Implemented Interfaces:
SecurityStateReference
public class UsmSecurityStateReference extends java.lang.Object implements SecurityStateReference
TheUsmSecurityStateReferenceholds cached security data for theUSMsecurity model.- Version:
- 3.4.0
- Author:
- Frank Fock
-
-
Constructor Summary
Constructors Constructor Description UsmSecurityStateReference()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanapplyTargetSecurityInformation(Target<?> target)After aSecurityStateReferencehas been created for on outgoing message, this method might be called by theMPv3to apply security information contained in the target object to the security state information.byte[]getAuthenticationKey()AuthenticationProtocolgetAuthenticationProtocol()byte[]getPrivacyKey()PrivacyProtocolgetPrivacyProtocol()byte[]getSecurityEngineID()intgetSecurityLevel()byte[]getSecurityName()booleanisCachedForResponseProcessing()Returns theisCachedForResponseProcessingflag 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).voidsetAuthenticationKey(byte[] authenticationKey)voidsetAuthenticationProtocol(AuthenticationProtocol authenticationProtocol)voidsetCachedForResponseProcessing(boolean isCachedForResponseProcessing)Sets theisCachedForResponseProcessingflag 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).voidsetPrivacyKey(byte[] privacyKey)voidsetPrivacyProtocol(PrivacyProtocol privacyProtocol)voidsetSecurityEngineID(byte[] securityEngineID)voidsetSecurityLevel(int securityLevel)voidsetSecurityName(byte[] securityName)
-
-
-
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)
-
getAuthenticationProtocol
public AuthenticationProtocol getAuthenticationProtocol()
-
setPrivacyProtocol
public void setPrivacyProtocol(PrivacyProtocol privacyProtocol)
-
getPrivacyProtocol
public PrivacyProtocol getPrivacyProtocol()
-
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:SecurityStateReferenceSets theisCachedForResponseProcessingflag 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:
setCachedForResponseProcessingin interfaceSecurityStateReference- Parameters:
isCachedForResponseProcessing- iftrue, this security state reference has been cached for response processing.
-
isCachedForResponseProcessing
public boolean isCachedForResponseProcessing()
Description copied from interface:SecurityStateReferenceReturns theisCachedForResponseProcessingflag 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:
isCachedForResponseProcessingin interfaceSecurityStateReference- Returns:
- if
true, this security state reference has been cached for response processing.
-
applyTargetSecurityInformation
public boolean applyTargetSecurityInformation(Target<?> target)
Description copied from interface:SecurityStateReferenceAfter aSecurityStateReferencehas been created for on outgoing message, this method might be called by theMPv3to 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 correspondingSecurityModeland returnsfalse.- Specified by:
applyTargetSecurityInformationin interfaceSecurityStateReference- Parameters:
target- aTargetsubclass instance with security information.- Returns:
trueif the security information of the supplied target could be applied andfalseotherwise.
-
-