---
apiVersion: v1
kind: List
items:
- apiVersion: v1
  kind: ConfigMap
  metadata:
    labels:
      funktion.fabric8.io/kind: Connector
      provider: fabric8
      project: connector-rmi
      version: 1.1.31
      group: io.fabric8.funktion.connector
    name: rmi
  data:
    deployment.yml: |
      ---
      apiVersion: extensions/v1beta1
      kind: Deployment
      metadata:
        labels:
          funktion.fabric8.io/kind: Subscription
          connector: rmi
      spec:
        replicas: 1
        template:
          metadata:
            labels:
              funktion.fabric8.io/kind: Subscription
              connector: rmi
          spec:
            containers:
            - image: fabric8/connector-rmi:1.1.31
              name: connector
    schema.yml: |
      ---
      component:
        kind: component
        scheme: rmi
        syntax: rmi:hostname:port/name
        title: RMI
        description: The rmi component is for invoking Java RMI beans from Camel.
        label: messaging
        deprecated: false
        async: false
        javaType: org.apache.camel.component.rmi.RmiComponent
        groupId: org.apache.camel
        artifactId: camel-rmi
        version: 2.18.1
      componentProperties: {}
      properties:
        hostname:
          kind: path
          group: common
          type: string
          javaType: java.lang.String
          deprecated: false
          secret: false
          defaultValue: localhost
          description: Hostname of RMI server
        name:
          kind: path
          group: common
          required: true
          type: string
          javaType: java.lang.String
          deprecated: false
          secret: false
          description: Name to use when binding to RMI server
        port:
          kind: path
          group: common
          type: integer
          javaType: int
          deprecated: false
          secret: false
          defaultValue: "1099"
          description: Port number of RMI server
        method:
          kind: parameter
          group: common
          type: string
          javaType: java.lang.String
          deprecated: false
          secret: false
          description: You can set the name of the method to invoke.
        remoteInterfaces:
          kind: parameter
          group: common
          type: array
          javaType: java.util.List<java.lang.Class<?>>
          deprecated: false
          secret: false
          description: To specific the remote interfaces.
        bridgeErrorHandler:
          kind: parameter
          group: consumer
          label: consumer
          type: boolean
          javaType: boolean
          optionalPrefix: consumer.
          deprecated: false
          secret: false
          defaultValue: false
          description: Allows for bridging the consumer to the Camel routing Error Handler which mean any exceptions occurred while the consumer is trying to pickup incoming messages or the likes will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions that will be logged at WARN/ERROR level and ignored.
        exceptionHandler:
          kind: parameter
          group: consumer (advanced)
          label: consumer,advanced
          type: object
          javaType: org.apache.camel.spi.ExceptionHandler
          optionalPrefix: consumer.
          deprecated: false
          secret: false
          description: To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this options is not in use. By default the consumer will deal with exceptions that will be logged at WARN/ERROR level and ignored.
        exchangePattern:
          kind: parameter
          group: consumer (advanced)
          label: consumer,advanced
          type: string
          javaType: org.apache.camel.ExchangePattern
          enum:
          - InOnly
          - RobustInOnly
          - InOut
          - InOptionalOut
          - OutOnly
          - RobustOutOnly
          - OutIn
          - OutOptionalIn
          deprecated: false
          secret: false
          description: Sets the exchange pattern when the consumer creates an exchange.
        synchronous:
          kind: parameter
          group: advanced
          label: advanced
          type: boolean
          javaType: boolean
          deprecated: false
          secret: false
          defaultValue: false
          description: Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported).
    documentation.adoc: |+
      [[RMI-RMIComponent]]
      RMI Component
      ~~~~~~~~~~~~~

      The *rmi:* component binds link:exchange.html[Exchange]s to the RMI
      protocol (JRMP).

      Since this binding is just using RMI, normal RMI rules still apply
      regarding what methods can be invoked. This component supports only
      Exchanges that carry a method invocation from an interface that extends
      the http://java.sun.com/j2se/1.3/docs/api/java/rmi/Remote.html[Remote]
      interface. All parameters in the method should be either
      http://java.sun.com/j2se/1.5.0/docs/api/java/io/Serializable.html[Serializable]
      or `Remote` objects.

      Maven users will need to add the following dependency to their `pom.xml`
      for this component:

      [source,xml]
      ------------------------------------------------------------
      <dependency>
          <groupId>org.apache.camel</groupId>
          <artifactId>camel-rmi</artifactId>
          <version>x.x.x</version>
          <!-- use the same version as your Camel core version -->
      </dependency>
      ------------------------------------------------------------

      [[RMI-URIformat]]
      URI format
      ^^^^^^^^^^

      [source,java]
      ------------------------------------------------------------------
      rmi://rmi-regisitry-host:rmi-registry-port/registry-path[?options]
      ------------------------------------------------------------------

      For example:

      [source,java]
      ------------------------------------
      rmi://localhost:1099/path/to/service
      ------------------------------------

      You can append query options to the URI in the following format,
      `?option=value&option=value&...`

      [[RMI-Options]]
      Options
      ^^^^^^^


      // component options: START
      The RMI component has no options.
      // component options: END



      // endpoint options: START
      The RMI component supports 9 endpoint options which are listed below:

      {% raw %}
      [width="100%",cols="2,1,1m,1m,5",options="header"]
      |=======================================================================
      | Name | Group | Default | Java Type | Description
      | hostname | common | localhost | String | Hostname of RMI server
      | name | common |  | String | *Required* Name to use when binding to RMI server
      | port | common | 1099 | int | Port number of RMI server
      | method | common |  | String | You can set the name of the method to invoke.
      | remoteInterfaces | common |  | List | To specific the remote interfaces.
      | bridgeErrorHandler | consumer | false | boolean | Allows for bridging the consumer to the Camel routing Error Handler which mean any exceptions occurred while the consumer is trying to pickup incoming messages or the likes will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions that will be logged at WARN/ERROR level and ignored.
      | exceptionHandler | consumer (advanced) |  | ExceptionHandler | To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this options is not in use. By default the consumer will deal with exceptions that will be logged at WARN/ERROR level and ignored.
      | exchangePattern | consumer (advanced) |  | ExchangePattern | Sets the exchange pattern when the consumer creates an exchange.
      | synchronous | advanced | false | boolean | Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported).
      |=======================================================================
      {% endraw %}
      // endpoint options: END


      [[RMI-Using]]
      Using
      ^^^^^

      To call out to an existing RMI service registered in an RMI registry,
      create a route similar to the following:

      [source,java]
      ------------------------------------------------
      from("pojo:foo").to("rmi://localhost:1099/foo");
      ------------------------------------------------

      To bind an existing camel processor or service in an RMI registry,
      define an RMI endpoint as follows:

      [source,java]
      -------------------------------------------------------------------------
      RmiEndpoint endpoint= (RmiEndpoint) endpoint("rmi://localhost:1099/bar");
      endpoint.setRemoteInterfaces(ISay.class);
      from(endpoint).to("pojo:bar");
      -------------------------------------------------------------------------

      Note that when binding an RMI consumer endpoint, you must specify the
      `Remote` interfaces exposed.

      In XML DSL you can do as follows from *Camel 2.7* onwards:

      [source,xml]
      ------------------------------------------------------------------------------------------------------------------------
          <camel:route>
              <from uri="rmi://localhost:37541/helloServiceBean?remoteInterfaces=org.apache.camel.example.osgi.HelloService"/>
              <to uri="bean:helloServiceBean"/>
          </camel:route>
      ------------------------------------------------------------------------------------------------------------------------

      [[RMI-SeeAlso]]
      See Also
      ^^^^^^^^

      * link:configuring-camel.html[Configuring Camel]
      * link:component.html[Component]
      * link:endpoint.html[Endpoint]
      * link:getting-started.html[Getting Started]

