com.teamdev.xpcom
Class DefaultAsyncHandler

java.lang.Object
  extended by com.teamdev.xpcom.DefaultAsyncHandler
All Implemented Interfaces:
AsyncHandler, AsyncHandlerFactory

public class DefaultAsyncHandler
extends java.lang.Object
implements AsyncHandler, AsyncHandlerFactory

Very basic implementation of both AsyncHandlerFactory and AsyncHandler. Uses self as handler, re-throwing exception.


Constructor Summary
DefaultAsyncHandler()
           
 
Method Summary
 void after(java.lang.Throwable t)
          Re-throws exception if it is not null, no-op otherwise.
 void before()
          No-op.
 AsyncHandler createHandler()
          Returns self to be used as a handler.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultAsyncHandler

public DefaultAsyncHandler()
Method Detail

before

public void before()
No-op.

Specified by:
before in interface AsyncHandler

after

public void after(java.lang.Throwable t)
Re-throws exception if it is not null, no-op otherwise.

Specified by:
after in interface AsyncHandler
Parameters:
t - an exception that was thrown during asynchronous method execution, or null if execution completed successfully. This exception will not be re-thrown by the outside code.

createHandler

public AsyncHandler createHandler()
Returns self to be used as a handler.

Specified by:
createHandler in interface AsyncHandlerFactory
Returns:
The handler object.