public class ProtobufDataFormat
extends org.apache.camel.support.ServiceSupport
implements org.apache.camel.spi.DataFormat, org.apache.camel.CamelContextAware
Constructor and Description |
---|
ProtobufDataFormat() |
ProtobufDataFormat(com.google.protobuf.Message defaultInstance) |
Modifier and Type | Method and Description |
---|---|
protected void |
doStart() |
protected void |
doStop() |
org.apache.camel.CamelContext |
getCamelContext() |
protected com.google.protobuf.Message |
loadDefaultInstance(String className,
org.apache.camel.CamelContext context) |
void |
marshal(org.apache.camel.Exchange exchange,
Object graph,
OutputStream outputStream) |
void |
setCamelContext(org.apache.camel.CamelContext camelContext) |
void |
setDefaultInstance(com.google.protobuf.Message instance) |
void |
setDefaultInstance(Object instance) |
void |
setInstanceClass(String className) |
Object |
unmarshal(org.apache.camel.Exchange exchange,
InputStream inputStream) |
public ProtobufDataFormat()
public ProtobufDataFormat(com.google.protobuf.Message defaultInstance)
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
public void setDefaultInstance(com.google.protobuf.Message instance)
public void setDefaultInstance(Object instance)
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
protected com.google.protobuf.Message loadDefaultInstance(String className, org.apache.camel.CamelContext context) throws org.apache.camel.CamelException, ClassNotFoundException
org.apache.camel.CamelException
ClassNotFoundException
protected void doStart() throws Exception
doStart
in class org.apache.camel.support.ServiceSupport
Exception
Apache Camel