|
Jumpi v1.2.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.jumpi.impl.AbstractTransformer
An AbstractTransformer is an empty Component which supports no management
operations and the configuration of a sole next Transformer, for forward
transformation linking. A concrete implementation of an AbstractTransformer
must simply implement a transform(org.jumpi.spi.Envelope)
method and pass the
transformation on to the next Transformer when finished its own
transformation.
Field Summary | |
protected boolean |
exceptionOnMismatch_
Whether to throw an Exception if the transformation input conditions are not met. |
protected Jumpi |
jumpi_
The Jumpi instance root component. |
protected java.lang.String |
name_
The component's name. |
protected Transformer |
nextTransformer_
The next Transformer to call once the own transformation is performed. |
protected boolean |
warnOnMismatch_
Whether to warn if the transformation input conditions are not met. |
Constructor Summary | |
AbstractTransformer()
|
Method Summary | |
void |
configure(java.lang.String name,
Properties props)
Configure the AbstractTransformer instance. |
protected void |
doNextTransformation(Envelope env)
Pass the Envelope on to the next Transformer in the processing chain. |
java.lang.String |
getName()
Get the fully qualified name of the instance. |
void |
manage(Component root,
Component parent,
java.lang.String operation,
java.util.Hashtable parameters)
Perform a recursive management operation through the Jumpi component tree, using the parameters provided. |
abstract void |
transform(Envelope env)
Transform data provided on the Envelope's context stack and place the result on the Envelope's context stack. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.lang.String name_
protected Jumpi jumpi_
protected Transformer nextTransformer_
protected boolean warnOnMismatch_
protected boolean exceptionOnMismatch_
Constructor Detail |
public AbstractTransformer()
Method Detail |
public abstract void transform(Envelope env) throws java.lang.Exception
transform
in interface Transformer
env
- The Envelope who's context stack data is to be transformed.
java.lang.Exception
- if any failure condition ocured. The Envelope's
context stack is undefined afterwards.public void configure(java.lang.String name, Properties props) throws java.lang.Exception
Configure the AbstractTransformer instance.
The following configuration attributes are defined.
next - instance - optional.
The next transformer's component name suffix.
warnonmismatch - boolean - optional[false].
Whether to warn if input data does not match the conditions for transformation.
exceptiononmismatch - boolean - optional[false].
Whether to throw an Exception if input data does not match the conditions for transformation.
Component name suffixes are appended onto the instance's fully qualified instance name. The child component's fully qualified instance name suffixed with '.classname' gives the property which determines which class to load for the instance.
configure
in interface Configurable
name
- the fully qualified instance name.props
- the read-only properties to configure the instance with.
java.lang.Exception
- when configuration is unsuccessful.
java.lang.IllegalArgumentException
- if name or props is null or invalid
parameters.public java.lang.String getName()
getName
in interface Configurable
configure(java.lang.String, org.jumpi.spi.Properties)
public void manage(Component root, Component parent, java.lang.String operation, java.util.Hashtable parameters) throws java.lang.Exception
The following management actions are handled:
manage
in interface Manageable
root
- the Jumpi instance at the root of the component tree.parent
- the immediate parent of the component.operation
- the operation.parameters
- the operation parameters.
java.lang.Exception
- if any failure to perform management occurs.
java.lang.IllegalArgumentException
- when parameters are missing.protected void doNextTransformation(Envelope env) throws java.lang.Exception
env
- the Envelope containing the context stack being transformed.
java.lang.Exception
- if any failure condition occurs.
|
Jumpi v1.2.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |