Class ModelRepositoryContext

java.lang.Object
org.snmp4j.mcp.ModelRepositoryContext
All Implemented Interfaces:
McpContext

public class ModelRepositoryContext extends Object implements McpContext
A context for accessing model repository data.
Since:
0.0.1
Version:
0.1.0
Author:
SNMP4J.org
  • Constructor Details

    • ModelRepositoryContext

      public ModelRepositoryContext()
      Creates a new ModelRepositoryContext with default id and name.
  • Method Details

    • getId

      public String getId()
      Description copied from interface: McpContext
      Gets the unique identifier for this context.
      Specified by:
      getId in interface McpContext
      Returns:
      the context ID
    • getName

      public String getName()
      Description copied from interface: McpContext
      Gets the display name for this context.
      Specified by:
      getName in interface McpContext
      Returns:
      the context name
    • getDescription

      public String getDescription()
      Description copied from interface: McpContext
      Gets the description for this context.
      Specified by:
      getDescription in interface McpContext
      Returns:
      the context description
    • initialize

      public void initialize(Map<String,Object> config) throws McpContextException
      Description copied from interface: McpContext
      Initializes the context with the given configuration.
      Specified by:
      initialize in interface McpContext
      Parameters:
      config - the configuration to use
      Throws:
      McpContextException - if initialization fails
    • close

      public void close()
      Description copied from interface: McpContext
      Releases any resources used by this context.
      Specified by:
      close in interface McpContext
    • getValue

      public Object getValue(String key)
      Description copied from interface: McpContext
      Gets a value from the context.
      Specified by:
      getValue in interface McpContext
      Parameters:
      key - the key to look up
      Returns:
      the value associated with the key, or null if not found
    • setValue

      public void setValue(String key, Object value)
      Description copied from interface: McpContext
      Sets a value in the context.
      Specified by:
      setValue in interface McpContext
      Parameters:
      key - the key to set
      value - the value to associate with the key
    • isReady

      public boolean isReady()
      Description copied from interface: McpContext
      Checks if the context is ready for use.
      Specified by:
      isReady in interface McpContext
      Returns:
      true if the context is ready, false otherwise
    • getDependentContextIds

      public String[] getDependentContextIds()
      Description copied from interface: McpContext
      Gets any dependent contexts that this context requires.
      Specified by:
      getDependentContextIds in interface McpContext
      Returns:
      an array of required context IDs