org.jhotdraw.contrib.html
Class DisposableResourceManagerFactory

java.lang.Object
  extended byorg.jhotdraw.contrib.html.DisposableResourceManagerFactory

public abstract class DisposableResourceManagerFactory
extends java.lang.Object

DisposableResourceManagerFactory creates DisposableResourceHolders on behalf of requesting clients. It automatically registers the holders with its singleton standard resource manager

Version:
<$CURRENT_VERSION$>

Field Summary
protected static DisposableResourceManager currentManager
          The singleton current resource manager
protected static ResourceDisposabilityStrategy currentStrategy
           
static long DEFAULT_DISPOSAL_PERIODICITY
          The default periodicity for resource disposal
protected static DisposableResourceHolder holderPrototype
           
 
Constructor Summary
DisposableResourceManagerFactory()
           
 
Method Summary
static DisposableResourceHolder createStandardHolder(java.lang.Object resource)
          Returns a new standard resource holder already registered with the default resource manager
static DisposableResourceManager getManager()
          Gets the current manager.
protected static void initManager()
          Initializes the standard resource disposal manager
static void setStrategy(ResourceDisposabilityStrategy strategy)
          Sets the strategy of the DisposableResourceManagerFactory class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_DISPOSAL_PERIODICITY

public static long DEFAULT_DISPOSAL_PERIODICITY
The default periodicity for resource disposal


currentManager

protected static DisposableResourceManager currentManager
The singleton current resource manager


currentStrategy

protected static ResourceDisposabilityStrategy currentStrategy

holderPrototype

protected static DisposableResourceHolder holderPrototype
Constructor Detail

DisposableResourceManagerFactory

public DisposableResourceManagerFactory()
Method Detail

getManager

public static DisposableResourceManager getManager()
Gets the current manager.

Returns:
The currentManager

setStrategy

public static void setStrategy(ResourceDisposabilityStrategy strategy)
Sets the strategy of the DisposableResourceManagerFactory class. This is a one shot thing that should be initialized before using it so if there is already a strategy this returns without further notice.

Parameters:
strategy - The new disposalStrategy

createStandardHolder

public static DisposableResourceHolder createStandardHolder(java.lang.Object resource)
Returns a new standard resource holder already registered with the default resource manager

Parameters:
resource - Description of the Parameter
Returns:
the newly created resource holder

initManager

protected static void initManager()
Initializes the standard resource disposal manager