public abstract class BaseMib
extends java.lang.Object
| Constructor and Description |
|---|
BaseMib()
Default constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addHandler(FHandler handler)
Adds handler to the MIB.
|
protected void |
addNode(FNode node)
Adds node to the MIB.
|
AgentWorker |
agent()
Returns SNMP agent.
|
void |
collectHandlers(java.util.Collection<FHandler> c)
Collect handlers from this object
|
void |
collectNodes(java.util.Map<FID,FNode> c)
Collect nodes from this object
|
void |
exceptionThrown(FException e)
Sends exception to all registered listeners in the application.
|
void |
exceptionThrown(FTable table,
FException e)
Sends exception to the registered listeners in the application with
a message that a problem is found while updating the table.
|
void |
exceptionThrown(java.lang.String msg,
FException e)
Sends exception to the registered listener in the application
|
void |
init(AgentWorker aw)
Actual implementation is provided in generated MIB-to-Java class.
|
boolean |
isInited()
Checks the state of this MIB object.
|
abstract void |
registerMOs(org.snmp4j.agent.MOServer server,
org.snmp4j.smi.OctetString context)
Registers objects.
|
void |
reportException(java.lang.String comment,
java.lang.Throwable e)
Use this method to report caught exception to MIB browser via SNMP.
|
abstract void |
unregisterMOs(org.snmp4j.agent.MOServer server,
org.snmp4j.smi.OctetString context)
Unregisters objects.
|
public void addHandler(FHandler handler) throws FException
handler - handler.FException - failure to register MIB.protected void addNode(FNode node)
node - node.public void collectHandlers(java.util.Collection<FHandler> c)
c - collection handlers from MIB are added to this collectionpublic void collectNodes(java.util.Map<FID,FNode> c)
c - collection nodes from MIB are added to this collectionpublic void init(AgentWorker aw) throws FException
aw - SNMP agentFException - exception might be thrown in derived class.public boolean isInited()
init(AgentWorker) was called.public AgentWorker agent()
public abstract void registerMOs(org.snmp4j.agent.MOServer server,
org.snmp4j.smi.OctetString context)
throws org.snmp4j.agent.DuplicateRegistrationException
server - SNMP4J agent.context - context.org.snmp4j.agent.DuplicateRegistrationException - if duplicate registration.public abstract void unregisterMOs(org.snmp4j.agent.MOServer server,
org.snmp4j.smi.OctetString context)
server - SNMP4J servercontext - contextpublic void exceptionThrown(FException e)
e - exceptionFExceptionListenerpublic void exceptionThrown(FTable table, FException e)
table - the table with the exceptione - exceptionpublic void exceptionThrown(java.lang.String msg,
FException e)
msg - message with details about the exception, or nulle - exceptionpublic void reportException(java.lang.String comment,
java.lang.Throwable e)
comment - error message (empty or null)e - exception