public class ProtobufDataFormat extends Object implements org.apache.camel.spi.DataFormat
Constructor and Description |
---|
ProtobufDataFormat() |
ProtobufDataFormat(com.google.protobuf.Message defaultInstance) |
Modifier and Type | Method and Description |
---|---|
com.google.protobuf.Message |
getInstance(org.apache.camel.Exchange exchange) |
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 |
setDefaultInstace(com.google.protobuf.Message instance) |
void |
setDefaultInstance(Object instance) |
void |
setInstanceClass(String className) |
Object |
unmarshal(org.apache.camel.Exchange exchange,
InputStream inputStream) |
public ProtobufDataFormat(com.google.protobuf.Message defaultInstance)
defaultInstance
- public ProtobufDataFormat()
public void setDefaultInstace(com.google.protobuf.Message instance)
public void setDefaultInstance(Object instance)
public com.google.protobuf.Message getInstance(org.apache.camel.Exchange exchange) throws Exception
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
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