org.friendlysnmp.plugin.core
Class CoreExceptionsHandler

java.lang.Object
  extended by org.friendlysnmp.FHandler
      extended by org.friendlysnmp.plugin.core.CoreExceptionsHandler
All Implemented Interfaces:
UncaughtExceptionListener

public class CoreExceptionsHandler
extends FHandler
implements UncaughtExceptionListener

The class provides application information to SNMP objects declared in FRIENDLY-SNMP-MIB.

Version:
$Revision: 1.20 $

Nested Class Summary
 
Nested classes/interfaces inherited from class org.friendlysnmp.FHandler
FHandler.AgentStartType
 
Field Summary
 
Fields inherited from class org.friendlysnmp.FHandler
agent, mibBase
 
Constructor Summary
CoreExceptionsHandler()
           
 
Method Summary
 void init()
          The method is called by SNMP agent when it's initialized.
 void registerMib(BaseMib mibBase)
           
 void reportException(java.lang.String comment, java.lang.Throwable e)
          Adds exception to the list
 void uncaughtException(java.lang.Thread t, java.lang.Throwable e)
          Invoked from UncaughtExceptionHandler when an uncaught exception is discovered.
 
Methods inherited from class org.friendlysnmp.FHandler
getTimestampNow, isIntegerEqual, setAgent, shutdown, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CoreExceptionsHandler

public CoreExceptionsHandler()
Method Detail

init

public void init()
The method is called by SNMP agent when it's initialized. Default implementation does nothing. Override this method in derived class, for example, to initialize static scalars and tables.

Overrides:
init in class FHandler
See Also:
FHandler.init()

registerMib

public void registerMib(BaseMib mibBase)
                 throws FException
Overrides:
registerMib in class FHandler
Throws:
FException

reportException

public void reportException(java.lang.String comment,
                            java.lang.Throwable e)
Adds exception to the list

Parameters:
comment - exception comment
e - exception

uncaughtException

public void uncaughtException(java.lang.Thread t,
                              java.lang.Throwable e)
Invoked from UncaughtExceptionHandler when an uncaught exception is discovered.

Specified by:
uncaughtException in interface UncaughtExceptionListener
Parameters:
t - thread were exception was discovered
e - exception
See Also:
UncaughtExceptionListener.uncaughtException(java.lang.Thread, java.lang.Throwable)