Class MarshalDefinition

All Implemented Interfaces:
org.apache.camel.CamelContextAware, org.apache.camel.LineNumberAware, Block, CopyableDefinition<ProcessorDefinition>, DataFormatDefinitionAware, DisabledAwareDefinition, org.apache.camel.NamedNode, org.apache.camel.spi.HasCamelContext, org.apache.camel.spi.HasId, org.apache.camel.spi.IdAware

@Metadata(label="eip,dataformat,transformation") public class MarshalDefinition extends NoOutputDefinition<MarshalDefinition> implements DataFormatDefinitionAware
Marshals data into a specified format for transmission over a transport or component
  • Constructor Details

    • MarshalDefinition

      public MarshalDefinition()
    • MarshalDefinition

      protected MarshalDefinition(MarshalDefinition source)
    • MarshalDefinition

      public MarshalDefinition(DataFormatDefinition dataFormatType)
  • Method Details

    • copyDefinition

      public MarshalDefinition copyDefinition()
      Description copied from interface: CopyableDefinition
      Makes a copy of this definition.
      Specified by:
      copyDefinition in interface CopyableDefinition<ProcessorDefinition>
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • description

      protected String description()
    • getShortName

      public String getShortName()
      Specified by:
      getShortName in interface org.apache.camel.NamedNode
    • getLabel

      public String getLabel()
      Description copied from class: ProcessorDefinition
      Returns a label to describe this node such as the expression if some kind of expression node
      Specified by:
      getLabel in interface org.apache.camel.NamedNode
      Overrides:
      getLabel in class ProcessorDefinition<MarshalDefinition>
    • getDataFormatType

      public DataFormatDefinition getDataFormatType()
      Description copied from interface: DataFormatDefinitionAware
      The data format.
      Specified by:
      getDataFormatType in interface DataFormatDefinitionAware
    • setDataFormatType

      public void setDataFormatType(DataFormatDefinition dataFormatType)
      The data format to be used
      Specified by:
      setDataFormatType in interface DataFormatDefinitionAware
    • getVariableSend

      public String getVariableSend()
    • setVariableSend

      public void setVariableSend(String variableSend)
    • getVariableReceive

      public String getVariableReceive()
    • setVariableReceive

      public void setVariableReceive(String variableReceive)
    • variableReceive

      public MarshalDefinition variableReceive(String variableReceive)
      To use a variable to store the received message body (only body, not headers). This makes it handy to use variables for user data and to easily control what data to use for sending and receiving. Important: When using receive variable then the received body is stored only in this variable and not on the current message.
    • variableSend

      public MarshalDefinition variableSend(String variableSend)
      To use a variable as the source for the message body to send. This makes it handy to use variables for user data and to easily control what data to use for sending and receiving. Important: When using send variable then the message body is taken from this variable instead of the current message, however the headers from the message will still be used as well. In other words, the variable is used instead of the message body, but everything else is as usual.