@Dataformat(value="avro")
public class AvroDataFormat
extends org.apache.camel.support.service.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) |
build, doBuild, doFail, doInit, doLifecycleChange, doResume, doShutdown, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic AvroDataFormat()
public AvroDataFormat(org.apache.avro.Schema schema)
public String getDataFormatName()
getDataFormatName in interface org.apache.camel.spi.DataFormatNamepublic 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.service.BaseServiceExceptionprotected void doStop()
throws Exception
doStop in class org.apache.camel.support.service.BaseServiceExceptionpublic Object getSchema()
public void setSchema(Object schema)
public String getInstanceClassName()
public void setInstanceClassName(String className)
protected 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