com.ibm.portal.resolver.xml
Interface PooledTemplates

All Superinterfaces:
javax.xml.transform.Templates

public interface PooledTemplates
extends javax.xml.transform.Templates

Templates that produce transformers that come from a pool of transformers and that can be returned to this pool. Example usage:

 final PooledTemplates templates = ...;
 final DisposableTransformer transformer = templates.newDisposableTransformer();
 try {
   transformer.transform(...);
 } finally {
   transformer.dispose();
 }
 

Since:
8.0.0.1

Method Summary
 int compact()
          Compact the pool to avoid excessive memory consumption.
 org.xml.sax.EntityResolver getEntityResolver()
          Returns the EntityResolver that is used to resolve XML entities during parsing
 javax.xml.transform.URIResolver getURIResolver()
          Returns the URIResolver that is used to resolve external objects
 DisposableTransformer newDisposableTransformer()
          Deprecated. use newTransformer() instead
 DisposableTransformer newTransformer()
          Create a new transformation context for this Templates object.
 DisposableTransformerHandler newTransformerHandler()
          Create a new transformation context for this Templates object.
 
Methods inherited from interface javax.xml.transform.Templates
getOutputProperties
 

Method Detail

compact

int compact()
Compact the pool to avoid excessive memory consumption.

Returns:
the current size of the pool

getEntityResolver

org.xml.sax.EntityResolver getEntityResolver()
Returns the EntityResolver that is used to resolve XML entities during parsing

Returns:
the entity resolver, not null
Since:
8.0

getURIResolver

javax.xml.transform.URIResolver getURIResolver()
Returns the URIResolver that is used to resolve external objects

Returns:
the resolver, not null
Since:
8.0

newDisposableTransformer

@Deprecated
DisposableTransformer newDisposableTransformer()
                                               throws javax.xml.transform.TransformerConfigurationException
Deprecated. use newTransformer() instead

Create a new transformation context for this Templates object. The transformer can be disposed and potentially reused

Returns:
A valid non-null instance of a Transformer.
Throws:
javax.xml.transform.TransformerConfigurationException - if a Transformer can not be created.

newTransformer

DisposableTransformer newTransformer()
                                     throws javax.xml.transform.TransformerConfigurationException
Create a new transformation context for this Templates object. The resulting transformer will be the same as the one returned by newDisposableTransformer, so it can also be cast to the Disposable interface.

Specified by:
newTransformer in interface javax.xml.transform.Templates
Returns:
A valid non-null instance of a Transformer.
Throws:
javax.xml.transform.TransformerConfigurationException - if a Transformer can not be created.

newTransformerHandler

DisposableTransformerHandler newTransformerHandler()
                                                   throws javax.xml.transform.TransformerConfigurationException
Create a new transformation context for this Templates object. The resulting transformer will be the same as the one returned by newDisposableTransformer, so it can also be cast to the Disposable interface.

Returns:
A valid non-null instance of a TransformerHandler.
Throws:
javax.xml.transform.TransformerConfigurationException - if a Transformer can not be created.