net.sf.xbus.protocol.java
Class JavaTransformer
java.lang.Object
net.sf.xbus.protocol.java.JavaTransformer
- All Implemented Interfaces:
- Transformer
public class JavaTransformer
- extends java.lang.Object
- implements Transformer
The JavaTransformer
calls a method of a Java class, to
transform the source into the destination format. Which class and which
method to be used is read out of the configuration.
The signature of the called method must be:
public Object <i>methodName</i>(Object inObject) throws XException
Method Summary |
java.lang.Object |
transform(java.lang.Object inObject,
XBUSSystem source,
XBUSSystem destination,
Message destinationMessage)
The transform method is automatically called by the xBus
during the routing of messages. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JavaTransformer
public JavaTransformer()
transform
public java.lang.Object transform(java.lang.Object inObject,
XBUSSystem source,
XBUSSystem destination,
Message destinationMessage)
throws XException
- Description copied from interface:
Transformer
- The
transform
method is automatically called by the xBus
during the routing of messages.
- Specified by:
transform
in interface Transformer
- Parameters:
inObject
- either the request or response that shall be transformed
to another formatsource
- the XBUSSystem
of the message of the
inObject
destination
- the XBUSSystem
of the target messagedestinationMessage
- the target message eventually contains more
information necessary for transforming
- Returns:
- the transformed
Object
, written to either the
request or response of the target message
- Throws:
XException