commonj.connector.runtime
Interface DataHandler

All Superinterfaces:
BindingContext, Serializable

public interface DataHandler
extends BindingContext

The data handler provides transformation function for transforming from one form to another. The transformation may map into a provided target or into a new instance of a specified target.

Since:
1.1

Field Summary
 
Fields inherited from interface commonj.connector.runtime.BindingContext
BINDING_COMMUNICATION, BINDING_COMMUNICATION_INBOUND, BINDING_COMMUNICATION_OUTBOUND, BINDING_CONFIGURATION, BINDING_INVOCATION, BINDING_INVOCATION_FAULT, BINDING_INVOCATION_REQUEST, BINDING_INVOCATION_RESPONSE, BINDING_NAME, BINDING_REGISTRY, BINDING_TYPE, BINDING_TYPE_EIS, BINDING_TYPE_HTTP, BINDING_TYPE_JMS, EXPECTED_TYPE, INTERACTION_SPEC
 
Method Summary
 Object transform(Object source, Class targetClass, Object options)
          Transforms data from the source object to a new instance of the targetClass.
 void transformInto(Object source, Object target, Object options)
          Transforms the data in the source object to the target object
 
Methods inherited from interface commonj.connector.runtime.BindingContext
setBindingContext
 

Method Detail

transform

Object transform(Object source,
                 Class targetClass,
                 Object options)
                 throws DataHandlerException
Transforms data from the source object to a new instance of the targetClass.

Parameters:
source - object for the data transformation
targetClass - identifies the class of the target.
options - are additional parameters passed.
Returns:
a new instance of the targetClass which contains the transformed data.
Throws:
DataHandlerException - if an error occurs during execution. It can occur if the source or target formats are not supported.

transformInto

void transformInto(Object source,
                   Object target,
                   Object options)
                   throws DataHandlerException
Transforms the data in the source object to the target object

Parameters:
source - object containing the source data.
target - object containing the result of the data transformation.
options - are additional parameters passed.
Throws:
DataHandlerException - if an error occurs during execution. It can occur if the source or target formats are not supported.