Class ModelRepositoryContext
java.lang.Object
org.snmp4j.mcp.ModelRepositoryContext
- All Implemented Interfaces:
McpContext
A context for accessing model repository data.
- Since:
- 0.0.1
- Version:
- 0.1.0
- Author:
- SNMP4J.org
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new ModelRepositoryContext with default id and name. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Releases any resources used by this context.String[]Gets any dependent contexts that this context requires.Gets the description for this context.getId()Gets the unique identifier for this context.getName()Gets the display name for this context.Gets a value from the context.voidinitialize(Map<String, Object> config) Initializes the context with the given configuration.booleanisReady()Checks if the context is ready for use.voidSets a value in the context.
-
Constructor Details
-
ModelRepositoryContext
public ModelRepositoryContext()Creates a new ModelRepositoryContext with default id and name.
-
-
Method Details
-
getId
Description copied from interface:McpContextGets the unique identifier for this context.- Specified by:
getIdin interfaceMcpContext- Returns:
- the context ID
-
getName
Description copied from interface:McpContextGets the display name for this context.- Specified by:
getNamein interfaceMcpContext- Returns:
- the context name
-
getDescription
Description copied from interface:McpContextGets the description for this context.- Specified by:
getDescriptionin interfaceMcpContext- Returns:
- the context description
-
initialize
Description copied from interface:McpContextInitializes the context with the given configuration.- Specified by:
initializein interfaceMcpContext- Parameters:
config- the configuration to use- Throws:
McpContextException- if initialization fails
-
close
public void close()Description copied from interface:McpContextReleases any resources used by this context.- Specified by:
closein interfaceMcpContext
-
getValue
Description copied from interface:McpContextGets a value from the context.- Specified by:
getValuein interfaceMcpContext- Parameters:
key- the key to look up- Returns:
- the value associated with the key, or null if not found
-
setValue
Description copied from interface:McpContextSets a value in the context.- Specified by:
setValuein interfaceMcpContext- Parameters:
key- the key to setvalue- the value to associate with the key
-
isReady
public boolean isReady()Description copied from interface:McpContextChecks if the context is ready for use.- Specified by:
isReadyin interfaceMcpContext- Returns:
- true if the context is ready, false otherwise
-
getDependentContextIds
Description copied from interface:McpContextGets any dependent contexts that this context requires.- Specified by:
getDependentContextIdsin interfaceMcpContext- Returns:
- an array of required context IDs
-