java.lang.Object
org.snmp4j.util.SimpleVariableTextFormat
- All Implemented Interfaces:
VariableTextFormat
The
SimpleVariableTextFormat
implements a simple textual
representation for SNMP variables based on their type only.
No MIB information is used (can be used).- Since:
- 1.10
- Version:
- 1.10
- Author:
- Frank Fock
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns a textual representation of the supplied variable against the optionally supplied instance OID.This operation is not supported bySimpleVariableTextFormat
.This operation is not supported bySimpleVariableTextFormat
.parseVariableBinding
(String text) Parses a textual representation of a variable binding.
-
Constructor Details
-
SimpleVariableTextFormat
public SimpleVariableTextFormat()Creates a simple variable text format.
-
-
Method Details
-
format
Returns a textual representation of the supplied variable against the optionally supplied instance OID.- Specified by:
format
in interfaceVariableTextFormat
- Parameters:
instanceOID
- the instance OIDvariable
is associated with. Ifnull
the formatting cannot take any MIB specification of the variable into account and has to format it based on its type only.variable
- the variable to format.withOID
- iftrue
theinstanceOID
should be included in the textual representation to form aVariableBinding
representation.- Returns:
- the textual representation.
-
parse
This operation is not supported bySimpleVariableTextFormat
.- Specified by:
parse
in interfaceVariableTextFormat
- Parameters:
smiSyntax
- the SMI syntax identifier identifying the targetVariable
.text
- a textual representation of the variable.- Returns:
- the new
Variable
instance. - Throws:
ParseException
- if the variable cannot be parsed successfully.
-
parse
This operation is not supported bySimpleVariableTextFormat
.- Specified by:
parse
in interfaceVariableTextFormat
- Parameters:
classOrInstanceOID
- the instance OIDvariable
is associated with. Must not benull
.text
- a textual representation of the variable.- Returns:
- the new
Variable
instance. - Throws:
ParseException
- if the variable cannot be parsed successfully.
-
parseVariableBinding
Description copied from interface:VariableTextFormat
Parses a textual representation of a variable binding.- Specified by:
parseVariableBinding
in interfaceVariableTextFormat
- Parameters:
text
- a textual representation of the variable binding.- Returns:
- the new
VariableBinding
instance. - Throws:
ParseException
- if the variable binding cannot be parsed successfully.
-