Record Class SnmpMcpServer.ServerConfiguration.SnmpTargetConfig

java.lang.Object
java.lang.Record
org.snmp4j.mcp.SnmpMcpServer.ServerConfiguration.SnmpTargetConfig
Record Components:
targetName - A unique name identifying this SNMP target configuration.
address - The specific network address to which the SNMP command responder binds.
community - The community string used for SNMP communication in SNMPv1 and SNMPv2c, null for SNMPv3.
retries - The number of retries attempted if an SNMP request fails.
timeout - The timeout duration (in milliseconds) for SNMP requests.
version - The version of the SNMP protocol (e.g., v1, v2c, v3) to be used.
maxSizeResponsePdu - The maximum allowable size of the SNMP response PDU (Protocol Data Unit).
snmpV3 - The configuration specific to SNMPv3, including security settings.
tls - The configuration for secure communication using Transport Layer Security (TLS).
allowAdhocParameterOverwrite - When true, tools that support a parameterOverrides argument may overwrite this target's security and transport parameters on a per-call basis (e.g. community, version, retries, timeout, and any SNMPv3/TLS field). The address (which embeds the transport type and port) can never be overridden. Intended for security-negative and robustness testing against a fixed agent endpoint. Defaults to false (absent in JSON) for safety.
Enclosing class:
SnmpMcpServer.ServerConfiguration

public static record SnmpMcpServer.ServerConfiguration.SnmpTargetConfig(String targetName, String address, String community, int retries, int timeout, String version, int maxSizeResponsePdu, SnmpMcpServer.ServerConfiguration.SnmpV3Config snmpV3, SnmpMcpServer.ServerConfiguration.TlsConfig tls, boolean allowAdhocParameterOverwrite) extends Record
Represents the configuration settings for a named SNMP target. This record contains various parameters necessary to define how SNMP communication is configured, including protocol version, community string, retries, and timeout. Additional configurations for SNMPv3 and TLS can be specified for enhanced security.
Since:
0.0.1
Version:
0.1.0
Author:
SNMP4J.org
  • Constructor Details

  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • targetName

      public String targetName()
      Returns the value of the targetName record component.
      Returns:
      the value of the targetName record component
    • address

      public String address()
      Returns the value of the address record component.
      Returns:
      the value of the address record component
    • community

      public String community()
      Returns the value of the community record component.
      Returns:
      the value of the community record component
    • retries

      public int retries()
      Returns the value of the retries record component.
      Returns:
      the value of the retries record component
    • timeout

      public int timeout()
      Returns the value of the timeout record component.
      Returns:
      the value of the timeout record component
    • version

      public String version()
      Returns the value of the version record component.
      Returns:
      the value of the version record component
    • maxSizeResponsePdu

      public int maxSizeResponsePdu()
      Returns the value of the maxSizeResponsePdu record component.
      Returns:
      the value of the maxSizeResponsePdu record component
    • snmpV3

      Returns the value of the snmpV3 record component.
      Returns:
      the value of the snmpV3 record component
    • tls

      Returns the value of the tls record component.
      Returns:
      the value of the tls record component
    • allowAdhocParameterOverwrite

      public boolean allowAdhocParameterOverwrite()
      Returns the value of the allowAdhocParameterOverwrite record component.
      Returns:
      the value of the allowAdhocParameterOverwrite record component