- java.lang.Object
-
- org.snmp4j.security.SNMPv3SecurityModel
-
- All Implemented Interfaces:
SecurityModel
public abstract class SNMPv3SecurityModel extends java.lang.Object implements SecurityModel
The abstract classSNMPv3SecurityModel
implements common methods and fields for security models for the SNMPv3 message processing model.- Since:
- 2.0
- Version:
- 2.0
-
-
Field Summary
Fields Modifier and Type Field Description protected CounterSupport
counterSupport
protected OctetString
localEngineID
-
Fields inherited from interface org.snmp4j.security.SecurityModel
SECURITY_MODEL_ANY, SECURITY_MODEL_SNMPv1, SECURITY_MODEL_SNMPv2c, SECURITY_MODEL_TSM, SECURITY_MODEL_USM
-
-
Constructor Summary
Constructors Constructor Description SNMPv3SecurityModel()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static byte[]
buildMessageBuffer(BERInputStream scopedPDU)
protected static byte[]
buildWholeMessage(Integer32 snmpVersion, byte[] scopedPdu, byte[] globalData, SecurityParameters securityParameters)
CounterSupport
getCounterSupport()
Gets the counter support instance that can be used to register for counter incrementation events.OctetString
getLocalEngineID()
Returns the local engine ID.void
setCounterSupport(CounterSupport counterSupport)
Sets the counter support instance.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.snmp4j.security.SecurityModel
generateRequestMessage, generateResponseMessage, getID, hasAuthoritativeEngineID, newSecurityParametersInstance, newSecurityStateReference, processIncomingMsg, supportsEngineIdDiscovery
-
-
-
-
Field Detail
-
localEngineID
protected OctetString localEngineID
-
counterSupport
protected CounterSupport counterSupport
-
-
Method Detail
-
getLocalEngineID
public OctetString getLocalEngineID()
Returns the local engine ID.- Returns:
- the local engine ID.
- Since:
- 1.2
-
buildWholeMessage
protected static byte[] buildWholeMessage(Integer32 snmpVersion, byte[] scopedPdu, byte[] globalData, SecurityParameters securityParameters) throws java.io.IOException
- Throws:
java.io.IOException
-
buildMessageBuffer
protected static byte[] buildMessageBuffer(BERInputStream scopedPDU) throws java.io.IOException
- Throws:
java.io.IOException
-
getCounterSupport
public CounterSupport getCounterSupport()
Gets the counter support instance that can be used to register for counter incrementation events.- Returns:
- a
CounterSupport
instance that is used to fireCounterEvent
.
-
setCounterSupport
public void setCounterSupport(CounterSupport counterSupport)
Sets the counter support instance. By default, the singleton instance provided by theCounterSupport
instance is used.- Parameters:
counterSupport
- aCounterSupport
subclass instance.
-
-