Component for consuming and producing Restful resources using Restlet.
Name | Kind | Group | Required | Default | Type | Enum | Description |
---|---|---|---|---|---|---|---|
protocol | path | common | true | java.lang.String | http https |
The protocol to use which is http or https | |
host | path | common | true | java.lang.String | The hostname of the restlet service | ||
port | path | common | true | 80 | int | The port number of the restlet service | |
uriPattern | path | common | java.lang.String | The resource pattern such as /customer/{id} | |||
restletMethod | parameter | common | GET | org.restlet.data.Method | ALL CONNECT DELETE GET HEAD OPTIONS PATCH POST PUT TRACE |
On a producer endpoint, specifies the request method to use. On a consumer endpoint, specifies that the endpoint consumes only restletMethod requests. | |
bridgeErrorHandler | parameter | consumer | 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. | |||
restletMethods | parameter | consumer | java.lang.String | Specify one or more methods separated by commas (e.g. restletMethods=post,put) 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: ALL,CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE | |||
restletUriPatterns | parameter | consumer | java.util.List |
Specify one ore more URI templates to be serviced by a restlet consumer endpoint, using the # notation to
reference a List |
|||
exceptionHandler | parameter | consumer (advanced) | org.apache.camel.spi.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 | parameter | consumer (advanced) | org.apache.camel.ExchangePattern | InOnly RobustInOnly InOut InOptionalOut OutOnly RobustOutOnly OutIn OutOptionalIn |
Sets the exchange pattern when the consumer creates an exchange. | ||
connectTimeout | parameter | producer | 30000 | int | The Client will give up connection if the connection is timeout, 0 for unlimited wait. | ||
socketTimeout | parameter | producer | 30000 | int | The Client socket receive timeout, 0 for unlimited wait. | ||
throwExceptionOnFailure | parameter | 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. | ||
autoCloseStream | parameter | producer (advanced) | 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 {@link InputStream} from the streaming response to ensure the input stream is closed when the Camel {@link 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. | |||
streamRepresentation | parameter | producer (advanced) | 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 {@link java.io.InputStream} as the message body on the Camel {@link 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 {@link 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. | |||
disableStreamCache | parameter | advanced | 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. | |||
headerFilterStrategy | parameter | advanced | org.apache.camel.spi.HeaderFilterStrategy | To use a custom HeaderFilterStrategy to filter header to and from Camel message. | |||
restletBinding | parameter | advanced | org.apache.camel.component.restlet.RestletBinding | To use a custom RestletBinding to bind between Restlet and Camel message. | |||
synchronous | parameter | advanced | false | boolean | Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported). | ||
restletRealm | parameter | security | java.util.Map |
To configure the security realms of restlet as a map. | |||
sslContextParameters | parameter | security | org.apache.camel.util.jsse.SSLContextParameters | To configure security using SSLContextParameters. |
A Restlet consumer acts as a server to listen client requests.