org.shiftone.jrat.provider.silent
Class SilentMethodHandler

java.lang.Object
  extended by org.shiftone.jrat.provider.silent.SilentMethodHandler
All Implemented Interfaces:
MethodHandler, MethodHandlerFactory

public class SilentMethodHandler
extends java.lang.Object
implements MethodHandler, MethodHandlerFactory

Class SilentMethodHandler

Author:
jeff@shiftone.org (Jeff Drost)

Field Summary
static MethodHandlerFactory HANDLER_FACTORY
           
static MethodHandler METHOD_HANDLER
           
 
Constructor Summary
SilentMethodHandler()
           
 
Method Summary
 MethodHandler createMethodHandler(MethodKey methodKey)
          Method createMethodHandler this method on a handler will never be called more than once with the same methodKey (caching need only be done at one layer) if there is an error, or some reason not to column a handler - this method should log a message and return null (this allows chain handler to not log to several silent handlers)
 void onMethodError(java.lang.Object obj, java.lang.Object[] args, java.lang.Throwable throwable)
           
 void onMethodFinish(java.lang.Object obj, long durationNanos, java.lang.Throwable throwable)
           
 void onMethodStart(java.lang.Object obj)
           
 void shutdown()
           
 void startup(RuntimeContext context)
          It is recommended that handler factories that require shutdown notification implement the ShutdownListener interface and call context.addShutdownListener(this) in their startup method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HANDLER_FACTORY

public static final MethodHandlerFactory HANDLER_FACTORY

METHOD_HANDLER

public static final MethodHandler METHOD_HANDLER
Constructor Detail

SilentMethodHandler

public SilentMethodHandler()
Method Detail

onMethodError

public void onMethodError(java.lang.Object obj,
                          java.lang.Object[] args,
                          java.lang.Throwable throwable)

onMethodFinish

public void onMethodFinish(java.lang.Object obj,
                           long durationNanos,
                           java.lang.Throwable throwable)
Specified by:
onMethodFinish in interface MethodHandler

onMethodStart

public void onMethodStart(java.lang.Object obj)
Specified by:
onMethodStart in interface MethodHandler

createMethodHandler

public MethodHandler createMethodHandler(MethodKey methodKey)
Description copied from interface: MethodHandlerFactory
Method createMethodHandler
  • this method on a handler will never be called more than once with the same methodKey (caching need only be done at one layer)
  • if there is an error, or some reason not to column a handler - this method should log a message and return null (this allows chain handler to not log to several silent handlers)
  • Specified by:
    createMethodHandler in interface MethodHandlerFactory

    startup

    public void startup(RuntimeContext context)
    Description copied from interface: MethodHandlerFactory
    It is recommended that handler factories that require shutdown notification implement the ShutdownListener interface and call context.addShutdownListener(this) in their startup method.

    Specified by:
    startup in interface MethodHandlerFactory
    See Also:
    ShutdownListener

    shutdown

    public void shutdown()