com.caucho.loader
Class CloseListener

java.lang.Object
  extended by com.caucho.loader.CloseListener
All Implemented Interfaces:
ClassLoaderListener, java.util.EventListener

public class CloseListener
extends java.lang.Object
implements ClassLoaderListener

Waits for the close event and calls a destroy() method.


Constructor Summary
CloseListener(java.lang.Object resource)
          Creates the new close listener.
 
Method Summary
 void classLoaderDestroy(DynamicClassLoader loader)
          Handles the case where a class loader is dropped.
 void classLoaderInit(DynamicClassLoader loader)
          Handles the case where a class loader is activated.
static java.lang.reflect.Method getDestroyMethod(java.lang.Class cl)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CloseListener

public CloseListener(java.lang.Object resource)
Creates the new close listener.

Parameters:
resource - the resource which needs closing
Method Detail

classLoaderInit

public void classLoaderInit(DynamicClassLoader loader)
Handles the case where a class loader is activated.

Specified by:
classLoaderInit in interface ClassLoaderListener

classLoaderDestroy

public void classLoaderDestroy(DynamicClassLoader loader)
Handles the case where a class loader is dropped.

Specified by:
classLoaderDestroy in interface ClassLoaderListener

getDestroyMethod

public static java.lang.reflect.Method getDestroyMethod(java.lang.Class cl)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object