org.apache.camel.processor.binding
Class DataFormatBinding

java.lang.Object
  extended by org.apache.camel.support.ServiceSupport
      extended by org.apache.camel.processor.binding.DataFormatBinding
All Implemented Interfaces:
Service, ShutdownableService, Binding, StatefulService, SuspendableService

public class DataFormatBinding
extends ServiceSupport
implements Binding

Represents a Binding which Marshals the message in the ProduceProcessor and Unmarshals the message in the ConsumeProcessor


Field Summary
 
Fields inherited from class org.apache.camel.support.ServiceSupport
shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending
 
Constructor Summary
DataFormatBinding()
           
DataFormatBinding(DataFormat dataFormat)
           
DataFormatBinding(DataFormat consumerDataFormat, DataFormat producerDataFormat)
           
 
Method Summary
 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)
           
 
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
 

Constructor Detail

DataFormatBinding

public DataFormatBinding()

DataFormatBinding

public DataFormatBinding(DataFormat dataFormat)

DataFormatBinding

public DataFormatBinding(DataFormat consumerDataFormat,
                         DataFormat producerDataFormat)
Method Detail

createProduceProcessor

public Processor createProduceProcessor()
Description copied from interface: Binding
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.

Specified by:
createProduceProcessor in interface Binding

createConsumeProcessor

public Processor createConsumeProcessor()
Description copied from interface: Binding
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.

Specified by:
createConsumeProcessor in interface Binding

setDataFormat

public void setDataFormat(DataFormat dataFormat)
Sets the data format for both producer and consumer sides


getConsumerDataFormat

public DataFormat getConsumerDataFormat()

setConsumerDataFormat

public void setConsumerDataFormat(DataFormat consumerDataFormat)

getProducerDataFormat

public DataFormat getProducerDataFormat()

setProducerDataFormat

public void setProducerDataFormat(DataFormat producerDataFormat)

doStart

protected void doStart()
                throws Exception
Description copied from class: ServiceSupport
Implementations override this method to support customized start/stop.

Important: See ServiceSupport.doStop() for more details.

Specified by:
doStart in class ServiceSupport
Throws:
Exception
See Also:
ServiceSupport.doStop()

doStop

protected void doStop()
               throws Exception
Description copied from class: ServiceSupport
Implementations override this method to support customized start/stop.

Important: Camel will invoke this 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.

Specified by:
doStop in class ServiceSupport
Throws:
Exception
See Also:
ServiceSupport.doStart()


Apache Camel