org.shiftone.jrat.core.spi
Class AbstractMethodHandlerFactory
java.lang.Object
org.shiftone.jrat.core.spi.AbstractMethodHandlerFactory
- All Implemented Interfaces:
- ShutdownListener, MethodHandlerFactory
- Direct Known Subclasses:
- TreeMethodHandlerFactory
public abstract class AbstractMethodHandlerFactory
- extends java.lang.Object
- implements MethodHandlerFactory, ShutdownListener
- Author:
- jeff@shiftone.org (Jeff Drost)
Method Summary |
abstract 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 |
flush()
|
RuntimeContext |
getContext()
|
java.lang.String |
getOutputFile()
|
void |
setOutputFile(java.lang.String outputFile)
|
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 |
AbstractMethodHandlerFactory
public AbstractMethodHandlerFactory()
createMethodHandler
public abstract 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
getContext
public RuntimeContext getContext()
setOutputFile
public void setOutputFile(java.lang.String outputFile)
getOutputFile
public java.lang.String getOutputFile()
shutdown
public void shutdown()
- Specified by:
shutdown
in interface ShutdownListener
flush
public void flush()
startup
public void startup(RuntimeContext context)
throws java.lang.Exception
- 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
- Throws:
java.lang.Exception
- See Also:
ShutdownListener