io.vertx.camel

## 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 Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static boolean` | `DEFAULT_PUBLISH` The default value of the "publish" property.

    - ### Fields inherited from class io.vertx.camel.CamelMapping

      `DEFAULT_HEADERS_COPY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `InboundMapping()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static InboundMapping` | `fromCamel(org.apache.camel.Endpoint endpoint)` Creates an `InboundMapping` from the given Camel endpoint.
    `static InboundMapping` | `fromCamel(String uri)` Creates an `InboundMapping` from the given Camel endpoint.
    `Class` | `getBodyType()`
    `boolean` | `isPublish()`
    `InboundMapping` | `setAddress(String address)` Sets the event bus address.
    `InboundMapping` | `setEndpoint(org.apache.camel.Endpoint endpoint)` Sets the Camel endpoint.
    `InboundMapping` | `setHeadersCopy(boolean headersCopy)` Sets whether or not the headers of the input message are copied in the output message.
    `InboundMapping` | `setUri(String uri)` Sets the Camel endpoint URI.
    `InboundMapping` | `toVertx(String address)` Fluent version of `setAddress(String)`.
    `InboundMapping` | `usePublish()` Sets whether or not `publish` is used instead of `send`, when a message is sent on the event bus.
    `InboundMapping` | `withBodyType(Class bodyType)` Sets the type of the body of the event bus message.
    `InboundMapping` | `withoutHeadersCopy()` Fluent version of `setHeadersCopy(boolean)` to disable the headers copy (so the parameter is `false`).

    - ### Methods inherited from class io.vertx.camel.CamelMapping

      `getAddress, getUri, isHeadersCopy`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 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(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:
        `setAddress(String)`

    - #### 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(boolean)`

    - #### 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`

Copyright © 2017. All rights reserved.