Record Class SnmpMcpServer.ServerConfiguration.MibConfig

java.lang.Object
java.lang.Record
org.snmp4j.mcp.SnmpMcpServer.ServerConfiguration.MibConfig
Record Components:
repositoryPath - The file system path to the repository containing MIB files.
moduleNames - A list of MIB module names to be loaded or operated on.
maxModuleLoadThreads - The maximum number of threads used for concurrently loading MIB modules.
autoCompletionMaxElements - Maximum number of entries returned by any auto-completion lookup. null or absent in JSON uses the default of 100. A value of <= 0 disables the upper limit.
mibSourcePath - The file system path to the directory that holds MIB source files (text or ZIP) which the MIB compiler tools may read by relative filename. Filenames passed to those tools are resolved against this directory and rejected if they escape it. null or absent in JSON uses the default "mibs".
Enclosing class:
SnmpMcpServer.ServerConfiguration

public static record SnmpMcpServer.ServerConfiguration.MibConfig(String repositoryPath, List<String> moduleNames, String maxModuleLoadThreads, Integer autoCompletionMaxElements, String mibSourcePath) extends Record
Represents the configuration for managing MIB (Management Information Base) settings. This record is used to specify the repository path for MIB files, a list of module names within the repository, and the maximum number of threads allocated for module loading operations.
Since:
0.0.1
Version:
0.1.0
Author:
SNMP4J.org
  • Field Details

    • DEFAULT_MIB_SOURCE_PATH

      public static final String DEFAULT_MIB_SOURCE_PATH
      Default directory (relative to the server working directory) for MIB source files that the MIB compiler tools may read by relative filename when mibSourcePath is not configured.
      See Also:
  • Constructor Details

    • MibConfig

      public MibConfig(String repositoryPath, List<String> moduleNames, String maxModuleLoadThreads, Integer autoCompletionMaxElements, String mibSourcePath)
      Creates an instance of a MibConfig record class.
      Parameters:
      repositoryPath - the value for the repositoryPath record component
      moduleNames - the value for the moduleNames record component
      maxModuleLoadThreads - the value for the maxModuleLoadThreads record component
      autoCompletionMaxElements - the value for the autoCompletionMaxElements record component
      mibSourcePath - the value for the mibSourcePath record component
  • Method Details

    • mibSourcePathOrDefault

      public String mibSourcePathOrDefault()
      Returns the configured MIB source directory, or "mibs" when the mibSourcePath property is not set (null or blank).
      Returns:
      the effective MIB source directory path, never null.
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • repositoryPath

      public String repositoryPath()
      Returns the value of the repositoryPath record component.
      Returns:
      the value of the repositoryPath record component
    • moduleNames

      public List<String> moduleNames()
      Returns the value of the moduleNames record component.
      Returns:
      the value of the moduleNames record component
    • maxModuleLoadThreads

      public String maxModuleLoadThreads()
      Returns the value of the maxModuleLoadThreads record component.
      Returns:
      the value of the maxModuleLoadThreads record component
    • autoCompletionMaxElements

      public Integer autoCompletionMaxElements()
      Returns the value of the autoCompletionMaxElements record component.
      Returns:
      the value of the autoCompletionMaxElements record component
    • mibSourcePath

      public String mibSourcePath()
      Returns the value of the mibSourcePath record component.
      Returns:
      the value of the mibSourcePath record component