Package org.snmp4j.util
Interface VariableTextFormat
- All Known Implementing Classes:
SimpleVariableTextFormat
public interface VariableTextFormat
The
VariableTextFormat
provides a textual representation
of SNMP Variable
s, in dependence of their associated (instance) OID.- Since:
- 1.10
- Version:
- 1.10
- Author:
- Frank Fock
-
Method Summary
Modifier and TypeMethodDescriptionReturns a textual representation of the supplied variable against the optionally supplied instance OID.Parses a textual representation of a variable against a SMI type.Parses a textual representation of a variable against its associated OBJECT-TYPE OID.parseVariableBinding
(String text) Parses a textual representation of a variable binding.
-
Method Details
-
format
Returns a textual representation of the supplied variable against the optionally supplied instance OID.- 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.
-
parseVariableBinding
Parses a textual representation of a variable binding.- Parameters:
text
- a textual representation of the variable binding.- Returns:
- the new
VariableBinding
instance. - Throws:
ParseException
- if the variable binding cannot be parsed successfully.
-
parse
Parses a textual representation of a variable against its associated OBJECT-TYPE OID.- 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.
-
parse
Parses a textual representation of a variable against a SMI type.- 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.
-