Interface MOInput
- All Known Implementing Classes:
DefaultMOInput, PropertyMOInput
public interface MOInput
The
MOInput models the interface for reading ManagedObject
data into a SNMP4J-Agent in a generic way.- Version:
- 1.2
- Author:
- Frank Fock
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()intReturns the update mode, which might be one of the constants defined byImportMode.Reads and returns aContextfrom the input source.Reads and returns anIndexedVariablesinstance from the input source.Reads and returns aMOInfoobject from the input source.Reads and returns aSequencefrom the input source.org.snmp4j.smi.VariableReads aVariablefrom the input source.voidskipContext(Context context) Skips the specifiedContextduring the reading process.voidSkips to the end of the specified managed object's configuration.
-
Method Details
-
getImportMode
int getImportMode()Returns the update mode, which might be one of the constants defined byImportMode.- Returns:
- the constant denoting the update mode that should be used by a
SerializableManagedObjectto import its content from persistent storage.
-
readContext
Reads and returns aContextfrom the input source.- Returns:
- a
Contextinstance representing the context information extracted from the input source. - Throws:
IOException- if an error occurs while reading theContext.
-
skipContext
Skips the specifiedContextduring the reading process. This method is used to bypass a context in the input stream without processing it.- Parameters:
context- theContextinstance to be skipped. This represents specific context information that is available in the input.- Throws:
IOException- if an I/O error occurs while attempting to skip the context in the input stream.
-
readManagedObject
Reads and returns aMOInfoobject from the input source. AMOInfoinstance encapsulates information about a managed object, including its unique identifier (OID) and version details.- Returns:
- a
MOInfoinstance representing the managed object information read from the input source. - Throws:
IOException- if an I/O error occurs while reading the managed object.
-
skipManagedObject
Skips to the end of the specified managed object's configuration.- Parameters:
mo- a MOInfo instance.- Throws:
IOException- if the input stream cannot be read.
-
readVariable
Reads aVariablefrom the input source.- Returns:
- a
Variableobject representing the data read from the input source. - Throws:
IOException- if an I/O error occurs while reading theVariable.
-
readSequence
Reads and returns aSequencefrom the input source.- Returns:
- a
Sequenceobject representing the data read from the input source. - Throws:
IOException- if an I/O error occurs while reading theSequence.
-
readIndexedVariables
Reads and returns anIndexedVariablesinstance from the input source. AnIndexedVariablesobject encapsulates an index and an array of variables, providing a structured representation of indexed row data.- Returns:
- an
IndexedVariablesinstance representing the indexed row data read from the input. - Throws:
IOException- if an I/O error occurs while reading the input source.
-
close
- Throws:
IOException
-