Class UsmDHParametersImpl

java.lang.Object
org.snmp4j.agent.mo.MOScalar<org.snmp4j.smi.OctetString>
org.snmp4j.agent.mo.snmp.dh.UsmDHParametersImpl
All Implemented Interfaces:
ManagedObject<SubRequest<?>>, ManagedObjectValueAccess<SubRequest<?>>, ChangeableManagedObject<SubRequest<?>>, GenericManagedObject, MOScope, RandomAccessManagedObject<SubRequest<?>>, RegisteredManagedObject<SubRequest<?>>, SerializableManagedObject<SubRequest<?>>
Direct Known Subclasses:
SnmpUsmDhObjectsMib.UsmDHParameters

public class UsmDHParametersImpl extends MOScalar<org.snmp4j.smi.OctetString>
The UsmDHParametersImpl class holds the Diffie Hellman parameters for doing a Diffie-Hellman key agreement.
Since:
3.0
Author:
Frank Fock
  • Constructor Details

    • UsmDHParametersImpl

      public UsmDHParametersImpl(org.snmp4j.smi.OID id, MOAccess access, org.snmp4j.smi.OctetString value)
      Create a DHParameters instance that uses the Oakeley Group 1 Diffie Hellman parameters defined in RFC 2409 (see also DHGroups).
      Parameters:
      id - the instance OID of the scalar instance (last sub-identifier should be zero).
      access - the maximum access level supported by this instance.
      value - the initial value that defines the parameters as BER encoded OCTET STRING, see decodeBER(OctetString).
  • Method Details

    • getDHParamters

      public org.snmp4j.security.dh.DHParameters getDHParamters()
    • encodeBER

      public org.snmp4j.smi.OctetString encodeBER()
      Encode this parameter set as BER octet string.
      Returns:
      the PKCS#3 encoded parameter octet string. If the encoding fails, null is returned.
    • decodeBER

      public void decodeBER(org.snmp4j.smi.OctetString berValue) throws IOException
      Throws:
      IOException
    • getValue

      public org.snmp4j.smi.OctetString getValue()
      Description copied from class: MOScalar
      Returns the actual value of this scalar managed object. For a basic instrumentation, overwrite this method to provide always the actual value and/or to update the internal value member and then call super.MOScalar.getValue() in the derived class.
      Overrides:
      getValue in class MOScalar<org.snmp4j.smi.OctetString>
      Returns:
      a non null Variable with the same syntax defined for this scalar object.
    • toString

      public String toString()
      Overrides:
      toString in class MOScalar<org.snmp4j.smi.OctetString>