org.apache.camel.dataformat.avro
Class AvroDataFormat

java.lang.Object
  extended by org.apache.camel.dataformat.avro.AvroDataFormat
All Implemented Interfaces:
org.apache.camel.spi.DataFormat

public class AvroDataFormat
extends Object
implements org.apache.camel.spi.DataFormat


Constructor Summary
AvroDataFormat()
           
AvroDataFormat(org.apache.avro.Schema schema)
           
 
Method Summary
 org.apache.avro.Schema getSchema(org.apache.camel.Exchange exchange, Object graph)
           
protected  org.apache.avro.Schema loadDefaultSchema(String className, org.apache.camel.CamelContext context)
           
 void marshal(org.apache.camel.Exchange exchange, Object graph, OutputStream outputStream)
           
 void setInstanceClass(String className)
           
 void setSchema(Object schema)
           
 Object unmarshal(org.apache.camel.Exchange exchange, InputStream inputStream)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AvroDataFormat

public AvroDataFormat()

AvroDataFormat

public AvroDataFormat(org.apache.avro.Schema schema)
Method Detail

getSchema

public org.apache.avro.Schema getSchema(org.apache.camel.Exchange exchange,
                                        Object graph)
                                 throws Exception
Throws:
Exception

setSchema

public void setSchema(Object schema)

setInstanceClass

public void setInstanceClass(String className)
                      throws Exception
Throws:
Exception

loadDefaultSchema

protected org.apache.avro.Schema loadDefaultSchema(String className,
                                                   org.apache.camel.CamelContext context)
                                            throws org.apache.camel.CamelException,
                                                   ClassNotFoundException
Throws:
org.apache.camel.CamelException
ClassNotFoundException

marshal

public void marshal(org.apache.camel.Exchange exchange,
                    Object graph,
                    OutputStream outputStream)
             throws Exception
Specified by:
marshal in interface org.apache.camel.spi.DataFormat
Throws:
Exception

unmarshal

public Object unmarshal(org.apache.camel.Exchange exchange,
                        InputStream inputStream)
                 throws Exception
Specified by:
unmarshal in interface org.apache.camel.spi.DataFormat
Throws:
Exception


Apache CAMEL