com.caucho.loader
Class WeakCloseListener

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

public class WeakCloseListener
extends java.lang.Object
implements ClassLoaderListener

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


Constructor Summary
WeakCloseListener(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.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WeakCloseListener

public WeakCloseListener(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

toString

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