org.apache.camel.dataformat.protobuf
Class ProtobufDataFormat
java.lang.Object
org.apache.camel.dataformat.protobuf.ProtobufDataFormat
- All Implemented Interfaces:
- org.apache.camel.spi.DataFormat
public class ProtobufDataFormat
- extends Object
- implements org.apache.camel.spi.DataFormat
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ProtobufDataFormat
public ProtobufDataFormat(com.google.protobuf.Message defaultInstance)
- Parameters:
defaultInstance
-
ProtobufDataFormat
public ProtobufDataFormat()
setDefaultInstace
public void setDefaultInstace(com.google.protobuf.Message instance)
setDefaultInstance
public void setDefaultInstance(Object instance)
getInstance
public com.google.protobuf.Message getInstance(org.apache.camel.Exchange exchange)
throws Exception
- Throws:
Exception
setInstanceClass
public void setInstanceClass(String className)
throws Exception
- Throws:
Exception
loadDefaultInstance
protected com.google.protobuf.Message loadDefaultInstance(String className,
org.apache.camel.CamelContext context)
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