---
apiVersion: v1
kind: ConfigMap
metadata:
  labels:
    funktion.fabric8.io/kind: Connector
  name: restlet
data:
  deployment.yml: |
    ---
    apiVersion: extensions/v1beta1
    kind: Deployment
    metadata:
      labels:
        funktion.fabric8.io/kind: Subscription
        connector: restlet
    spec:
      replicas: 1
      template:
        metadata:
          labels:
            funktion.fabric8.io/kind: Subscription
            connector: restlet
        spec:
          containers:
          - image: funktion/connector-restlet:${project.version}
            name: connector
  schema.yml: |
    ---
    component:
      kind: component
      scheme: restlet
      syntax: restlet:protocol:host:port/uriPattern
      title: Restlet
      description: Component for consuming and producing Restful resources using Restlet.
      label: rest
      deprecated: false
      async: true
      lenientProperties: true
      javaType: org.apache.camel.component.restlet.RestletComponent
      groupId: org.apache.camel
      artifactId: camel-restlet
      version: 2.18.3
    componentProperties:
      controllerDaemon:
        kind: property
        type: boolean
        javaType: java.lang.Boolean
        deprecated: false
        secret: false
        description: Indicates if the controller thread should be a daemon (not blocking JVM exit).
        order: 0
      controllerSleepTimeMs:
        kind: property
        type: integer
        javaType: java.lang.Integer
        deprecated: false
        secret: false
        description: Time for the controller thread to sleep between each control.
        order: 1
      inboundBufferSize:
        kind: property
        type: integer
        javaType: java.lang.Integer
        deprecated: false
        secret: false
        description: The size of the buffer when reading messages.
        order: 2
      maxConnectionsPerHost:
        kind: property
        type: integer
        javaType: java.lang.Integer
        deprecated: false
        secret: false
        description: Maximum number of concurrent connections per host (IP address).
        order: 3
      maxThreads:
        kind: property
        type: integer
        javaType: java.lang.Integer
        deprecated: false
        secret: false
        description: Maximum threads that will service requests.
        order: 4
      lowThreads:
        kind: property
        type: integer
        javaType: java.lang.Integer
        deprecated: false
        secret: false
        description: Number of worker threads determining when the connector is considered overloaded.
        order: 5
      maxTotalConnections:
        kind: property
        type: integer
        javaType: java.lang.Integer
        deprecated: false
        secret: false
        description: Maximum number of concurrent connections in total.
        order: 6
      minThreads:
        kind: property
        type: integer
        javaType: java.lang.Integer
        deprecated: false
        secret: false
        description: Minimum threads waiting to service requests.
        order: 7
      outboundBufferSize:
        kind: property
        type: integer
        javaType: java.lang.Integer
        deprecated: false
        secret: false
        description: The size of the buffer when writing messages.
        order: 8
      persistingConnections:
        kind: property
        type: boolean
        javaType: java.lang.Boolean
        deprecated: false
        secret: false
        description: Indicates if connections should be kept alive after a call.
        order: 9
      pipeliningConnections:
        kind: property
        type: boolean
        javaType: java.lang.Boolean
        deprecated: false
        secret: false
        description: Indicates if pipelining connections are supported.
        order: 10
      threadMaxIdleTimeMs:
        kind: property
        type: integer
        javaType: java.lang.Integer
        deprecated: false
        secret: false
        description: Time for an idle thread to wait for an operation before being collected.
        order: 11
      useForwardedForHeader:
        kind: property
        type: boolean
        javaType: java.lang.Boolean
        deprecated: false
        secret: false
        description: Lookup the X-Forwarded-For header supported by popular proxies and caches and uses it to populate the Request.getClientAddresses() method result. This information is only safe for intermediary components within your local network. Other addresses could easily be changed by setting a fake header and should not be trusted for serious security checks.
        order: 12
      reuseAddress:
        kind: property
        type: boolean
        javaType: java.lang.Boolean
        deprecated: false
        secret: false
        description: Enable/disable the SO_REUSEADDR socket option. See java.io.ServerSocketreuseAddress property for additional details.
        order: 13
      maxQueued:
        kind: property
        type: integer
        javaType: java.lang.Integer
        deprecated: false
        secret: false
        description: Maximum number of calls that can be queued if there aren't any worker thread available to service them. If the value is '0' then no queue is used and calls are rejected if no worker thread is immediately available. If the value is '-1' then an unbounded queue is used and calls are never rejected.
        order: 14
      disableStreamCache:
        kind: property
        type: boolean
        javaType: boolean
        deprecated: false
        secret: false
        description: Determines whether or not the raw input stream from Restlet is cached or not (Camel will read the stream into a in memory/overflow to file Stream caching) cache. By default Camel will cache the Restlet input stream to support reading it multiple times to ensure Camel can retrieve all data from the stream. However you can set this option to true when you for example need to access the raw stream such as streaming it directly to a file or other persistent store. DefaultRestletBinding will copy the request input stream into a stream cache and put it into message body if this option is false to support reading the stream multiple times.
        order: 15
      port:
        kind: property
        type: integer
        javaType: int
        deprecated: false
        secret: false
        description: To configure the port number for the restlet consumer routes. This allows to configure this once to reuse the same port for these consumers.
        order: 16
      synchronous:
        kind: property
        type: boolean
        javaType: java.lang.Boolean
        deprecated: false
        secret: false
        description: Whether to use synchronous Restlet Client for the producer. Setting this option to true can yield faster performance as it seems the Restlet synchronous Client works better.
        order: 17
      enabledConverters:
        kind: property
        type: array
        javaType: java.util.List<java.lang.String>
        deprecated: false
        secret: false
        description: A list of converters to enable as full class name or simple class name. All the converters automatically registered are enabled if empty or null
        order: 18
      headerFilterStrategy:
        kind: property
        type: object
        javaType: org.apache.camel.spi.HeaderFilterStrategy
        deprecated: false
        secret: false
        description: To use a custom HeaderFilterStrategy to filter header to and from Camel message.
        order: 19
    properties:
      protocol:
        kind: path
        group: common
        required: true
        type: string
        javaType: java.lang.String
        enum:
        - http
        - https
        deprecated: false
        secret: false
        description: The protocol to use which is http or https
        order: 0
      host:
        kind: path
        group: common
        required: true
        type: string
        javaType: java.lang.String
        deprecated: false
        secret: false
        description: The hostname of the restlet service
        order: 1
      port:
        kind: path
        group: common
        required: true
        type: integer
        javaType: int
        deprecated: false
        secret: false
        defaultValue: "80"
        description: The port number of the restlet service
        order: 2
      uriPattern:
        kind: path
        group: common
        type: string
        javaType: java.lang.String
        deprecated: false
        secret: false
        description: The resource pattern such as /customer/id
        order: 3
      restletMethod:
        kind: parameter
        group: common
        type: string
        javaType: org.restlet.data.Method
        enum:
        - ALL
        - CONNECT
        - DELETE
        - GET
        - HEAD
        - OPTIONS
        - PATCH
        - POST
        - PUT
        - TRACE
        deprecated: false
        secret: false
        defaultValue: GET
        description: On a producer endpoint specifies the request method to use. On a consumer endpoint specifies that the endpoint consumes only restletMethod requests.
        order: 4
      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.
        order: 5
      restletMethods:
        kind: parameter
        group: consumer
        label: consumer
        type: string
        javaType: java.lang.String
        deprecated: false
        secret: false
        description: 'Specify one or more methods separated by commas (e.g. restletMethods=postput)
          to be serviced by a restlet consumer endpoint. If both restletMethod and restletMethods
          options are specified the restletMethod setting is ignored. The possible methods
          are: ALLCONNECTDELETEGETHEADOPTIONSPATCHPOSTPUTTRACE'
        order: 6
      restletUriPatterns:
        kind: parameter
        group: consumer
        label: consumer
        type: array
        javaType: java.util.List<java.lang.String>
        deprecated: false
        secret: false
        description: Specify one ore more URI templates to be serviced by a restlet consumer endpoint using the notation to reference a List in the Camel Registry. If a URI pattern has been defined in the endpoint URI both the URI pattern defined in the endpoint and the restletUriPatterns option will be honored.
        order: 7
      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.
        order: 8
      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.
        order: 9
      connectTimeout:
        kind: parameter
        group: producer
        label: producer
        type: integer
        javaType: int
        deprecated: false
        secret: false
        defaultValue: "30000"
        description: The Client will give up connection if the connection is timeout 0 for unlimited wait.
        order: 10
      socketTimeout:
        kind: parameter
        group: producer
        label: producer
        type: integer
        javaType: int
        deprecated: false
        secret: false
        defaultValue: "30000"
        description: The Client socket receive timeout 0 for unlimited wait.
        order: 11
      throwExceptionOnFailure:
        kind: parameter
        group: producer
        label: producer
        type: boolean
        javaType: boolean
        deprecated: false
        secret: false
        defaultValue: true
        description: Whether to throw exception on a producer failure. If this option is false then the http status code is set as a message header which can be checked if it has an error value.
        order: 12
      autoCloseStream:
        kind: parameter
        group: producer (advanced)
        label: producer,advanced
        type: boolean
        javaType: boolean
        deprecated: false
        secret: false
        defaultValue: false
        description: Whether to auto close the stream representation as response from calling a REST service using the restlet producer. If the response is streaming and the option streamRepresentation is enabled then you may want to auto close the InputStream from the streaming response to ensure the input stream is closed when the Camel Exchange is done being routed. However if you need to read the stream outside a Camel route you may need to not auto close the stream.
        order: 13
      streamRepresentation:
        kind: parameter
        group: producer (advanced)
        label: producer,advanced
        type: boolean
        javaType: boolean
        deprecated: false
        secret: false
        defaultValue: false
        description: Whether to support stream representation as response from calling a REST service using the restlet producer. If the response is streaming then this option can be enabled to use an java.io.InputStream as the message body on the Camel Message body. If using this option you may want to enable the autoCloseStream option as well to ensure the input stream is closed when the Camel Exchange is done being routed. However if you need to read the stream outside a Camel route you may need to not auto close the stream.
        order: 14
      disableStreamCache:
        kind: parameter
        group: advanced
        label: advanced
        type: boolean
        javaType: boolean
        deprecated: false
        secret: false
        defaultValue: false
        description: Determines whether or not the raw input stream from Restlet is cached or not (Camel will read the stream into a in memory/overflow to file Stream caching) cache. By default Camel will cache the Restlet input stream to support reading it multiple times to ensure Camel can retrieve all data from the stream. However you can set this option to true when you for example need to access the raw stream such as streaming it directly to a file or other persistent store. DefaultRestletBinding will copy the request input stream into a stream cache and put it into message body if this option is false to support reading the stream multiple times.
        order: 15
      headerFilterStrategy:
        kind: parameter
        group: advanced
        label: advanced
        type: object
        javaType: org.apache.camel.spi.HeaderFilterStrategy
        deprecated: false
        secret: false
        description: To use a custom HeaderFilterStrategy to filter header to and from Camel message.
        order: 16
      restletBinding:
        kind: parameter
        group: advanced
        label: advanced
        type: object
        javaType: org.apache.camel.component.restlet.RestletBinding
        deprecated: false
        secret: false
        description: To use a custom RestletBinding to bind between Restlet and Camel message.
        order: 17
      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).
        order: 18
      restletRealm:
        kind: parameter
        group: security
        label: security
        type: object
        javaType: java.util.Map<java.lang.String,java.lang.String>
        deprecated: false
        secret: false
        description: To configure the security realms of restlet as a map.
        order: 19
      sslContextParameters:
        kind: parameter
        group: security
        label: security
        type: object
        javaType: org.apache.camel.util.jsse.SSLContextParameters
        deprecated: false
        secret: false
        description: To configure security using SSLContextParameters.
        order: 20
  documentation.adoc: "[[Restlet-RestletComponent]]\nRestlet Component\n~~~~~~~~~~~~~~~~~\n\
    \nThe *Restlet* component provides http://www.restlet.org[Restlet] based\nlink:endpoint.html[endpoints]\
    \ for consuming and producing RESTful\nresources.\n\nMaven users will need to\
    \ add the following dependency to their `pom.xml`\nfor this component:\n\n[source,xml]\n\
    ------------------------------------------------------------\n<dependency>\n \
    \   <groupId>org.apache.camel</groupId>\n    <artifactId>camel-restlet</artifactId>\n\
    \    <version>x.x.x</version>\n    <!-- use the same version as your Camel core\
    \ version -->\n</dependency>\n------------------------------------------------------------\n\
    \n[[Restlet-URIformat]]\nURI format\n^^^^^^^^^^\n\n[source,java]\n----------------------------\n\
    restlet:restletUrl[?options]\n----------------------------\n\nFormat of restletUrl:\n\
    \n[source,java]\n--------------------------------------------\nprotocol://hostname[:port][/resourcePattern]\n\
    --------------------------------------------\n\nRestlet promotes decoupling of\
    \ protocol and application concerns. The\nreference implementation of\nhttp://www.noelios.com/products/restlet-engine[Restlet\
    \ Engine] supports\na number of protocols. However, we have tested the HTTP protocol\
    \ only.\nThe default port is port 80. We do not automatically switch default port\n\
    based on the protocol yet.\n\nYou can append query options to the URI in the following\
    \ format,\n`?option=value&option=value&...`\n\n\_\n\nINFO: It seems Restlet is\
    \ case sensitive in understanding headers. For example\nto use content-type, use\
    \ Content-Type, and for location use Location and\nso on.\n\nWARNING: We have\
    \ received a report about drop in performance in camel-restlet in\nCamel 2.14.0\
    \ and 2.14.1. We have reported this to the Restlet team in\nhttps://github.com/restlet/restlet-framework-java/issues/996[issue\
    \ 996].\nTo remedy the issue then from Camel 2.14.2 onwards you can set\nsynchronous=true\
    \ as option on the endpoint uris, Or set it on the\nRestletComponent as a global\
    \ option so all endpoints inherit this\noption.\n\n[[Restlet-Options]]\nOptions\n\
    ^^^^^^^\n\n\n\n// component options: START\nThe Restlet component supports 20\
    \ options which are listed below.\n\n\n\n{% raw %}\n[width=\"100%\",cols=\"2,1m,7\"\
    ,options=\"header\"]\n|=======================================================================\n\
    | Name | Java Type | Description\n| controllerDaemon | Boolean | Indicates if\
    \ the controller thread should be a daemon (not blocking JVM exit).\n| controllerSleepTimeMs\
    \ | Integer | Time for the controller thread to sleep between each control.\n\
    | inboundBufferSize | Integer | The size of the buffer when reading messages.\n\
    | maxConnectionsPerHost | Integer | Maximum number of concurrent connections per\
    \ host (IP address).\n| maxThreads | Integer | Maximum threads that will service\
    \ requests.\n| lowThreads | Integer | Number of worker threads determining when\
    \ the connector is considered overloaded.\n| maxTotalConnections | Integer | Maximum\
    \ number of concurrent connections in total.\n| minThreads | Integer | Minimum\
    \ threads waiting to service requests.\n| outboundBufferSize | Integer | The size\
    \ of the buffer when writing messages.\n| persistingConnections | Boolean | Indicates\
    \ if connections should be kept alive after a call.\n| pipeliningConnections |\
    \ Boolean | Indicates if pipelining connections are supported.\n| threadMaxIdleTimeMs\
    \ | Integer | Time for an idle thread to wait for an operation before being collected.\n\
    | useForwardedForHeader | Boolean | Lookup the X-Forwarded-For header supported\
    \ by popular proxies and caches and uses it to populate the Request.getClientAddresses()\
    \ method result. This information is only safe for intermediary components within\
    \ your local network. Other addresses could easily be changed by setting a fake\
    \ header and should not be trusted for serious security checks.\n| reuseAddress\
    \ | Boolean | Enable/disable the SO_REUSEADDR socket option. See java.io.ServerSocketreuseAddress\
    \ property for additional details.\n| maxQueued | Integer | Maximum number of\
    \ calls that can be queued if there aren't any worker thread available to service\
    \ them. If the value is '0' then no queue is used and calls are rejected if no\
    \ worker thread is immediately available. If the value is '-1' then an unbounded\
    \ queue is used and calls are never rejected.\n| disableStreamCache | boolean\
    \ | Determines whether or not the raw input stream from Restlet is cached or not\
    \ (Camel will read the stream into a in memory/overflow to file Stream caching)\
    \ cache. By default Camel will cache the Restlet input stream to support reading\
    \ it multiple times to ensure Camel can retrieve all data from the stream. However\
    \ you can set this option to true when you for example need to access the raw\
    \ stream such as streaming it directly to a file or other persistent store. DefaultRestletBinding\
    \ will copy the request input stream into a stream cache and put it into message\
    \ body if this option is false to support reading the stream multiple times.\n\
    | port | int | To configure the port number for the restlet consumer routes. This\
    \ allows to configure this once to reuse the same port for these consumers.\n\
    | synchronous | Boolean | Whether to use synchronous Restlet Client for the producer.\
    \ Setting this option to true can yield faster performance as it seems the Restlet\
    \ synchronous Client works better.\n| enabledConverters | List | A list of converters\
    \ to enable as full class name or simple class name. All the converters automatically\
    \ registered are enabled if empty or null\n| headerFilterStrategy | HeaderFilterStrategy\
    \ | To use a custom HeaderFilterStrategy to filter header to and from Camel message.\n\
    |=======================================================================\n{% endraw\
    \ %}\n// component options: END\n\n\n\n\n// endpoint options: START\nThe Restlet\
    \ component supports 21 endpoint options which are listed below:\n\n{% raw %}\n\
    [width=\"100%\",cols=\"2,1,1m,1m,5\",options=\"header\"]\n|=======================================================================\n\
    | Name | Group | Default | Java Type | Description\n| protocol | common |  | String\
    \ | *Required* The protocol to use which is http or https\n| host | common | \
    \ | String | *Required* The hostname of the restlet service\n| port | common |\
    \ 80 | int | *Required* The port number of the restlet service\n| uriPattern |\
    \ common |  | String | The resource pattern such as /customer/id\n| restletMethod\
    \ | common | GET | Method | On a producer endpoint specifies the request method\
    \ to use. On a consumer endpoint specifies that the endpoint consumes only restletMethod\
    \ requests.\n| 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.\n| restletMethods\
    \ | consumer |  | String | Specify one or more methods separated by commas (e.g.\
    \ restletMethods=postput) to be serviced by a restlet consumer endpoint. If both\
    \ restletMethod and restletMethods options are specified the restletMethod setting\
    \ is ignored. The possible methods are: ALLCONNECTDELETEGETHEADOPTIONSPATCHPOSTPUTTRACE\n\
    | restletUriPatterns | consumer |  | List | Specify one ore more URI templates\
    \ to be serviced by a restlet consumer endpoint using the notation to reference\
    \ a List in the Camel Registry. If a URI pattern has been defined in the endpoint\
    \ URI both the URI pattern defined in the endpoint and the restletUriPatterns\
    \ option will be honored.\n| 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.\n| exchangePattern\
    \ | consumer (advanced) |  | ExchangePattern | Sets the exchange pattern when\
    \ the consumer creates an exchange.\n| connectTimeout | producer | 30000 | int\
    \ | The Client will give up connection if the connection is timeout 0 for unlimited\
    \ wait.\n| socketTimeout | producer | 30000 | int | The Client socket receive\
    \ timeout 0 for unlimited wait.\n| throwExceptionOnFailure | producer | true |\
    \ boolean | Whether to throw exception on a producer failure. If this option is\
    \ false then the http status code is set as a message header which can be checked\
    \ if it has an error value.\n| autoCloseStream | producer (advanced) | false |\
    \ boolean | Whether to auto close the stream representation as response from calling\
    \ a REST service using the restlet producer. If the response is streaming and\
    \ the option streamRepresentation is enabled then you may want to auto close the\
    \ InputStream from the streaming response to ensure the input stream is closed\
    \ when the Camel Exchange is done being routed. However if you need to read the\
    \ stream outside a Camel route you may need to not auto close the stream.\n| streamRepresentation\
    \ | producer (advanced) | false | boolean | Whether to support stream representation\
    \ as response from calling a REST service using the restlet producer. If the response\
    \ is streaming then this option can be enabled to use an java.io.InputStream as\
    \ the message body on the Camel Message body. If using this option you may want\
    \ to enable the autoCloseStream option as well to ensure the input stream is closed\
    \ when the Camel Exchange is done being routed. However if you need to read the\
    \ stream outside a Camel route you may need to not auto close the stream.\n| disableStreamCache\
    \ | advanced | false | boolean | Determines whether or not the raw input stream\
    \ from Restlet is cached or not (Camel will read the stream into a in memory/overflow\
    \ to file Stream caching) cache. By default Camel will cache the Restlet input\
    \ stream to support reading it multiple times to ensure Camel can retrieve all\
    \ data from the stream. However you can set this option to true when you for example\
    \ need to access the raw stream such as streaming it directly to a file or other\
    \ persistent store. DefaultRestletBinding will copy the request input stream into\
    \ a stream cache and put it into message body if this option is false to support\
    \ reading the stream multiple times.\n| headerFilterStrategy | advanced |  | HeaderFilterStrategy\
    \ | To use a custom HeaderFilterStrategy to filter header to and from Camel message.\n\
    | restletBinding | advanced |  | RestletBinding | To use a custom RestletBinding\
    \ to bind between Restlet and Camel message.\n| synchronous | advanced | false\
    \ | boolean | Sets whether synchronous processing should be strictly used or Camel\
    \ is allowed to use asynchronous processing (if supported).\n| restletRealm |\
    \ security |  | Map | To configure the security realms of restlet as a map.\n\
    | sslContextParameters | security |  | SSLContextParameters | To configure security\
    \ using SSLContextParameters.\n|=======================================================================\n\
    {% endraw %}\n// endpoint options: END\n\n\n[[Restlet-MessageHeaders]]\nMessage\
    \ Headers\n^^^^^^^^^^^^^^^\n\n[width=\"100%\",cols=\"10%,10%,80%\",options=\"\
    header\",]\n|=======================================================================\n\
    |Name |Type |Description\n\n|`Content-Type` |`String` |Specifies the content type,\
    \ which can be set on the OUT message by the\napplication/processor. The value\
    \ is the `content-type` of the response\nmessage. If this header is not set, the\
    \ content type is based on the\nobject type of the OUT message body. In Camel\
    \ 2.3 onward, if the\nContent-Type header is specified in the Camel IN message,\
    \ the value of\nthe header determine the content type for the Restlet request\
    \ message.\_\_\nOtherwise, it is defaulted to \"application/x-www-form-urlencoded'.\
    \ Prior\nto release 2.3, it is not possible to change the request content type\n\
    default.\n\n|`CamelAcceptContentType` |`String` |*Since Camel 2.9.3, 2.10.0:*\
    \ The HTTP Accept request header.\n\n|`CamelHttpMethod` |`String` |The HTTP request\
    \ method. This is set in the IN message header.\n\n|`CamelHttpQuery` |`String`\
    \ |The query string of the request URI. It is set on the IN message by\n`DefaultRestletBinding`\
    \ when the restlet component receives a request.\n\n|`CamelHttpResponseCode` |`String`\
    \ or `Integer` |The response code can be set on the OUT message by the\napplication/processor.\
    \ The value is the response code of the response\nmessage. If this header is not\
    \ set, the response code is set by the\nrestlet runtime engine.\n\n|`CamelHttpUri`\
    \ |`String` |The HTTP request URI. This is set in the IN message header.\n\n|`CamelRestletLogin`\
    \ |`String` |Login name for basic authentication. It is set on the IN message\
    \ by the\napplication and gets filtered before the restlet request header by\n\
    Camel.\n\n|`CamelRestletPassword` |`String` |Password name for basic authentication.\
    \ It is set on the IN message by\nthe application and gets filtered before the\
    \ restlet request header by\nCamel.\n\n|`CamelRestletRequest` |`Request` |*Camel\
    \ 2.8:* The `org.restlet.Request` object which holds all request\ndetails.\n\n\
    |`CamelRestletResponse` |`Response` |*Camel 2.8:* The `org.restlet.Response` object.\
    \ You can use this to\ncreate responses using the API from Restlet. See examples\
    \ below.\n\n|`org.restlet.*` |  |Attributes of a Restlet message that get propagated\
    \ to Camel IN headers.\n\n|`cache-control` |`String` or `List<CacheDirective>`\
    \ |*Camel 2.11:* User can set the cache-control with the String value or\nthe\
    \ List of CacheDirective of Restlet from the camel message header.\n|=======================================================================\n\
    \n[[Restlet-MessageBody]]\nMessage Body\n^^^^^^^^^^^^\n\nCamel will store the\
    \ restlet response from the external server on the\nOUT body. All headers from\
    \ the IN message will be copied to the OUT\nmessage, so that headers are preserved\
    \ during routing.\n\n[[Restlet-Samples]]\nSamples\n^^^^^^^\n\n[[Restlet-RestletEndpointwithAuthentication]]\n\
    Restlet Endpoint with Authentication\n++++++++++++++++++++++++++++++++++++\n\n\
    The following route starts a `restlet` consumer endpoint that listens\nfor `POST`\
    \ requests on http://localhost:8080. The processor creates a\nresponse that echoes\
    \ the request body and the value of the `id` header.\n\nThe `restletRealm` setting\
    \ in the URI query is used to look up a Realm\nMap in the registry. If this option\
    \ is specified, the restlet consumer\nuses the information to authenticate user\
    \ logins. Only _authenticated_\nrequests can access the resources. In this sample,\
    \ we create a Spring\napplication context that serves as a registry. The bean\
    \ ID of the Realm\nMap should match the _restletRealmRef_.\n\nThe following sample\
    \ starts a `direct` endpoint that sends requests to\nthe server on http://localhost:8080\
    \ (that is, our restlet consumer\nendpoint).\n\nThat is all we need. We are ready\
    \ to send a request and try out the\nrestlet component:\n\nThe sample client sends\
    \ a request to the `direct:start-auth` endpoint\nwith the following headers:\n\
    \n* `CamelRestletLogin` (used internally by Camel)\n* `CamelRestletPassword` (used\
    \ internally by Camel)\n* `id` (application header)\n\nNOTE: `org.apache.camel.restlet.auth.login`\
    \ and\n`org.apache.camel.restlet.auth.password` will not be propagated as\nRestlet\
    \ header.\n\nThe sample client gets a response like the following:\n\n[source,text]\n\
    --------------------------------------------------\nreceived [<order foo='1'/>]\
    \ as an order id = 89531\n--------------------------------------------------\n\
    \n[[Restlet-SinglerestletendpointtoservicemultiplemethodsandURItemplates]]\nSingle\
    \ restlet endpoint to service multiple methods and URI templates\n+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n\
    \nIt is possible to create a single route to service multiple HTTP methods\nusing\
    \ the `restletMethods` option. This snippet also shows how to\nretrieve the request\
    \ method from the header:\n\nIn addition to servicing multiple methods, the next\
    \ snippet shows how to\ncreate an endpoint that supports multiple URI templates\
    \ using the\n`restletUriPatterns` option. The request URI is available in the\
    \ header\nof the IN message as well. If a URI pattern has been defined in the\n\
    endpoint URI (which is not the case in this sample), both the URI\npattern defined\
    \ in the endpoint and the `restletUriPatterns` option will\nbe honored.\n\nThe\
    \ `restletUriPatterns=#uriTemplates` option references the\n`List<String>` bean\
    \ defined in the Spring XML configuration.\n\n[source,xml]\n--------------------------------------------------------\n\
    <util:list id=\"uriTemplates\">\n    <value>/users/{username}</value>\n    <value>/atom/collection/{id}/component/{cid}</value>\n\
    </util:list>\n--------------------------------------------------------\n\n[[Restlet-UsingRestletAPItopopulateresponse]]\n\
    Using Restlet API to populate response\n++++++++++++++++++++++++++++++++++++++\n\
    \n*Available as of Camel 2.8*\n\nYou may want to use the `org.restlet.Response`\
    \ API to populate the\nresponse. This gives you full access to the Restlet API\
    \ and fine grained\ncontrol of the response. See the route snippet below where\
    \ we generate\nthe response from an inlined Camel link:processor.html[Processor]:\n\
    \n*Generating response using Restlet Response API*\n\n[[Restlet-Configuringmaxthreadsoncomponent]]\n\
    Configuring max threads on component\n++++++++++++++++++++++++++++++++++++\n\n\
    To configure the max threads options you must do this on the component,\nsuch\
    \ as:\n\n[source,xml]\n-------------------------------------------------------------------------------\n\
    <bean id=\"restlet\" class=\"org.apache.camel.component.restlet.RestletComponent\"\
    >\n  <property name=\"maxThreads\" value=\"100\"/>\n</bean>\n-------------------------------------------------------------------------------\n\
    \n[[Restlet-UsingtheRestletservletwithinawebapp]]\nUsing the Restlet servlet within\
    \ a webapp\n+++++++++++++++++++++++++++++++++++++++++\n\n*Available as of Camel\
    \ 2.8* +\n There are\nhttp://www.restlet.org/documentation/2.0/jee/ext/org/restlet/ext/servlet/ServerServlet.html[three\n\
    possible ways] to configure a Restlet application within a servlet\ncontainer\
    \ and using the subclassed SpringServerServlet enables\nconfiguration within Camel\
    \ by injecting the Restlet Component.\n\nUse of the Restlet servlet within a servlet\
    \ container enables routes to\nbe configured with relative paths in URIs (removing\
    \ the restrictions of\nhard-coded absolute URIs) and for the hosting servlet container\
    \ to\nhandle incoming requests (rather than have to spawn a separate server\n\
    process on a new port).\n\nTo configure, add the following to your camel-context.xml;\n\
    \n[source,xml]\n-----------------------------------------------------------------------------------------------\n\
    <camelContext>\n  <route id=\"RS_RestletDemo\">\n    <from uri=\"restlet:/demo/{id}\"\
    \ />\n    <transform>\n      <simple>Request type : ${header.CamelHttpMethod}\
    \ and ID : ${header.id}</simple>\n    </transform>\n  </route> \n</camelContext>\n\
    \n<bean id=\"RestletComponent\" class=\"org.restlet.Component\" />\n\n<bean id=\"\
    RestletComponentService\" class=\"org.apache.camel.component.restlet.RestletComponent\"\
    >\n  <constructor-arg index=\"0\">\n    <ref bean=\"RestletComponent\" />\n  </constructor-arg>\n\
    </bean>\n-----------------------------------------------------------------------------------------------\n\
    \nAnd add this to your web.xml;\n\n[source,xml]\n---------------------------------------------------------------------------\n\
    <!-- Restlet Servlet -->\n<servlet>\n  <servlet-name>RestletServlet</servlet-name>\n\
    \  <servlet-class>org.restlet.ext.spring.SpringServerServlet</servlet-class>\n\
    \  <init-param>\n    <param-name>org.restlet.component</param-name>\n    <param-value>RestletComponent</param-value>\n\
    \  </init-param>\n</servlet>\n\n<servlet-mapping>\n  <servlet-name>RestletServlet</servlet-name>\n\
    \  <url-pattern>/rs/*</url-pattern>\n</servlet-mapping>\n---------------------------------------------------------------------------\n\
    \nYou will then be able to access the deployed route at\nhttp://localhost:8080/mywebapp/rs/demo/1234\
    \ where;\n\nlocalhost:8080 is the server and port of your servlet container +\n\
    \ mywebapp is the name of your deployed webapp +\n Your browser will then show\
    \ the following content;\n\n[source,java]\n----------------------------------\n\
    \"Request type : GET and ID : 1234\"\n----------------------------------\n\nYou\
    \ will need to add dependency on the Spring extension to restlet which\nyou can\
    \ do in your Maven pom.xml file:\n\n[source,xml]\n-------------------------------------------------\n\
    <dependency>\n  <groupId>org.restlet.jee</groupId>\n  <artifactId>org.restlet.ext.spring</artifactId>\n\
    \  <version>${restlet-version}</version>\n</dependency>\n-------------------------------------------------\n\
    \nAnd you would need to add dependency on the restlet maven repository as\nwell:\n\
    \n[source,xml]\n--------------------------------------------------\n<repository>\
    \  \n   <id>maven-restlet</id>  \n   <name>Public online Restlet repository</name>\
    \  \n   <url>http://maven.restlet.org</url>  \n</repository>\n--------------------------------------------------\n\
    \n[[Restlet-SeeAlso]]\nSee Also\n^^^^^^^^\n\n* link:configuring-camel.html[Configuring\
    \ Camel]\n* link:component.html[Component]\n* link:endpoint.html[Endpoint]\n*\
    \ link:getting-started.html[Getting Started]\n\n"
