org.geotools.factory
Class FactoryUsingVolatileDependencies

java.lang.Object
  extended byorg.geotools.factory.AbstractFactory
      extended byorg.geotools.factory.FactoryUsingVolatileDependencies
All Implemented Interfaces:
Factory, javax.imageio.spi.RegisterableService

public class FactoryUsingVolatileDependencies
extends AbstractFactory

A factory that can not determines all its dependencies at construction time. Because this factory may creates new factories at any time, it must keep all user-supplied hints. The general contract of AbstractFactory.hints said that we can't use this field for creating new factories. But instances of this classe are special cases where we can, because this class retains all user-supplied hints.

Extends this class only if you really need to keep all user-supplied hints, because doing so has a cost:

Version:
$Id: FactoryUsingVolatileDependencies.java 17672 2006-01-19 00:25:55Z desruisseaux $
Author:
Martin Desruisseaux

Field Summary
 
Fields inherited from class org.geotools.factory.AbstractFactory
hints, MAXIMUM_PRIORITY, MINIMUM_PRIORITY, NORMAL_PRIORITY, priority
 
Constructor Summary
FactoryUsingVolatileDependencies(Hints hints)
          Constructs a factory with a default priority.
FactoryUsingVolatileDependencies(Hints hints, int priority)
          Constructs a factory with the specified priority.
 
Methods inherited from class org.geotools.factory.AbstractFactory
getImplementationHints, onDeregistration, onRegistration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FactoryUsingVolatileDependencies

public FactoryUsingVolatileDependencies(Hints hints)
Constructs a factory with a default priority.

Parameters:
hints - The user-supplied hints.

FactoryUsingVolatileDependencies

public FactoryUsingVolatileDependencies(Hints hints,
                                        int priority)
Constructs a factory with the specified priority.

Parameters:
hints - The user-supplied hints.
priority - The priority for this factory, as a number between AbstractFactory.MINIMUM_PRIORITY and AbstractFactory.MAXIMUM_PRIORITY inclusive.


Copyright © GeoTools. All Rights Reserved.