Class InboundMapping


  • public class InboundMapping
    extends CamelMapping
    Represents a mapping between a Camel endpoint address and a Vert.x address on the event bus.
    Author:
    Clement Escoffier
    • Field Detail

      • DEFAULT_PUBLISH

        public static final boolean DEFAULT_PUBLISH
        The default value of the "publish" property. By default, the bridge uses send.
        See Also:
        Constant Field Values
    • Constructor Detail

      • InboundMapping

        public InboundMapping()
    • Method Detail

      • fromCamel

        public static InboundMapping fromCamel​(org.apache.camel.Endpoint endpoint)
        Creates an InboundMapping from the given Camel endpoint.
        Parameters:
        endpoint - the endpoint - must not be null
        Returns:
        the created InboundMapping
      • isPublish

        public boolean isPublish()
        Returns:
        whether or not publish is used instead of send, when a message is sent on the event bus. send is used by default.
      • getBodyType

        public Class getBodyType()
        Returns:
        the type of the body of the message that are sent on the event bus. A Camel converter from the Camel message payload to the given type is used for conversion. If not set, no conversions are applied.
      • withBodyType

        public InboundMapping withBodyType​(Class bodyType)
        Sets the type of the body of the event bus message. A Camel converter from the Camel message payload to the given type is used for conversion. If not set, no conversions are applied.
        Parameters:
        bodyType - the body type.
        Returns:
        the current InboundMapping
      • setHeadersCopy

        public InboundMapping setHeadersCopy​(boolean headersCopy)
        Description copied from class: CamelMapping
        Sets whether or not the headers of the input message are copied in the output message.
        Overrides:
        setHeadersCopy in class CamelMapping
        Parameters:
        headersCopy - true to copy the headers
        Returns:
        the current CamelMapping
      • usePublish

        public InboundMapping usePublish()
        Sets whether or not publish is used instead of send, when a message is sent on the event bus. send is used by default, so calling this method instructs the bridge to use publish.
        Returns:
        the current InboundMapping
      • setTimeout

        public InboundMapping setTimeout​(int timeout)
        Sets the timeout in milliseconds.
        Parameters:
        timeout - the time out, must be strictly positive
        Returns:
        the current InboundMapping
      • getTimeout

        public int getTimeout()