public class SimpleVariableTextFormat extends Object implements VariableTextFormat
SimpleVariableTextFormat implements a simple textual
representation for SNMP variables based on their type only.
No MIB information is used (can be used).| Constructor and Description |
|---|
SimpleVariableTextFormat()
Creates a simple variable text format.
|
| Modifier and Type | Method and Description |
|---|---|
String |
format(OID instanceOID,
Variable variable,
boolean withOID)
Returns a textual representation of the supplied variable against the
optionally supplied instance OID.
|
Variable |
parse(int smiSyntax,
String text)
This operation is not supported by
SimpleVariableTextFormat. |
Variable |
parse(OID classOrInstanceOID,
String text)
This operation is not supported by
SimpleVariableTextFormat. |
VariableBinding |
parseVariableBinding(String text)
Parses a textual representation of a variable binding.
|
public SimpleVariableTextFormat()
public String format(OID instanceOID, Variable variable, boolean withOID)
format in interface VariableTextFormatinstanceOID - the instance OID variable is associated
with. If null 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 - if true the instanceOID should be included
in the textual representation to form a VariableBinding
representation.public Variable parse(int smiSyntax, String text) throws ParseException
SimpleVariableTextFormat.parse in interface VariableTextFormatsmiSyntax - the SMI syntax identifier identifying the target
Variable.text - a textual representation of the variable.Variable instance.ParseException - if the variable cannot be parsed successfully.public Variable parse(OID classOrInstanceOID, String text) throws ParseException
SimpleVariableTextFormat.parse in interface VariableTextFormatclassOrInstanceOID - the instance OID variable is associated with. Must not
be null.text - a textual representation of the variable.Variable instance.ParseException - if the variable cannot be parsed successfully.public VariableBinding parseVariableBinding(String text) throws ParseException
VariableTextFormatparseVariableBinding in interface VariableTextFormattext - a textual representation of the variable binding.VariableBinding instance.ParseException - if the variable binding cannot be parsed successfully.Copyright © 2016 SNMP4J.org. All Rights Reserved.