org.millstone.webadapter
Class UIDLTransformerFactory

java.lang.Object
  |
  +--org.millstone.webadapter.UIDLTransformerFactory

public class UIDLTransformerFactory
extends java.lang.Object

Class implementing the MillStone WebAdapter UIDLTransformer Factory. The factory creates and maintains a pool of transformers that are used for transforming UIDL to HTML.

Since:
3.0
Version:
3.0.3
Author:
IT Mill Ltd.

Nested Class Summary
protected  class UIDLTransformerFactory.SpoolManager
          Class for periodically remove unused transformers from memory.
 
Constructor Summary
UIDLTransformerFactory(ThemeSource themeSource, WebAdapterServlet webAdapterServlet, int maxConcurrentTransformers, long cacheTime)
          Constructor for transformer factory.
 
Method Summary
 UIDLTransformer getTransformer(UIDLTransformerType type)
          Get new transformer of the specified type
 void releaseTransformer(UIDLTransformer transformer)
          Recycle a used transformer back to spool.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UIDLTransformerFactory

public UIDLTransformerFactory(ThemeSource themeSource,
                              WebAdapterServlet webAdapterServlet,
                              int maxConcurrentTransformers,
                              long cacheTime)
Constructor for transformer factory. Method UIDLTransformerFactory.

Parameters:
themeSource - Theme source to be used for themes.
webAdapterServlet - The Adapter servlet.
maxConcurrentTransformers - Maximum number of concurrent themes in use.
cacheTime - Time to cache the transformers.
Method Detail

getTransformer

public UIDLTransformer getTransformer(UIDLTransformerType type)
                               throws UIDLTransformerException
Get new transformer of the specified type

Parameters:
type - Type of the requested transformer.
Returns:
Created new transformer.
UIDLTransformerException

releaseTransformer

public void releaseTransformer(UIDLTransformer transformer)
Recycle a used transformer back to spool. One must guarantee not to use the transformer after it have been released.

Parameters:
transformer - UIDLTransformer to be recycled


Copyright © 2000,2001,2002 IT Mill Ltd. All Rights Reserved.