All Packages Class Hierarchy This Package Previous Next Index
Class Snmp.MibMacro
java.lang.Object
|
+----Snmp.MibMacro
- public class MibMacro
- extends Object
The MibMacro class is used to parse the use of OBJECT-TYPE and TRAP-TYPE macros
in a MIB module.
Each instance of this class corresponds to a macro definition in a module.
The MACRO definition parser (constructor) is really unimplemented, and may never be.
Only supports specific MACROs, i.e. OBJECT-TYPE and
TRAP-TYPE, which are both hardcoded, so MACRO definitions are ignored
except for the name.
The instance name corresponds to the specific macro, e.g. OBJECT-TYPE.
API users will not use this class directly.
-
name
- The name of this MACRO instance, e.g.
-
MibMacro(String, Vector)
- Constructor, which only uses the name of the MACRO.
-
parseACCESS(MibModule, String)
- parse the Access clause.
-
parseINDEX(MibModule, StreamTokenizer)
- parse the index clause.
-
parseMacro(String, String, MibModule, StreamTokenizer)
- Parse the use of this macro.
-
parseObjectType(String, MibModule, StreamTokenizer)
- Parser for OBJECT-TYPE.
-
parseTrapType(String, MibModule, StreamTokenizer)
- Parser for TRAP-TYPE.
name
public String name
- The name of this MACRO instance, e.g. TRAP-TYPE
MibMacro
public MibMacro(String nam,
Vector toks)
- Constructor, which only uses the name of the MACRO. The tokens are
ignored since we cannot parse a macro definition
parseMacro
public Object parseMacro(String label,
String nam,
MibModule module,
StreamTokenizer tok) throws MibException, IOException
- Parse the use of this macro. Calls hardcoded parsers for each type.
- Throws: MibException
- is thrown on parse errors.
- Throws: IOException
- is thrown on file IO errors.
parseObjectType
public MibNode parseObjectType(String label,
MibModule module,
StreamTokenizer tok) throws MibException, IOException
- Parser for OBJECT-TYPE.
- Throws: MibException
- is thrown on parse errors.
- Throws: IOException
- is thrown on file IO errors.
parseTrapType
public MibTrap parseTrapType(String label,
MibModule module,
StreamTokenizer tok) throws MibException, IOException
- Parser for TRAP-TYPE.
- Throws: MibException
- is thrown on parse errors.
- Throws: IOException
- is thrown on file IO errors.
parseACCESS
protected int parseACCESS(MibModule module,
String access)
- parse the Access clause. API users need not use this method
parseINDEX
protected Vector parseINDEX(MibModule module,
StreamTokenizer tok) throws IOException, MibException
- parse the index clause. API users nedd not use this method.
- Throws: MibException
- is thrown upon parse errors.
- Throws: IOException
- is thrown upon IO errors.
All Packages Class Hierarchy This Package Previous Next Index