org.apache.camel.dataformat.avro
Class AvroDataFormat
java.lang.Object
org.apache.camel.support.ServiceSupport
org.apache.camel.dataformat.avro.AvroDataFormat
- All Implemented Interfaces:
- org.apache.camel.CamelContextAware, org.apache.camel.Service, org.apache.camel.ShutdownableService, org.apache.camel.spi.DataFormat, org.apache.camel.StatefulService, org.apache.camel.SuspendableService
public class AvroDataFormat
- extends org.apache.camel.support.ServiceSupport
- implements org.apache.camel.spi.DataFormat, org.apache.camel.CamelContextAware
Fields inherited from class org.apache.camel.support.ServiceSupport |
shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending |
Methods inherited from class org.apache.camel.support.ServiceSupport |
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, resume, shutdown, start, stop, suspend |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AvroDataFormat
public AvroDataFormat()
AvroDataFormat
public AvroDataFormat(org.apache.avro.Schema schema)
getCamelContext
public org.apache.camel.CamelContext getCamelContext()
- Specified by:
getCamelContext
in interface org.apache.camel.CamelContextAware
setCamelContext
public void setCamelContext(org.apache.camel.CamelContext camelContext)
- Specified by:
setCamelContext
in interface org.apache.camel.CamelContextAware
doStart
protected void doStart()
throws Exception
- Specified by:
doStart
in class org.apache.camel.support.ServiceSupport
- Throws:
Exception
doStop
protected void doStop()
throws Exception
- Specified by:
doStop
in class org.apache.camel.support.ServiceSupport
- Throws:
Exception
getSchema
public Object getSchema()
setSchema
public void setSchema(Object schema)
getInstanceClassName
public String getInstanceClassName()
setInstanceClass
public void setInstanceClass(String className)
throws Exception
- Throws:
Exception
loadSchema
protected org.apache.avro.Schema loadSchema(String className)
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