diff --git a/Home.md b/Home.md index 93a012c..f37435d 100644 --- a/Home.md +++ b/Home.md @@ -1,21 +1,66 @@ -# Deploy the Project on CamelX Platform +# Jetty -Deploy on CamelX Platform in three steps +Expose HTTP endpoints using Jetty 12. -## Step 1: Create a release -From the project space, click on **"Create a release"** +## Metadata -The new version is automatically available in the list +| Property | Value | +|----------|-------| +| Scheme | `jetty` | +| Support Level | Stable | +| Labels | http | +| Version | 4.10.2 | -## Step 2: Deploy -Click on **"Deploy"** +## Maven Dependency -- **Version:** Select the desired release -- **Environment:** Choose `Development`, `Staging`, or `Production` -- **Configuration:** Select the configuration source -- **Resources:** Set CPU and Memory +```xml + + org.apache.camel + camel-jetty + 4.10.2 + +``` -## Step 3: Expose -Enable **"Expose"** +## Endpoint Properties -Choose an **API Gateway** (Internal, Public, etc.) +| Name | Type | Required | Default | Description | +|------|------|----------|---------|-------------| +| `httpUri` | string | ✓ | | The url of the HTTP endpoint to call. | +| `headerFilterStrategy` | object | | | To use a custom HeaderFilterStrategy to filter header to and from Camel message. | +| `httpBinding` | object | | | To use a custom HttpBinding to control the mapping between Camel message and HttpClient. | +| `chunked` | boolean | | `true` | If this option is false the Servlet will disable the HTTP streaming and set the content-length header on the response | +| `disableStreamCache` | boolean | | `false` | Determines whether or not the raw input stream is cached or not. The Camel consumer (camel-servlet, camel-jetty etc.) will by default cache the input stream to support reading it multiple times to ensure it 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. DefaultHttpBinding 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. If you use Servlet to bridge/proxy an endpoint then consider enabling this option to improve performance, in case you do not need to read the message payload multiple times. The producer (camel-http) will by default cache the response body stream. If setting this option to true, then the producers will not cache the response body stream but use the response stream as-is (the stream can only be read once) as the message body. | +| `transferException` | boolean | | `false` | If enabled and an Exchange failed processing on the consumer side, and if the caused Exception was send back serialized in the response as a application/x-java-serialized-object content type. On the producer side the exception will be deserialized and thrown as is, instead of the HttpOperationFailedException. The caused exception is required to be serialized. This is by default turned off. If you enable this then be aware that Java will deserialize the incoming data from the request to Java and that can be a potential security risk. | +| `async` | boolean | | `false` | Configure the consumer to work in async mode | +| `continuationTimeout` | integer | | `30000` | Allows to set a timeout in millis when using Jetty as consumer (server). By default Jetty uses 30000. You can use a value of = 0 to never expire. If a timeout occurs then the request will be expired and Jetty will return back a http error 503 to the client. This option is only in use when using Jetty with the Asynchronous Routing Engine. | +| `enableCORS` | boolean | | `false` | If the option is true, Jetty server will setup the CrossOriginFilter which supports the CORS out of box. | +| `enableJmx` | boolean | | `false` | If this option is true, Jetty JMX support will be enabled for this endpoint. See Jetty JMX support for more details. | +| `enableMultipartFilter` | boolean | | `false` | Whether org.apache.camel.component.jetty.MultiPartFilter is enabled or not. You should set this value to false when bridging endpoints, to ensure multipart requests is proxied/bridged as well. | +| `httpMethodRestrict` | string | | | Used to only allow consuming if the HttpMethod matches, such as GET/POST/PUT etc. Multiple methods can be specified separated by comma. | +| `logException` | boolean | | `false` | If enabled and an Exchange failed processing on the consumer side the exception's stack trace will be logged when the exception stack trace is not sent in the response's body. | +| `matchOnUriPrefix` | boolean | | `false` | Whether or not the consumer should try to find a target consumer by matching the URI prefix if no exact match is found. | +| `muteException` | boolean | | `false` | If enabled and an Exchange failed processing on the consumer side the response's body won't contain the exception's stack trace. | +| `responseBufferSize` | integer | | | To use a custom buffer size on the jakarta.servlet.ServletResponse. | +| `sendDateHeader` | boolean | | `false` | If the option is true, jetty server will send the date header to the client which sends the request. NOTE please make sure there is no any other camel-jetty endpoint is share the same port, otherwise this option may not work as expected. | +| `sendServerVersion` | boolean | | `true` | If the option is true, jetty will send the server header with the jetty version information to the client which sends the request. NOTE please make sure there is no any other camel-jetty endpoint is share the same port, otherwise this option may not work as expected. | +| `sessionSupport` | boolean | | `false` | Specifies whether to enable the session manager on the server side of Jetty. | +| `useContinuation` | boolean | | | Whether or not to use Jetty continuations for the Jetty Server. | +| `bridgeErrorHandler` | boolean | | `false` | Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. Important: This is only possible if the 3rd party component allows Camel to be alerted if an exception was thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not possible. In other situations we may improve the Camel component to hook into the 3rd party component and make this possible for future releases. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored. | +| `eagerCheckContentAvailable` | boolean | | `false` | Whether to eager check whether the HTTP requests has content if the content-length header is 0 or not present. This can be turned on in case HTTP clients do not send streamed data. | +| `exceptionHandler` | object | | | To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By default the consumer will deal with exceptions, that will be logged at WARN or ERROR level and ignored. | +| `exchangePattern` | object | | | Sets the exchange pattern when the consumer creates an exchange. | +| `fileSizeThreshold` | integer | | | The size threshold after which files will be written to disk for multipart/form-data requests. By default the files are not written to disk | +| `filesLocation` | string | | | The directory location where files will be store for multipart/form-data requests. By default the files are written in the system temporary folder | +| `filterInitParameters` | object | | | Configuration of the filter init parameters. These parameters will be applied to the filter list before starting the jetty server. | +| `filters` | array | | | Allows using a custom filters which is putted into a list and can be find in the Registry. Multiple values can be separated by comma. | +| `handlers` | array | | | Specifies a comma-delimited set of Handler instances to lookup in your Registry. These handlers are added to the Jetty servlet context (for example, to add security). Important: You can not use different handlers with different Jetty endpoints using the same port number. The handlers is associated to the port number. If you need different handlers, then use different port numbers. | +| `idleTimeout` | integer | | `-1` | The max idle time (in milli seconds) is applied to an HTTP request for IO operations and delayed dispatch. Idle time 0 implies an infinite timeout, -1 (default) implies no HTTP channel timeout and the connection timeout is used instead. | +| `mapHttpMessageBody` | boolean | | `true` | If this option is true then IN exchange Body of the exchange will be mapped to HTTP body. Setting this to false will avoid the HTTP mapping. | +| `mapHttpMessageFormUrlEncodedBody` | boolean | | `true` | If this option is true then IN exchange Form Encoded body of the exchange will be mapped to HTTP. Setting this to false will avoid the HTTP Form Encoded body mapping. | +| `mapHttpMessageHeaders` | boolean | | `true` | If this option is true then IN exchange Headers of the exchange will be mapped to HTTP headers. Setting this to false will avoid the HTTP Headers mapping. | +| `maxFileSize` | integer | | | The maximum size allowed for uploaded files. -1 means no limit | +| `maxRequestSize` | integer | | | The maximum size allowed for multipart/form-data requests. -1 means no limit | +| `multipartFilter` | object | | | Allows using a custom multipart filter. Note: setting multipartFilterRef forces the value of enableMultipartFilter to true. | +| `optionsEnabled` | boolean | | `false` | Specifies whether to enable HTTP OPTIONS for this Servlet consumer. By default OPTIONS is turned off. | +| `traceEnabled` | boolean | | `false` | Specifies whether to enable HTTP TRACE for this Servlet consumer. By default TRACE is turned off. | +| `sslContextParameters` | object | | | To configure security using SSLContextParameters |