org.shiftone.jrat.provider.tree
Class TreeMethodHandlerFactory
java.lang.Object
org.shiftone.jrat.core.spi.AbstractMethodHandlerFactory
org.shiftone.jrat.provider.tree.TreeMethodHandlerFactory
- All Implemented Interfaces:
- ShutdownListener, MethodHandlerFactory, TreeMethodHandlerFactoryMBean
public class TreeMethodHandlerFactory
- extends AbstractMethodHandlerFactory
- implements TreeMethodHandlerFactoryMBean
Class TreeMethodHandlerFactory
- Author:
- jeff@shiftone.org (Jeff Drost)
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) |
Delegate |
getDelegate()
Returns the current thread's delegate instance. |
long |
getMethodHandlerCount()
|
TreeNode |
getRootNode()
|
void |
reset()
|
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. |
java.lang.String |
toString()
|
void |
writeOutputFile()
|
void |
writeOutputFile(java.lang.String fileName)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
TreeMethodHandlerFactory
public TreeMethodHandlerFactory()
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
- Overrides:
startup
in class AbstractMethodHandlerFactory
- Throws:
java.lang.Exception
- See Also:
ShutdownListener
createMethodHandler
public final 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
- Specified by:
createMethodHandler
in class AbstractMethodHandlerFactory
getMethodHandlerCount
public long getMethodHandlerCount()
- Specified by:
getMethodHandlerCount
in interface TreeMethodHandlerFactoryMBean
getDelegate
public final Delegate getDelegate()
- Returns the current thread's delegate instance. This delegate will
operate on this factory's call tree data structure when events are
processed.
getRootNode
public final TreeNode getRootNode()
writeOutputFile
public void writeOutputFile()
- Specified by:
writeOutputFile
in interface TreeMethodHandlerFactoryMBean
reset
public void reset()
writeOutputFile
public void writeOutputFile(java.lang.String fileName)
- Specified by:
writeOutputFile
in interface TreeMethodHandlerFactoryMBean
shutdown
public void shutdown()
- Specified by:
shutdown
in interface ShutdownListener
- Overrides:
shutdown
in class AbstractMethodHandlerFactory
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object