Class UnmarshalDefinition

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 UnmarshalDefinition extends NoOutputDefinition<UnmarshalDefinition> implements DataFormatDefinitionAware
Converts the message data received from the wire into a format that Apache Camel processors can consume
  • Constructor Details

    • UnmarshalDefinition

      public UnmarshalDefinition()
    • UnmarshalDefinition

      protected UnmarshalDefinition(UnmarshalDefinition source)
    • UnmarshalDefinition

      public UnmarshalDefinition(DataFormatDefinition dataFormatType)
  • Method Details

    • copyDefinition

      public UnmarshalDefinition 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<UnmarshalDefinition>
    • 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)
    • getAllowNullBody

      public String getAllowNullBody()
    • setAllowNullBody

      public void setAllowNullBody(String allowNullBody)
      Indicates whether null is allowed as value of a body to unmarshall.
    • variableReceive

      public UnmarshalDefinition 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 UnmarshalDefinition 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.
    • allowNullBody

      public UnmarshalDefinition allowNullBody(boolean allowNullBody)
      Indicates whether null is allowed as value of a body to unmarshall.
      Parameters:
      allowNullBody - true if null is allowed as value of a body to unmarshall, false otherwise
      Returns:
      the builder