org.directwebremoting.guice
Class AbstractContextCloseHandler<T>

java.lang.Object
  extended by org.directwebremoting.guice.AbstractContextCloseHandler<T>
All Implemented Interfaces:
ContextCloseHandler<T>

public abstract class AbstractContextCloseHandler<T>
extends java.lang.Object
implements ContextCloseHandler<T>

A partially implemented handler for objects contained in contexts that are closing. Concrete extensions of this class only have to define close and have a constructor that calls super(T.class).

Author:
Tim Peierls [tim at peierls dot net]

Constructor Summary
protected AbstractContextCloseHandler(java.lang.Class<T> type)
           
 
Method Summary
abstract  void close(T object)
          Action to take when the context containing object is closed.
 java.lang.Class<T> type()
          The type of objects handled by this handler.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractContextCloseHandler

protected AbstractContextCloseHandler(java.lang.Class<T> type)
Method Detail

close

public abstract void close(T object)
                    throws java.lang.Exception
Description copied from interface: ContextCloseHandler
Action to take when the context containing object is closed.

Specified by:
close in interface ContextCloseHandler<T>
Throws:
java.lang.Exception

type

public java.lang.Class<T> type()
Description copied from interface: ContextCloseHandler
The type of objects handled by this handler.

Specified by:
type in interface ContextCloseHandler<T>


Copyright © 2007. All Rights Reserved.