public class AvroDataFormat
extends org.apache.camel.support.ServiceSupport
implements org.apache.camel.spi.DataFormat, org.apache.camel.spi.DataFormatName, org.apache.camel.CamelContextAware
Constructor and Description |
---|
AvroDataFormat() |
AvroDataFormat(org.apache.avro.Schema schema) |
Modifier and Type | Method and Description |
---|---|
protected void |
doStart() |
protected void |
doStop() |
org.apache.camel.CamelContext |
getCamelContext() |
String |
getDataFormatName() |
String |
getInstanceClassName() |
Object |
getSchema() |
protected org.apache.avro.Schema |
loadSchema(String className) |
void |
marshal(org.apache.camel.Exchange exchange,
Object graph,
OutputStream outputStream) |
void |
setCamelContext(org.apache.camel.CamelContext camelContext) |
void |
setInstanceClassName(String className) |
void |
setSchema(Object schema) |
Object |
unmarshal(org.apache.camel.Exchange exchange,
InputStream inputStream) |
public AvroDataFormat()
public AvroDataFormat(org.apache.avro.Schema schema)
public String getDataFormatName()
getDataFormatName
in interface org.apache.camel.spi.DataFormatName
public org.apache.camel.CamelContext getCamelContext()
getCamelContext
in interface org.apache.camel.CamelContextAware
public void setCamelContext(org.apache.camel.CamelContext camelContext)
setCamelContext
in interface org.apache.camel.CamelContextAware
protected void doStart() throws Exception
doStart
in class org.apache.camel.support.ServiceSupport
Exception
protected void doStop() throws Exception
doStop
in class org.apache.camel.support.ServiceSupport
Exception
public Object getSchema()
public void setSchema(Object schema)
public String getInstanceClassName()
public void setInstanceClassName(String className) throws Exception
Exception
protected org.apache.avro.Schema loadSchema(String className) throws org.apache.camel.CamelException, ClassNotFoundException
org.apache.camel.CamelException
ClassNotFoundException
public void marshal(org.apache.camel.Exchange exchange, Object graph, OutputStream outputStream) throws Exception
marshal
in interface org.apache.camel.spi.DataFormat
Exception
public Object unmarshal(org.apache.camel.Exchange exchange, InputStream inputStream) throws Exception
unmarshal
in interface org.apache.camel.spi.DataFormat
Exception
Apache Camel