Class InboundMapping

java.lang.Object
io.vertx.camel.CamelMapping
io.vertx.camel.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 Details

    • DEFAULT_PUBLISH

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

    • InboundMapping

      public InboundMapping()
  • Method Details

    • fromCamel

      public static InboundMapping fromCamel(String uri)
      Creates an InboundMapping from the given Camel endpoint.
      Parameters:
      uri - the uri - must not be null
      Returns:
      the created InboundMapping
    • 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
    • setAddress

      public InboundMapping setAddress(String address)
      Description copied from class: CamelMapping
      Sets the event bus address.
      Overrides:
      setAddress in class CamelMapping
      Parameters:
      address - the address
      Returns:
      the current CamelMapping
    • toVertx

      public InboundMapping toVertx(String address)
      Fluent version of setAddress(String).
      Parameters:
      address - the Vert.x event bus address
      Returns:
      the current InboundMapping instance
      See Also:
    • withoutHeadersCopy

      public InboundMapping withoutHeadersCopy()
      Fluent version of setHeadersCopy(boolean) to disable the headers copy (so the parameter is false).
      Returns:
      the current InboundMapping instance
      See Also:
    • 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
    • setUri

      public InboundMapping setUri(String uri)
      Description copied from class: CamelMapping
      Sets the Camel endpoint URI.
      Overrides:
      setUri in class CamelMapping
      Parameters:
      uri - the uri
      Returns:
      the current CamelMapping
    • setEndpoint

      public InboundMapping setEndpoint(org.apache.camel.Endpoint endpoint)
      Description copied from class: CamelMapping
      Sets the Camel endpoint. If used, CamelMapping.setUri(String) does not need to be called.
      Overrides:
      setEndpoint in class CamelMapping
      Parameters:
      endpoint - the endpoint
      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()