org.jhotdraw.contrib.html
Class DisposableResourceManagerFactory

java.lang.Object
  extended by org.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$>
Author:
Eduardo Francos - InContext

Field Summary
static long DEFAULT_DISPOSAL_PERIODICITY
          The default periodicity for resource disposal
 
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.
static void setStrategy(ResourceDisposabilityStrategy strategy)
          Sets the strategy of the DisposableResourceManagerFactory class.
 
Methods inherited from class java.lang.Object
equals, 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

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