public class AvroDataFormat
extends org.apache.camel.support.ServiceSupport
implements org.apache.camel.spi.DataFormat, 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 |
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 org.apache.camel.CamelContext getCamelContext()
getCamelContext in interface org.apache.camel.CamelContextAwarepublic void setCamelContext(org.apache.camel.CamelContext camelContext)
setCamelContext in interface org.apache.camel.CamelContextAwareprotected void doStart()
throws Exception
doStart in class org.apache.camel.support.ServiceSupportExceptionprotected void doStop()
throws Exception
doStop in class org.apache.camel.support.ServiceSupportExceptionpublic Object getSchema()
public void setSchema(Object schema)
public String getInstanceClassName()
public void setInstanceClassName(String className) throws Exception
Exceptionprotected org.apache.avro.Schema loadSchema(String className) throws org.apache.camel.CamelException, ClassNotFoundException
org.apache.camel.CamelExceptionClassNotFoundExceptionpublic void marshal(org.apache.camel.Exchange exchange,
Object graph,
OutputStream outputStream)
throws Exception
marshal in interface org.apache.camel.spi.DataFormatExceptionpublic Object unmarshal(org.apache.camel.Exchange exchange, InputStream inputStream) throws Exception
unmarshal in interface org.apache.camel.spi.DataFormatExceptionApache Camel