public class DataFormatBinding extends ServiceSupport implements Binding
Binding
which Marshals the message in the ProduceProcessor and
Unmarshals the message in the ConsumeProcessorshutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending
Constructor and Description |
---|
DataFormatBinding() |
DataFormatBinding(DataFormat dataFormat) |
DataFormatBinding(DataFormat consumerDataFormat,
DataFormat producerDataFormat) |
Modifier and Type | Method and Description |
---|---|
Processor |
createConsumeProcessor()
Returns a new
Processor which is used by a consumer on an endpoint to process the
message with the binding before its passed to the endpoint consumer producer. |
Processor |
createProduceProcessor()
Returns a new
Processor which is used by a producer on an endpoint to implement
the producer side binding before the message is sent to the underlying endpoint. |
protected void |
doStart()
Implementations override this method to support customized start/stop.
|
protected void |
doStop()
Implementations override this method to support customized start/stop.
|
DataFormat |
getConsumerDataFormat() |
DataFormat |
getProducerDataFormat() |
void |
setConsumerDataFormat(DataFormat consumerDataFormat) |
void |
setDataFormat(DataFormat dataFormat)
Sets the data format for both producer and consumer sides
|
void |
setProducerDataFormat(DataFormat producerDataFormat) |
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, resume, shutdown, start, stop, suspend
public DataFormatBinding()
public DataFormatBinding(DataFormat dataFormat)
public DataFormatBinding(DataFormat consumerDataFormat, DataFormat producerDataFormat)
public Processor createProduceProcessor()
Binding
Processor
which is used by a producer on an endpoint to implement
the producer side binding before the message is sent to the underlying endpoint.createProduceProcessor
in interface Binding
public Processor createConsumeProcessor()
Binding
Processor
which is used by a consumer on an endpoint to process the
message with the binding before its passed to the endpoint consumer producer.createConsumeProcessor
in interface Binding
public void setDataFormat(DataFormat dataFormat)
public DataFormat getConsumerDataFormat()
public void setConsumerDataFormat(DataFormat consumerDataFormat)
public DataFormat getProducerDataFormat()
public void setProducerDataFormat(DataFormat producerDataFormat)
protected void doStart() throws Exception
ServiceSupport
ServiceSupport.doStop()
for more details.doStart
in class ServiceSupport
Exception
ServiceSupport.doStop()
protected void doStop() throws Exception
ServiceSupport
ServiceSupport.doStop()
method when
the service is being stopped. This method will also be invoked
if the service is still in uninitialized state (eg has not
been started). The method is always called to allow the service
to do custom logic when the service is being stopped, such as when
CamelContext
is shutting down.doStop
in class ServiceSupport
Exception
ServiceSupport.doStart()
Apache Camel