java.lang.Object
org.snmp4j.security.UsmSecurityStateReference
- All Implemented Interfaces:
SecurityStateReference
The
UsmSecurityStateReference
holds cached security data for the USM
security model.- Version:
- 3.4.0
- Author:
- Frank Fock
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
applyTargetSecurityInformation
(Target<?> target) After aSecurityStateReference
has been created for on outgoing message, this method might be called by theMPv3
to apply security information contained in the target object to the security state information.byte[]
byte[]
byte[]
int
byte[]
boolean
Returns theisCachedForResponseProcessing
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).void
setAuthenticationKey
(byte[] authenticationKey) void
setAuthenticationProtocol
(AuthenticationProtocol authenticationProtocol) void
setCachedForResponseProcessing
(boolean isCachedForResponseProcessing) Sets theisCachedForResponseProcessing
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).void
setPrivacyKey
(byte[] privacyKey) void
setPrivacyProtocol
(PrivacyProtocol privacyProtocol) void
setSecurityEngineID
(byte[] securityEngineID) void
setSecurityLevel
(int securityLevel) void
setSecurityName
(byte[] securityName) toString()
-
Constructor Details
-
UsmSecurityStateReference
public UsmSecurityStateReference()
-
-
Method Details
-
setSecurityName
public void setSecurityName(byte[] securityName) -
getSecurityName
public byte[] getSecurityName() -
setSecurityEngineID
public void setSecurityEngineID(byte[] securityEngineID) -
getSecurityEngineID
public byte[] getSecurityEngineID() -
setAuthenticationProtocol
-
getAuthenticationProtocol
-
setPrivacyProtocol
-
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:SecurityStateReference
Sets theisCachedForResponseProcessing
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 interfaceSecurityStateReference
- Parameters:
isCachedForResponseProcessing
- iftrue
, this security state reference has been cached for response processing.
-
isCachedForResponseProcessing
public boolean isCachedForResponseProcessing()Description copied from interface:SecurityStateReference
Returns theisCachedForResponseProcessing
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 interfaceSecurityStateReference
- Returns:
- if
true
, this security state reference has been cached for response processing.
-
applyTargetSecurityInformation
Description copied from interface:SecurityStateReference
After aSecurityStateReference
has been created for on outgoing message, this method might be called by theMPv3
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 correspondingSecurityModel
and returnsfalse
.- Specified by:
applyTargetSecurityInformation
in interfaceSecurityStateReference
- Parameters:
target
- aTarget
subclass instance with security information.- Returns:
true
if the security information of the supplied target could be applied andfalse
otherwise.
-
toString
-