-
- All Known Implementing Classes:
SimpleVariableTextFormat
public interface VariableTextFormatTheVariableTextFormatprovides a textual representation of SNMPVariables, in dependence of their associated (instance) OID.- Since:
- 1.10
- Version:
- 1.10
- Author:
- Frank Fock
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Stringformat(OID instanceOID, Variable variable, boolean withOID)Returns a textual representation of the supplied variable against the optionally supplied instance OID.Variableparse(int smiSyntax, java.lang.String text)Parses a textual representation of a variable against a SMI type.Variableparse(OID classOrInstanceOID, java.lang.String text)Parses a textual representation of a variable against its associated OBJECT-TYPE OID.VariableBindingparseVariableBinding(java.lang.String text)Parses a textual representation of a variable binding.
-
-
-
Method Detail
-
format
java.lang.String format(OID instanceOID, Variable variable, boolean withOID)
Returns a textual representation of the supplied variable against the optionally supplied instance OID.- Parameters:
instanceOID- the instance OIDvariableis associated with. Ifnullthe 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- iftruetheinstanceOIDshould be included in the textual representation to form aVariableBindingrepresentation.- Returns:
- the textual representation.
-
parseVariableBinding
VariableBinding parseVariableBinding(java.lang.String text) throws java.text.ParseException
Parses a textual representation of a variable binding.- Parameters:
text- a textual representation of the variable binding.- Returns:
- the new
VariableBindinginstance. - Throws:
java.text.ParseException- if the variable binding cannot be parsed successfully.
-
parse
Variable parse(OID classOrInstanceOID, java.lang.String text) throws java.text.ParseException
Parses a textual representation of a variable against its associated OBJECT-TYPE OID.- Parameters:
classOrInstanceOID- the instance OIDvariableis associated with. Must not benull.text- a textual representation of the variable.- Returns:
- the new
Variableinstance. - Throws:
java.text.ParseException- if the variable cannot be parsed successfully.
-
parse
Variable parse(int smiSyntax, java.lang.String text) throws java.text.ParseException
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
Variableinstance. - Throws:
java.text.ParseException- if the variable cannot be parsed successfully.
-
-