|
Spring Web Services Framework | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.xml.transform.TransformerObjectSupport
public abstract class TransformerObjectSupport
Convenient base class for objects that use a Transformer. Subclasses can call createTransformer() or transform(Source, Result). This should be done per thread (i.e. per incoming
request), because Transformer instances are not thread-safe.
Transformer| Field Summary | |
|---|---|
protected Log |
logger
Logger available to subclasses. |
| Constructor Summary | |
|---|---|
TransformerObjectSupport()
|
|
| Method Summary | |
|---|---|
protected Transformer |
createTransformer()
Creates a new Transformer. |
protected TransformerFactory |
getTransformerFactory()
Returns the TransformerFactory. |
protected TransformerFactory |
newTransformerFactory(Class<? extends TransformerFactory> transformerFactoryClass)
Instantiate a new TransformerFactory. |
void |
setTransformerFactoryClass(Class<? extends TransformerFactory> transformerFactoryClass)
Specify the TransformerFactory class to use. |
protected void |
transform(Source source,
Result result)
Transforms the given Source to the given Result. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final Log logger
| Constructor Detail |
|---|
public TransformerObjectSupport()
| Method Detail |
|---|
public void setTransformerFactoryClass(Class<? extends TransformerFactory> transformerFactoryClass)
TransformerFactory class to use.
protected TransformerFactory newTransformerFactory(Class<? extends TransformerFactory> transformerFactoryClass)
The default implementation simply calls TransformerFactory.newInstance(). If a "transformerFactoryClass" has been
specified explicitly, the default constructor of the specified class will be called instead.
Can be overridden in subclasses.
transformerFactoryClass - the specified factory class (if any)
setTransformerFactoryClass(java.lang.Class extends javax.xml.transform.TransformerFactory>),
getTransformerFactory()protected TransformerFactory getTransformerFactory()
TransformerFactory.
protected final Transformer createTransformer()
throws TransformerConfigurationException
Transformer. Must be called per request, as transformers are not thread-safe.
TransformerConfigurationException - if thrown by JAXP methods
protected final void transform(Source source,
Result result)
throws TransformerException
Source to the given Result. Creates a new Transformer for every
call, as transformers are not thread-safe.
source - the source to transform fromresult - the result to transform to
TransformerException - if thrown by JAXP methods
|
Spring Web Services Framework | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||