org.mule.umo.transformer
Interface UMOSimpleTransformer

All Superinterfaces:
java.lang.Cloneable, Initialisable, java.io.Serializable
All Known Subinterfaces:
UMOTransformer
All Known Implementing Classes:
AbstractTransformer

public interface UMOSimpleTransformer
extends Initialisable, java.io.Serializable, java.lang.Cloneable

UMOSimpleTransformer manages the transformation and or translation of one type of data to the other. Source data is received, then processed and returned via the transform() method.

The return Class is specifed so that the return message is validated defore it is returned.

Version:
$Revision: 1.2 $
Author:
Ross Mason

Field Summary
static java.lang.String SERVICE_ID
          JDK1.3+ 'Service Provider' specification ( http://java.sun.com/j2se/1.3/docs/guide/jar/jar.html )
 
Method Summary
 java.lang.Object clone()
           
 java.lang.String getName()
           
 java.lang.Class getReturnClass()
           
 UMOTransformer getTransformer()
           
 void setName(java.lang.String newName)
           
 void setReturnClass(java.lang.Class theClass)
          Sets the expected return type for the transformed data.
 void setTransformer(UMOTransformer transformer)
           
 java.lang.Object transform(java.lang.Object src)
          Thransforms the supllied data and returns the result
 
Methods inherited from interface org.mule.umo.lifecycle.Initialisable
initialise
 

Field Detail

SERVICE_ID

public static final java.lang.String SERVICE_ID
JDK1.3+ 'Service Provider' specification ( http://java.sun.com/j2se/1.3/docs/guide/jar/jar.html )

See Also:
Constant Field Values
Method Detail

transform

public java.lang.Object transform(java.lang.Object src)
                           throws TransformerException
Thransforms the supllied data and returns the result

Parameters:
src - the data to transform
Returns:
the transformed data
Throws:
TransformerException - if a error occurs transforming the data or if the expected returnClass isn't the same as the transformed data

setName

public void setName(java.lang.String newName)
Parameters:
newName - the logical name for the transformer

getName

public java.lang.String getName()
Returns:
the logical name of the transformer

setReturnClass

public void setReturnClass(java.lang.Class theClass)
Sets the expected return type for the transformed data. If the transformed data is not of this class type a TransformerException will be thrown.

Parameters:
theClass - the expected return type class

getReturnClass

public java.lang.Class getReturnClass()
Returns:
the exceptedreturn type

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Throws:
java.lang.CloneNotSupportedException

getTransformer

public UMOTransformer getTransformer()

setTransformer

public void setTransformer(UMOTransformer transformer)


Copyright © 2003-2005 SymphonySoft Limited. All Rights Reserved.