org.apache.camel.model.dataformat
Class DataFormatType

java.lang.Object
  extended by org.apache.camel.model.IdentifiedType
      extended by org.apache.camel.model.dataformat.DataFormatType
All Implemented Interfaces:
DataFormat
Direct Known Subclasses:
ArtixDSDataFormat, CsvDataFormat, JaxbDataFormat, SerializationDataFormat, StringDataFormat, XMLBeansDataFormat, XStreamDataFormat

public class DataFormatType
extends IdentifiedType
implements DataFormat

Version:
$Revision: 36321 $

Constructor Summary
  DataFormatType()
           
  DataFormatType(DataFormat dataFormat)
           
protected DataFormatType(String dataFormatTypeName)
           
 
Method Summary
protected  void configureDataFormat(DataFormat dataFormat)
          Allows derived classes to customize the data format
protected  DataFormat createDataFormat(RouteContext routeContext)
          Factory method to create the data format instance
 DataFormat getDataFormat(RouteContext routeContext)
           
static DataFormat getDataFormat(RouteContext routeContext, DataFormatType type, String ref)
           
 void marshal(Exchange exchange, Object graph, OutputStream stream)
          Marshals the object to the given Stream.
protected  void setProperty(Object bean, String name, Object value)
          Sets a named property on the data format instance using introspection
 Object unmarshal(Exchange exchange, InputStream stream)
          Unmarshals the given stream into an object.
 
Methods inherited from class org.apache.camel.model.IdentifiedType
getId, setId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataFormatType

public DataFormatType()

DataFormatType

public DataFormatType(DataFormat dataFormat)

DataFormatType

protected DataFormatType(String dataFormatTypeName)
Method Detail

getDataFormat

public static DataFormat getDataFormat(RouteContext routeContext,
                                       DataFormatType type,
                                       String ref)

marshal

public void marshal(Exchange exchange,
                    Object graph,
                    OutputStream stream)
             throws Exception
Description copied from interface: DataFormat
Marshals the object to the given Stream.

Specified by:
marshal in interface DataFormat
Throws:
Exception

unmarshal

public Object unmarshal(Exchange exchange,
                        InputStream stream)
                 throws Exception
Description copied from interface: DataFormat
Unmarshals the given stream into an object.

Specified by:
unmarshal in interface DataFormat
Throws:
Exception

getDataFormat

public DataFormat getDataFormat(RouteContext routeContext)

createDataFormat

protected DataFormat createDataFormat(RouteContext routeContext)
Factory method to create the data format instance


configureDataFormat

protected void configureDataFormat(DataFormat dataFormat)
Allows derived classes to customize the data format


setProperty

protected void setProperty(Object bean,
                           String name,
                           Object value)
Sets a named property on the data format instance using introspection



Copyright © 2008 IONA Open Source Community. All Rights Reserved.