| /* |
| * Licensed to the Apache Software Foundation (ASF) under one or more |
| * contributor license agreements. See the NOTICE file distributed with |
| * this work for additional information regarding copyright ownership. |
| * The ASF licenses this file to You under the Apache License, Version 2.0 |
| * (the "License"); you may not use this file except in compliance with |
| * the License. You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, software |
| * distributed under the License is distributed on an "AS IS" BASIS, |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| */ |
| package org.apache.camel.builder.endpoint.dsl; |
| |
| import java.io.File; |
| import java.util.List; |
| import java.util.Map; |
| import javax.annotation.Generated; |
| import org.apache.camel.ExchangePattern; |
| import org.apache.camel.LoggingLevel; |
| import org.apache.camel.builder.EndpointConsumerBuilder; |
| import org.apache.camel.builder.EndpointProducerBuilder; |
| import org.apache.camel.builder.endpoint.AbstractEndpointBuilder; |
| import org.apache.camel.spi.ExceptionHandler; |
| import org.apache.camel.spi.HeaderFilterStrategy; |
| |
| /** |
| * Netty HTTP server and client using the Netty 4.x library. |
| * |
| * Generated by camel-package-maven-plugin - do not edit this file! |
| */ |
| @Generated("org.apache.camel.maven.packaging.EndpointDslMojo") |
| public interface NettyHttpEndpointBuilderFactory { |
| |
| |
| /** |
| * Builder for endpoint consumers for the Netty4 HTTP component. |
| */ |
| public interface NettyHttpEndpointConsumerBuilder |
| extends |
| EndpointConsumerBuilder { |
| default AdvancedNettyHttpEndpointConsumerBuilder advanced() { |
| return (AdvancedNettyHttpEndpointConsumerBuilder) this; |
| } |
| /** |
| * If the option is true, the producer will ignore the Exchange.HTTP_URI |
| * header, and use the endpoint's URI for request. You may also set the |
| * throwExceptionOnFailure to be false to let the producer send all the |
| * fault response back. The consumer working in the bridge mode will |
| * skip the gzip compression and WWW URL form encoding (by adding the |
| * Exchange.SKIP_GZIP_ENCODING and Exchange.SKIP_WWW_FORM_URLENCODED |
| * headers to the consumed exchange). |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: common |
| */ |
| default NettyHttpEndpointConsumerBuilder bridgeEndpoint( |
| boolean bridgeEndpoint) { |
| setProperty("bridgeEndpoint", bridgeEndpoint); |
| return this; |
| } |
| /** |
| * If the option is true, the producer will ignore the Exchange.HTTP_URI |
| * header, and use the endpoint's URI for request. You may also set the |
| * throwExceptionOnFailure to be false to let the producer send all the |
| * fault response back. The consumer working in the bridge mode will |
| * skip the gzip compression and WWW URL form encoding (by adding the |
| * Exchange.SKIP_GZIP_ENCODING and Exchange.SKIP_WWW_FORM_URLENCODED |
| * headers to the consumed exchange). |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: common |
| */ |
| default NettyHttpEndpointConsumerBuilder bridgeEndpoint( |
| String bridgeEndpoint) { |
| setProperty("bridgeEndpoint", bridgeEndpoint); |
| return this; |
| } |
| /** |
| * Whether or not to disconnect(close) from Netty Channel right after |
| * use. Can be used for both consumer and producer. |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: common |
| */ |
| default NettyHttpEndpointConsumerBuilder disconnect(boolean disconnect) { |
| setProperty("disconnect", disconnect); |
| return this; |
| } |
| /** |
| * Whether or not to disconnect(close) from Netty Channel right after |
| * use. Can be used for both consumer and producer. |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: common |
| */ |
| default NettyHttpEndpointConsumerBuilder disconnect(String disconnect) { |
| setProperty("disconnect", disconnect); |
| return this; |
| } |
| /** |
| * Setting to ensure socket is not closed due to inactivity. |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: common |
| */ |
| default NettyHttpEndpointConsumerBuilder keepAlive(boolean keepAlive) { |
| setProperty("keepAlive", keepAlive); |
| return this; |
| } |
| /** |
| * Setting to ensure socket is not closed due to inactivity. |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: common |
| */ |
| default NettyHttpEndpointConsumerBuilder keepAlive(String keepAlive) { |
| setProperty("keepAlive", keepAlive); |
| return this; |
| } |
| /** |
| * Setting to facilitate socket multiplexing. |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: common |
| */ |
| default NettyHttpEndpointConsumerBuilder reuseAddress( |
| boolean reuseAddress) { |
| setProperty("reuseAddress", reuseAddress); |
| return this; |
| } |
| /** |
| * Setting to facilitate socket multiplexing. |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: common |
| */ |
| default NettyHttpEndpointConsumerBuilder reuseAddress( |
| String reuseAddress) { |
| setProperty("reuseAddress", reuseAddress); |
| return this; |
| } |
| /** |
| * This option allows producers and consumers (in client mode) to reuse |
| * the same Netty Channel for the lifecycle of processing the Exchange. |
| * This is useful if you need to call a server multiple times in a Camel |
| * route and want to use the same network connection. When using this, |
| * the channel is not returned to the connection pool until the Exchange |
| * is done; or disconnected if the disconnect option is set to true. The |
| * reused Channel is stored on the Exchange as an exchange property with |
| * the key NettyConstants#NETTY_CHANNEL which allows you to obtain the |
| * channel during routing and use it as well. |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: common |
| */ |
| default NettyHttpEndpointConsumerBuilder reuseChannel( |
| boolean reuseChannel) { |
| setProperty("reuseChannel", reuseChannel); |
| return this; |
| } |
| /** |
| * This option allows producers and consumers (in client mode) to reuse |
| * the same Netty Channel for the lifecycle of processing the Exchange. |
| * This is useful if you need to call a server multiple times in a Camel |
| * route and want to use the same network connection. When using this, |
| * the channel is not returned to the connection pool until the Exchange |
| * is done; or disconnected if the disconnect option is set to true. The |
| * reused Channel is stored on the Exchange as an exchange property with |
| * the key NettyConstants#NETTY_CHANNEL which allows you to obtain the |
| * channel during routing and use it as well. |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: common |
| */ |
| default NettyHttpEndpointConsumerBuilder reuseChannel( |
| String reuseChannel) { |
| setProperty("reuseChannel", reuseChannel); |
| return this; |
| } |
| /** |
| * Setting to set endpoint as one-way or request-response. |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: common |
| */ |
| default NettyHttpEndpointConsumerBuilder sync(boolean sync) { |
| setProperty("sync", sync); |
| return this; |
| } |
| /** |
| * Setting to set endpoint as one-way or request-response. |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: common |
| */ |
| default NettyHttpEndpointConsumerBuilder sync(String sync) { |
| setProperty("sync", sync); |
| return this; |
| } |
| /** |
| * Setting to improve TCP protocol performance. |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: common |
| */ |
| default NettyHttpEndpointConsumerBuilder tcpNoDelay(boolean tcpNoDelay) { |
| setProperty("tcpNoDelay", tcpNoDelay); |
| return this; |
| } |
| /** |
| * Setting to improve TCP protocol performance. |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: common |
| */ |
| default NettyHttpEndpointConsumerBuilder tcpNoDelay(String tcpNoDelay) { |
| setProperty("tcpNoDelay", tcpNoDelay); |
| return this; |
| } |
| /** |
| * Whether or not Camel should try to find a target consumer by matching |
| * the URI prefix if no exact match is found. |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: consumer |
| */ |
| default NettyHttpEndpointConsumerBuilder matchOnUriPrefix( |
| boolean matchOnUriPrefix) { |
| setProperty("matchOnUriPrefix", matchOnUriPrefix); |
| return this; |
| } |
| /** |
| * Whether or not Camel should try to find a target consumer by matching |
| * the URI prefix if no exact match is found. |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: consumer |
| */ |
| default NettyHttpEndpointConsumerBuilder matchOnUriPrefix( |
| String matchOnUriPrefix) { |
| setProperty("matchOnUriPrefix", matchOnUriPrefix); |
| return this; |
| } |
| /** |
| * Whether to send back HTTP status code 503 when the consumer has been |
| * suspended. If the option is false then the Netty Acceptor is unbound |
| * when the consumer is suspended, so clients cannot connect anymore. |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: consumer |
| */ |
| default NettyHttpEndpointConsumerBuilder send503whenSuspended( |
| boolean send503whenSuspended) { |
| setProperty("send503whenSuspended", send503whenSuspended); |
| return this; |
| } |
| /** |
| * Whether to send back HTTP status code 503 when the consumer has been |
| * suspended. If the option is false then the Netty Acceptor is unbound |
| * when the consumer is suspended, so clients cannot connect anymore. |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: consumer |
| */ |
| default NettyHttpEndpointConsumerBuilder send503whenSuspended( |
| String send503whenSuspended) { |
| setProperty("send503whenSuspended", send503whenSuspended); |
| return this; |
| } |
| /** |
| * To use a single decoder. This options is deprecated use encoders |
| * instead. |
| * |
| * The option is a: <code>io.netty.channel.ChannelHandler</code> type. |
| * |
| * Group: codec |
| */ |
| @Deprecated |
| default NettyHttpEndpointConsumerBuilder decoder(Object decoder) { |
| setProperty("decoder", decoder); |
| return this; |
| } |
| /** |
| * To use a single decoder. This options is deprecated use encoders |
| * instead. |
| * |
| * The option will be converted to a |
| * <code>io.netty.channel.ChannelHandler</code> type. |
| * |
| * Group: codec |
| */ |
| @Deprecated |
| default NettyHttpEndpointConsumerBuilder decoder(String decoder) { |
| setProperty("decoder", decoder); |
| return this; |
| } |
| /** |
| * A list of decoders to be used. You can use a String which have values |
| * separated by comma, and have the values be looked up in the Registry. |
| * Just remember to prefix the value with # so Camel knows it should |
| * lookup. |
| * |
| * The option is a: |
| * <code>java.util.List<io.netty.channel.ChannelHandler></code> |
| * type. |
| * |
| * Group: codec |
| */ |
| default NettyHttpEndpointConsumerBuilder decoders(List<Object> decoders) { |
| setProperty("decoders", decoders); |
| return this; |
| } |
| /** |
| * A list of decoders to be used. You can use a String which have values |
| * separated by comma, and have the values be looked up in the Registry. |
| * Just remember to prefix the value with # so Camel knows it should |
| * lookup. |
| * |
| * The option will be converted to a |
| * <code>java.util.List<io.netty.channel.ChannelHandler></code> |
| * type. |
| * |
| * Group: codec |
| */ |
| default NettyHttpEndpointConsumerBuilder decoders(String decoders) { |
| setProperty("decoders", decoders); |
| return this; |
| } |
| /** |
| * To use a single encoder. This options is deprecated use encoders |
| * instead. |
| * |
| * The option is a: <code>io.netty.channel.ChannelHandler</code> type. |
| * |
| * Group: codec |
| */ |
| @Deprecated |
| default NettyHttpEndpointConsumerBuilder encoder(Object encoder) { |
| setProperty("encoder", encoder); |
| return this; |
| } |
| /** |
| * To use a single encoder. This options is deprecated use encoders |
| * instead. |
| * |
| * The option will be converted to a |
| * <code>io.netty.channel.ChannelHandler</code> type. |
| * |
| * Group: codec |
| */ |
| @Deprecated |
| default NettyHttpEndpointConsumerBuilder encoder(String encoder) { |
| setProperty("encoder", encoder); |
| return this; |
| } |
| /** |
| * A list of encoders to be used. You can use a String which have values |
| * separated by comma, and have the values be looked up in the Registry. |
| * Just remember to prefix the value with # so Camel knows it should |
| * lookup. |
| * |
| * The option is a: |
| * <code>java.util.List<io.netty.channel.ChannelHandler></code> |
| * type. |
| * |
| * Group: codec |
| */ |
| default NettyHttpEndpointConsumerBuilder encoders(List<Object> encoders) { |
| setProperty("encoders", encoders); |
| return this; |
| } |
| /** |
| * A list of encoders to be used. You can use a String which have values |
| * separated by comma, and have the values be looked up in the Registry. |
| * Just remember to prefix the value with # so Camel knows it should |
| * lookup. |
| * |
| * The option will be converted to a |
| * <code>java.util.List<io.netty.channel.ChannelHandler></code> |
| * type. |
| * |
| * Group: codec |
| */ |
| default NettyHttpEndpointConsumerBuilder encoders(String encoders) { |
| setProperty("encoders", encoders); |
| return this; |
| } |
| /** |
| * Which protocols to enable when using SSL. |
| * |
| * The option is a: <code>java.lang.String</code> type. |
| * |
| * Group: security |
| */ |
| default NettyHttpEndpointConsumerBuilder enabledProtocols( |
| String enabledProtocols) { |
| setProperty("enabledProtocols", enabledProtocols); |
| return this; |
| } |
| /** |
| * Client side certificate keystore to be used for encryption. |
| * |
| * The option is a: <code>java.io.File</code> type. |
| * |
| * Group: security |
| */ |
| default NettyHttpEndpointConsumerBuilder keyStoreFile(File keyStoreFile) { |
| setProperty("keyStoreFile", keyStoreFile); |
| return this; |
| } |
| /** |
| * Client side certificate keystore to be used for encryption. |
| * |
| * The option will be converted to a <code>java.io.File</code> type. |
| * |
| * Group: security |
| */ |
| default NettyHttpEndpointConsumerBuilder keyStoreFile( |
| String keyStoreFile) { |
| setProperty("keyStoreFile", keyStoreFile); |
| return this; |
| } |
| /** |
| * Keystore format to be used for payload encryption. Defaults to JKS if |
| * not set. |
| * |
| * The option is a: <code>java.lang.String</code> type. |
| * |
| * Group: security |
| */ |
| default NettyHttpEndpointConsumerBuilder keyStoreFormat( |
| String keyStoreFormat) { |
| setProperty("keyStoreFormat", keyStoreFormat); |
| return this; |
| } |
| /** |
| * Client side certificate keystore to be used for encryption. Is loaded |
| * by default from classpath, but you can prefix with classpath:, file:, |
| * or http: to load the resource from different systems. |
| * |
| * The option is a: <code>java.lang.String</code> type. |
| * |
| * Group: security |
| */ |
| default NettyHttpEndpointConsumerBuilder keyStoreResource( |
| String keyStoreResource) { |
| setProperty("keyStoreResource", keyStoreResource); |
| return this; |
| } |
| /** |
| * Configures whether the server needs client authentication when using |
| * SSL. |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: security |
| */ |
| default NettyHttpEndpointConsumerBuilder needClientAuth( |
| boolean needClientAuth) { |
| setProperty("needClientAuth", needClientAuth); |
| return this; |
| } |
| /** |
| * Configures whether the server needs client authentication when using |
| * SSL. |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: security |
| */ |
| default NettyHttpEndpointConsumerBuilder needClientAuth( |
| String needClientAuth) { |
| setProperty("needClientAuth", needClientAuth); |
| return this; |
| } |
| /** |
| * Password setting to use in order to encrypt/decrypt payloads sent |
| * using SSH. |
| * |
| * The option is a: <code>java.lang.String</code> type. |
| * |
| * Group: security |
| */ |
| default NettyHttpEndpointConsumerBuilder passphrase(String passphrase) { |
| setProperty("passphrase", passphrase); |
| return this; |
| } |
| /** |
| * Refers to a |
| * org.apache.camel.component.netty4.http.NettyHttpSecurityConfiguration |
| * for configuring secure web resources. |
| * |
| * The option is a: |
| * <code>org.apache.camel.component.netty4.http.NettyHttpSecurityConfiguration</code> type. |
| * |
| * Group: security |
| */ |
| default NettyHttpEndpointConsumerBuilder securityConfiguration( |
| Object securityConfiguration) { |
| setProperty("securityConfiguration", securityConfiguration); |
| return this; |
| } |
| /** |
| * Refers to a |
| * org.apache.camel.component.netty4.http.NettyHttpSecurityConfiguration |
| * for configuring secure web resources. |
| * |
| * The option will be converted to a |
| * <code>org.apache.camel.component.netty4.http.NettyHttpSecurityConfiguration</code> type. |
| * |
| * Group: security |
| */ |
| default NettyHttpEndpointConsumerBuilder securityConfiguration( |
| String securityConfiguration) { |
| setProperty("securityConfiguration", securityConfiguration); |
| return this; |
| } |
| /** |
| * To configure NettyHttpSecurityConfiguration using key/value pairs |
| * from the map. |
| * |
| * The option is a: <code>java.util.Map<java.lang.String, |
| * java.lang.Object></code> type. |
| * |
| * Group: security |
| */ |
| default NettyHttpEndpointConsumerBuilder securityOptions( |
| Map<String, Object> securityOptions) { |
| setProperty("securityOptions", securityOptions); |
| return this; |
| } |
| /** |
| * To configure NettyHttpSecurityConfiguration using key/value pairs |
| * from the map. |
| * |
| * The option will be converted to a |
| * <code>java.util.Map<java.lang.String, java.lang.Object></code> |
| * type. |
| * |
| * Group: security |
| */ |
| default NettyHttpEndpointConsumerBuilder securityOptions( |
| String securityOptions) { |
| setProperty("securityOptions", securityOptions); |
| return this; |
| } |
| /** |
| * Security provider to be used for payload encryption. Defaults to |
| * SunX509 if not set. |
| * |
| * The option is a: <code>java.lang.String</code> type. |
| * |
| * Group: security |
| */ |
| default NettyHttpEndpointConsumerBuilder securityProvider( |
| String securityProvider) { |
| setProperty("securityProvider", securityProvider); |
| return this; |
| } |
| /** |
| * Setting to specify whether SSL encryption is applied to this |
| * endpoint. |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: security |
| */ |
| default NettyHttpEndpointConsumerBuilder ssl(boolean ssl) { |
| setProperty("ssl", ssl); |
| return this; |
| } |
| /** |
| * Setting to specify whether SSL encryption is applied to this |
| * endpoint. |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: security |
| */ |
| default NettyHttpEndpointConsumerBuilder ssl(String ssl) { |
| setProperty("ssl", ssl); |
| return this; |
| } |
| /** |
| * When enabled and in SSL mode, then the Netty consumer will enrich the |
| * Camel Message with headers having information about the client |
| * certificate such as subject name, issuer name, serial number, and the |
| * valid date range. |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: security |
| */ |
| default NettyHttpEndpointConsumerBuilder sslClientCertHeaders( |
| boolean sslClientCertHeaders) { |
| setProperty("sslClientCertHeaders", sslClientCertHeaders); |
| return this; |
| } |
| /** |
| * When enabled and in SSL mode, then the Netty consumer will enrich the |
| * Camel Message with headers having information about the client |
| * certificate such as subject name, issuer name, serial number, and the |
| * valid date range. |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: security |
| */ |
| default NettyHttpEndpointConsumerBuilder sslClientCertHeaders( |
| String sslClientCertHeaders) { |
| setProperty("sslClientCertHeaders", sslClientCertHeaders); |
| return this; |
| } |
| /** |
| * To configure security using SSLContextParameters. |
| * |
| * The option is a: |
| * <code>org.apache.camel.support.jsse.SSLContextParameters</code> type. |
| * |
| * Group: security |
| */ |
| default NettyHttpEndpointConsumerBuilder sslContextParameters( |
| Object sslContextParameters) { |
| setProperty("sslContextParameters", sslContextParameters); |
| return this; |
| } |
| /** |
| * To configure security using SSLContextParameters. |
| * |
| * The option will be converted to a |
| * <code>org.apache.camel.support.jsse.SSLContextParameters</code> type. |
| * |
| * Group: security |
| */ |
| default NettyHttpEndpointConsumerBuilder sslContextParameters( |
| String sslContextParameters) { |
| setProperty("sslContextParameters", sslContextParameters); |
| return this; |
| } |
| /** |
| * Reference to a class that could be used to return an SSL Handler. |
| * |
| * The option is a: <code>io.netty.handler.ssl.SslHandler</code> type. |
| * |
| * Group: security |
| */ |
| default NettyHttpEndpointConsumerBuilder sslHandler(Object sslHandler) { |
| setProperty("sslHandler", sslHandler); |
| return this; |
| } |
| /** |
| * Reference to a class that could be used to return an SSL Handler. |
| * |
| * The option will be converted to a |
| * <code>io.netty.handler.ssl.SslHandler</code> type. |
| * |
| * Group: security |
| */ |
| default NettyHttpEndpointConsumerBuilder sslHandler(String sslHandler) { |
| setProperty("sslHandler", sslHandler); |
| return this; |
| } |
| /** |
| * Server side certificate keystore to be used for encryption. |
| * |
| * The option is a: <code>java.io.File</code> type. |
| * |
| * Group: security |
| */ |
| default NettyHttpEndpointConsumerBuilder trustStoreFile( |
| File trustStoreFile) { |
| setProperty("trustStoreFile", trustStoreFile); |
| return this; |
| } |
| /** |
| * Server side certificate keystore to be used for encryption. |
| * |
| * The option will be converted to a <code>java.io.File</code> type. |
| * |
| * Group: security |
| */ |
| default NettyHttpEndpointConsumerBuilder trustStoreFile( |
| String trustStoreFile) { |
| setProperty("trustStoreFile", trustStoreFile); |
| return this; |
| } |
| /** |
| * Server side certificate keystore to be used for encryption. Is loaded |
| * by default from classpath, but you can prefix with classpath:, file:, |
| * or http: to load the resource from different systems. |
| * |
| * The option is a: <code>java.lang.String</code> type. |
| * |
| * Group: security |
| */ |
| default NettyHttpEndpointConsumerBuilder trustStoreResource( |
| String trustStoreResource) { |
| setProperty("trustStoreResource", trustStoreResource); |
| return this; |
| } |
| /** |
| * 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 or ERROR level and |
| * ignored. |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: consumer |
| */ |
| default NettyHttpEndpointConsumerBuilder bridgeErrorHandler( |
| boolean bridgeErrorHandler) { |
| setProperty("bridgeErrorHandler", bridgeErrorHandler); |
| return this; |
| } |
| /** |
| * 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 or ERROR level and |
| * ignored. |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: consumer |
| */ |
| default NettyHttpEndpointConsumerBuilder bridgeErrorHandler( |
| String bridgeErrorHandler) { |
| setProperty("bridgeErrorHandler", bridgeErrorHandler); |
| return this; |
| } |
| } |
| |
| /** |
| * Advanced builder for endpoint consumers for the Netty4 HTTP component. |
| */ |
| public interface AdvancedNettyHttpEndpointConsumerBuilder |
| extends |
| EndpointConsumerBuilder { |
| default NettyHttpEndpointConsumerBuilder basic() { |
| return (NettyHttpEndpointConsumerBuilder) this; |
| } |
| /** |
| * Allows to configure a backlog for netty consumer (server). Note the |
| * backlog is just a best effort depending on the OS. Setting this |
| * option to a value such as 200, 500 or 1000, tells the TCP stack how |
| * long the accept queue can be If this option is not configured, then |
| * the backlog depends on OS setting. |
| * |
| * The option is a: <code>int</code> type. |
| * |
| * Group: consumer (advanced) |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder backlog(int backlog) { |
| setProperty("backlog", backlog); |
| return this; |
| } |
| /** |
| * Allows to configure a backlog for netty consumer (server). Note the |
| * backlog is just a best effort depending on the OS. Setting this |
| * option to a value such as 200, 500 or 1000, tells the TCP stack how |
| * long the accept queue can be If this option is not configured, then |
| * the backlog depends on OS setting. |
| * |
| * The option will be converted to a <code>int</code> type. |
| * |
| * Group: consumer (advanced) |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder backlog(String backlog) { |
| setProperty("backlog", backlog); |
| return this; |
| } |
| /** |
| * When netty works on nio mode, it uses default bossCount parameter |
| * from Netty, which is 1. User can use this operation to override the |
| * default bossCount from Netty. |
| * |
| * The option is a: <code>int</code> type. |
| * |
| * Group: consumer (advanced) |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder bossCount(int bossCount) { |
| setProperty("bossCount", bossCount); |
| return this; |
| } |
| /** |
| * When netty works on nio mode, it uses default bossCount parameter |
| * from Netty, which is 1. User can use this operation to override the |
| * default bossCount from Netty. |
| * |
| * The option will be converted to a <code>int</code> type. |
| * |
| * Group: consumer (advanced) |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder bossCount( |
| String bossCount) { |
| setProperty("bossCount", bossCount); |
| return this; |
| } |
| /** |
| * Set the BossGroup which could be used for handling the new connection |
| * of the server side across the NettyEndpoint. |
| * |
| * The option is a: <code>io.netty.channel.EventLoopGroup</code> type. |
| * |
| * Group: consumer (advanced) |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder bossGroup( |
| Object bossGroup) { |
| setProperty("bossGroup", bossGroup); |
| return this; |
| } |
| /** |
| * Set the BossGroup which could be used for handling the new connection |
| * of the server side across the NettyEndpoint. |
| * |
| * The option will be converted to a |
| * <code>io.netty.channel.EventLoopGroup</code> type. |
| * |
| * Group: consumer (advanced) |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder bossGroup( |
| String bossGroup) { |
| setProperty("bossGroup", bossGroup); |
| return this; |
| } |
| /** |
| * Value in bytes the max content length per chunked frame received on |
| * the Netty HTTP server. |
| * |
| * The option is a: <code>int</code> type. |
| * |
| * Group: consumer (advanced) |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder chunkedMaxContentLength( |
| int chunkedMaxContentLength) { |
| setProperty("chunkedMaxContentLength", chunkedMaxContentLength); |
| return this; |
| } |
| /** |
| * Value in bytes the max content length per chunked frame received on |
| * the Netty HTTP server. |
| * |
| * The option will be converted to a <code>int</code> type. |
| * |
| * Group: consumer (advanced) |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder chunkedMaxContentLength( |
| String chunkedMaxContentLength) { |
| setProperty("chunkedMaxContentLength", chunkedMaxContentLength); |
| return this; |
| } |
| /** |
| * Allow using gzip/deflate for compression on the Netty HTTP server if |
| * the client supports it from the HTTP headers. |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: consumer (advanced) |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder compression( |
| boolean compression) { |
| setProperty("compression", compression); |
| return this; |
| } |
| /** |
| * Allow using gzip/deflate for compression on the Netty HTTP server if |
| * the client supports it from the HTTP headers. |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: consumer (advanced) |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder compression( |
| String compression) { |
| setProperty("compression", compression); |
| return this; |
| } |
| /** |
| * If sync is enabled then this option dictates NettyConsumer if it |
| * should disconnect where there is no reply to send back. |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: consumer (advanced) |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder disconnectOnNoReply( |
| boolean disconnectOnNoReply) { |
| setProperty("disconnectOnNoReply", disconnectOnNoReply); |
| return this; |
| } |
| /** |
| * If sync is enabled then this option dictates NettyConsumer if it |
| * should disconnect where there is no reply to send back. |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: consumer (advanced) |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder disconnectOnNoReply( |
| String disconnectOnNoReply) { |
| setProperty("disconnectOnNoReply", disconnectOnNoReply); |
| return this; |
| } |
| /** |
| * To disable HTTP methods on the Netty HTTP consumer. You can specify |
| * multiple separated by comma. |
| * |
| * The option is a: <code>java.lang.String</code> type. |
| * |
| * Group: consumer (advanced) |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder httpMethodRestrict( |
| String httpMethodRestrict) { |
| setProperty("httpMethodRestrict", httpMethodRestrict); |
| return this; |
| } |
| /** |
| * If this option is enabled, then during binding from Netty to Camel |
| * Message then the headers will be mapped as well (eg added as header |
| * to the Camel Message as well). You can turn off this option to |
| * disable this. The headers can still be accessed from the |
| * org.apache.camel.component.netty.http.NettyHttpMessage message with |
| * the method getHttpRequest() that returns the Netty HTTP request |
| * io.netty.handler.codec.http.HttpRequest instance. |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: consumer (advanced) |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder mapHeaders( |
| boolean mapHeaders) { |
| setProperty("mapHeaders", mapHeaders); |
| return this; |
| } |
| /** |
| * If this option is enabled, then during binding from Netty to Camel |
| * Message then the headers will be mapped as well (eg added as header |
| * to the Camel Message as well). You can turn off this option to |
| * disable this. The headers can still be accessed from the |
| * org.apache.camel.component.netty.http.NettyHttpMessage message with |
| * the method getHttpRequest() that returns the Netty HTTP request |
| * io.netty.handler.codec.http.HttpRequest instance. |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: consumer (advanced) |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder mapHeaders( |
| String mapHeaders) { |
| setProperty("mapHeaders", mapHeaders); |
| return this; |
| } |
| /** |
| * The maximum length of all headers. If the sum of the length of each |
| * header exceeds this value, a |
| * io.netty.handler.codec.TooLongFrameException will be raised. |
| * |
| * The option is a: <code>int</code> type. |
| * |
| * Group: consumer (advanced) |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder maxHeaderSize( |
| int maxHeaderSize) { |
| setProperty("maxHeaderSize", maxHeaderSize); |
| return this; |
| } |
| /** |
| * The maximum length of all headers. If the sum of the length of each |
| * header exceeds this value, a |
| * io.netty.handler.codec.TooLongFrameException will be raised. |
| * |
| * The option will be converted to a <code>int</code> type. |
| * |
| * Group: consumer (advanced) |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder maxHeaderSize( |
| String maxHeaderSize) { |
| setProperty("maxHeaderSize", maxHeaderSize); |
| return this; |
| } |
| /** |
| * To use a custom NettyServerBootstrapFactory. |
| * |
| * The option is a: |
| * <code>org.apache.camel.component.netty4.NettyServerBootstrapFactory</code> type. |
| * |
| * Group: consumer (advanced) |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder nettyServerBootstrapFactory( |
| Object nettyServerBootstrapFactory) { |
| setProperty("nettyServerBootstrapFactory", nettyServerBootstrapFactory); |
| return this; |
| } |
| /** |
| * To use a custom NettyServerBootstrapFactory. |
| * |
| * The option will be converted to a |
| * <code>org.apache.camel.component.netty4.NettyServerBootstrapFactory</code> type. |
| * |
| * Group: consumer (advanced) |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder nettyServerBootstrapFactory( |
| String nettyServerBootstrapFactory) { |
| setProperty("nettyServerBootstrapFactory", nettyServerBootstrapFactory); |
| return this; |
| } |
| /** |
| * To use a shared Netty HTTP server. See Netty HTTP Server Example for |
| * more details. |
| * |
| * The option is a: |
| * <code>org.apache.camel.component.netty4.http.NettySharedHttpServer</code> type. |
| * |
| * Group: consumer (advanced) |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder nettySharedHttpServer( |
| Object nettySharedHttpServer) { |
| setProperty("nettySharedHttpServer", nettySharedHttpServer); |
| return this; |
| } |
| /** |
| * To use a shared Netty HTTP server. See Netty HTTP Server Example for |
| * more details. |
| * |
| * The option will be converted to a |
| * <code>org.apache.camel.component.netty4.http.NettySharedHttpServer</code> type. |
| * |
| * Group: consumer (advanced) |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder nettySharedHttpServer( |
| String nettySharedHttpServer) { |
| setProperty("nettySharedHttpServer", nettySharedHttpServer); |
| return this; |
| } |
| /** |
| * If sync is enabled this option dictates NettyConsumer which logging |
| * level to use when logging a there is no reply to send back. |
| * |
| * The option is a: <code>org.apache.camel.LoggingLevel</code> type. |
| * |
| * Group: consumer (advanced) |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder noReplyLogLevel( |
| LoggingLevel noReplyLogLevel) { |
| setProperty("noReplyLogLevel", noReplyLogLevel); |
| return this; |
| } |
| /** |
| * If sync is enabled this option dictates NettyConsumer which logging |
| * level to use when logging a there is no reply to send back. |
| * |
| * The option will be converted to a |
| * <code>org.apache.camel.LoggingLevel</code> type. |
| * |
| * Group: consumer (advanced) |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder noReplyLogLevel( |
| String noReplyLogLevel) { |
| setProperty("noReplyLogLevel", noReplyLogLevel); |
| return this; |
| } |
| /** |
| * If the server (NettyConsumer) catches an |
| * java.nio.channels.ClosedChannelException then its logged using this |
| * logging level. This is used to avoid logging the closed channel |
| * exceptions, as clients can disconnect abruptly and then cause a flood |
| * of closed exceptions in the Netty server. |
| * |
| * The option is a: <code>org.apache.camel.LoggingLevel</code> type. |
| * |
| * Group: consumer (advanced) |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder serverClosedChannelExceptionCaughtLogLevel( |
| LoggingLevel serverClosedChannelExceptionCaughtLogLevel) { |
| setProperty("serverClosedChannelExceptionCaughtLogLevel", serverClosedChannelExceptionCaughtLogLevel); |
| return this; |
| } |
| /** |
| * If the server (NettyConsumer) catches an |
| * java.nio.channels.ClosedChannelException then its logged using this |
| * logging level. This is used to avoid logging the closed channel |
| * exceptions, as clients can disconnect abruptly and then cause a flood |
| * of closed exceptions in the Netty server. |
| * |
| * The option will be converted to a |
| * <code>org.apache.camel.LoggingLevel</code> type. |
| * |
| * Group: consumer (advanced) |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder serverClosedChannelExceptionCaughtLogLevel( |
| String serverClosedChannelExceptionCaughtLogLevel) { |
| setProperty("serverClosedChannelExceptionCaughtLogLevel", serverClosedChannelExceptionCaughtLogLevel); |
| return this; |
| } |
| /** |
| * If the server (NettyConsumer) catches an exception then its logged |
| * using this logging level. |
| * |
| * The option is a: <code>org.apache.camel.LoggingLevel</code> type. |
| * |
| * Group: consumer (advanced) |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder serverExceptionCaughtLogLevel( |
| LoggingLevel serverExceptionCaughtLogLevel) { |
| setProperty("serverExceptionCaughtLogLevel", serverExceptionCaughtLogLevel); |
| return this; |
| } |
| /** |
| * If the server (NettyConsumer) catches an exception then its logged |
| * using this logging level. |
| * |
| * The option will be converted to a |
| * <code>org.apache.camel.LoggingLevel</code> type. |
| * |
| * Group: consumer (advanced) |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder serverExceptionCaughtLogLevel( |
| String serverExceptionCaughtLogLevel) { |
| setProperty("serverExceptionCaughtLogLevel", serverExceptionCaughtLogLevel); |
| return this; |
| } |
| /** |
| * To use a custom ServerInitializerFactory. |
| * |
| * The option is a: |
| * <code>org.apache.camel.component.netty4.ServerInitializerFactory</code> type. |
| * |
| * Group: consumer (advanced) |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder serverInitializerFactory( |
| Object serverInitializerFactory) { |
| setProperty("serverInitializerFactory", serverInitializerFactory); |
| return this; |
| } |
| /** |
| * To use a custom ServerInitializerFactory. |
| * |
| * The option will be converted to a |
| * <code>org.apache.camel.component.netty4.ServerInitializerFactory</code> type. |
| * |
| * Group: consumer (advanced) |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder serverInitializerFactory( |
| String serverInitializerFactory) { |
| setProperty("serverInitializerFactory", serverInitializerFactory); |
| return this; |
| } |
| /** |
| * Specifies whether to enable HTTP TRACE for this Netty HTTP consumer. |
| * By default TRACE is turned off. |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: consumer (advanced) |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder traceEnabled( |
| boolean traceEnabled) { |
| setProperty("traceEnabled", traceEnabled); |
| return this; |
| } |
| /** |
| * Specifies whether to enable HTTP TRACE for this Netty HTTP consumer. |
| * By default TRACE is turned off. |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: consumer (advanced) |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder traceEnabled( |
| String traceEnabled) { |
| setProperty("traceEnabled", traceEnabled); |
| return this; |
| } |
| /** |
| * If this option is enabled, then during binding from Netty to Camel |
| * Message then the header values will be URL decoded (eg %20 will be a |
| * space character. Notice this option is used by the default |
| * org.apache.camel.component.netty.http.NettyHttpBinding and therefore |
| * if you implement a custom |
| * org.apache.camel.component.netty4.http.NettyHttpBinding then you |
| * would need to decode the headers accordingly to this option. |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: consumer (advanced) |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder urlDecodeHeaders( |
| boolean urlDecodeHeaders) { |
| setProperty("urlDecodeHeaders", urlDecodeHeaders); |
| return this; |
| } |
| /** |
| * If this option is enabled, then during binding from Netty to Camel |
| * Message then the header values will be URL decoded (eg %20 will be a |
| * space character. Notice this option is used by the default |
| * org.apache.camel.component.netty.http.NettyHttpBinding and therefore |
| * if you implement a custom |
| * org.apache.camel.component.netty4.http.NettyHttpBinding then you |
| * would need to decode the headers accordingly to this option. |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: consumer (advanced) |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder urlDecodeHeaders( |
| String urlDecodeHeaders) { |
| setProperty("urlDecodeHeaders", urlDecodeHeaders); |
| return this; |
| } |
| /** |
| * Whether to use ordered thread pool, to ensure events are processed |
| * orderly on the same channel. |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: consumer (advanced) |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder usingExecutorService( |
| boolean usingExecutorService) { |
| setProperty("usingExecutorService", usingExecutorService); |
| return this; |
| } |
| /** |
| * Whether to use ordered thread pool, to ensure events are processed |
| * orderly on the same channel. |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: consumer (advanced) |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder usingExecutorService( |
| String usingExecutorService) { |
| setProperty("usingExecutorService", usingExecutorService); |
| return this; |
| } |
| /** |
| * Only used for TCP when transferExchange is true. When set to true, |
| * serializable objects in headers and properties will be added to the |
| * exchange. Otherwise Camel will exclude any non-serializable objects |
| * and log it at WARN level. |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder allowSerializedHeaders( |
| boolean allowSerializedHeaders) { |
| setProperty("allowSerializedHeaders", allowSerializedHeaders); |
| return this; |
| } |
| /** |
| * Only used for TCP when transferExchange is true. When set to true, |
| * serializable objects in headers and properties will be added to the |
| * exchange. Otherwise Camel will exclude any non-serializable objects |
| * and log it at WARN level. |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder allowSerializedHeaders( |
| String allowSerializedHeaders) { |
| setProperty("allowSerializedHeaders", allowSerializedHeaders); |
| return this; |
| } |
| /** |
| * To use a explicit ChannelGroup. |
| * |
| * The option is a: <code>io.netty.channel.group.ChannelGroup</code> |
| * type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder channelGroup( |
| Object channelGroup) { |
| setProperty("channelGroup", channelGroup); |
| return this; |
| } |
| /** |
| * To use a explicit ChannelGroup. |
| * |
| * The option will be converted to a |
| * <code>io.netty.channel.group.ChannelGroup</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder channelGroup( |
| String channelGroup) { |
| setProperty("channelGroup", channelGroup); |
| return this; |
| } |
| /** |
| * To use a custom configured NettyHttpConfiguration for configuring |
| * this endpoint. |
| * |
| * The option is a: |
| * <code>org.apache.camel.component.netty4.http.NettyHttpConfiguration</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder configuration( |
| Object configuration) { |
| setProperty("configuration", configuration); |
| return this; |
| } |
| /** |
| * To use a custom configured NettyHttpConfiguration for configuring |
| * this endpoint. |
| * |
| * The option will be converted to a |
| * <code>org.apache.camel.component.netty4.http.NettyHttpConfiguration</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder configuration( |
| String configuration) { |
| setProperty("configuration", configuration); |
| return this; |
| } |
| /** |
| * Determines whether or not the raw input stream from Netty |
| * HttpRequest#getContent() or HttpResponset#getContent() is cached or |
| * not (Camel will read the stream into a in light-weight memory based |
| * Stream caching) cache. By default Camel will cache the Netty 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. Mind that |
| * if you enable this option, then you cannot read the Netty stream |
| * multiple times out of the box, and you would need manually to reset |
| * the reader index on the Netty raw stream. Also Netty will auto-close |
| * the Netty stream when the Netty HTTP server/HTTP client is done |
| * processing, which means that if the asynchronous routing engine is in |
| * use then any asynchronous thread that may continue routing the |
| * org.apache.camel.Exchange may not be able to read the Netty stream, |
| * because Netty has closed it. |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder disableStreamCache( |
| boolean disableStreamCache) { |
| setProperty("disableStreamCache", disableStreamCache); |
| return this; |
| } |
| /** |
| * Determines whether or not the raw input stream from Netty |
| * HttpRequest#getContent() or HttpResponset#getContent() is cached or |
| * not (Camel will read the stream into a in light-weight memory based |
| * Stream caching) cache. By default Camel will cache the Netty 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. Mind that |
| * if you enable this option, then you cannot read the Netty stream |
| * multiple times out of the box, and you would need manually to reset |
| * the reader index on the Netty raw stream. Also Netty will auto-close |
| * the Netty stream when the Netty HTTP server/HTTP client is done |
| * processing, which means that if the asynchronous routing engine is in |
| * use then any asynchronous thread that may continue routing the |
| * org.apache.camel.Exchange may not be able to read the Netty stream, |
| * because Netty has closed it. |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder disableStreamCache( |
| String disableStreamCache) { |
| setProperty("disableStreamCache", disableStreamCache); |
| return this; |
| } |
| /** |
| * To use a custom org.apache.camel.spi.HeaderFilterStrategy to filter |
| * headers. |
| * |
| * The option is a: |
| * <code>org.apache.camel.spi.HeaderFilterStrategy</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder headerFilterStrategy( |
| HeaderFilterStrategy headerFilterStrategy) { |
| setProperty("headerFilterStrategy", headerFilterStrategy); |
| return this; |
| } |
| /** |
| * To use a custom org.apache.camel.spi.HeaderFilterStrategy to filter |
| * headers. |
| * |
| * The option will be converted to a |
| * <code>org.apache.camel.spi.HeaderFilterStrategy</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder headerFilterStrategy( |
| String headerFilterStrategy) { |
| setProperty("headerFilterStrategy", headerFilterStrategy); |
| return this; |
| } |
| /** |
| * Whether to use native transport instead of NIO. Native transport |
| * takes advantage of the host operating system and is only supported on |
| * some platforms. You need to add the netty JAR for the host operating |
| * system you are using. See more details at: |
| * http://netty.io/wiki/native-transports.html. |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder nativeTransport( |
| boolean nativeTransport) { |
| setProperty("nativeTransport", nativeTransport); |
| return this; |
| } |
| /** |
| * Whether to use native transport instead of NIO. Native transport |
| * takes advantage of the host operating system and is only supported on |
| * some platforms. You need to add the netty JAR for the host operating |
| * system you are using. See more details at: |
| * http://netty.io/wiki/native-transports.html. |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder nativeTransport( |
| String nativeTransport) { |
| setProperty("nativeTransport", nativeTransport); |
| return this; |
| } |
| /** |
| * To use a custom |
| * org.apache.camel.component.netty4.http.NettyHttpBinding for binding |
| * to/from Netty and Camel Message API. |
| * |
| * The option is a: |
| * <code>org.apache.camel.component.netty4.http.NettyHttpBinding</code> |
| * type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder nettyHttpBinding( |
| Object nettyHttpBinding) { |
| setProperty("nettyHttpBinding", nettyHttpBinding); |
| return this; |
| } |
| /** |
| * To use a custom |
| * org.apache.camel.component.netty4.http.NettyHttpBinding for binding |
| * to/from Netty and Camel Message API. |
| * |
| * The option will be converted to a |
| * <code>org.apache.camel.component.netty4.http.NettyHttpBinding</code> |
| * type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder nettyHttpBinding( |
| String nettyHttpBinding) { |
| setProperty("nettyHttpBinding", nettyHttpBinding); |
| return this; |
| } |
| /** |
| * Allows to configure additional netty options using option. as prefix. |
| * For example option.child.keepAlive=false to set the netty option |
| * child.keepAlive=false. See the Netty documentation for possible |
| * options that can be used. |
| * |
| * The option is a: <code>java.util.Map<java.lang.String, |
| * java.lang.Object></code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder options( |
| Map<String, Object> options) { |
| setProperty("options", options); |
| return this; |
| } |
| /** |
| * Allows to configure additional netty options using option. as prefix. |
| * For example option.child.keepAlive=false to set the netty option |
| * child.keepAlive=false. See the Netty documentation for possible |
| * options that can be used. |
| * |
| * The option will be converted to a |
| * <code>java.util.Map<java.lang.String, java.lang.Object></code> |
| * type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder options(String options) { |
| setProperty("options", options); |
| return this; |
| } |
| /** |
| * The TCP/UDP buffer sizes to be used during inbound communication. |
| * Size is bytes. |
| * |
| * The option is a: <code>int</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder receiveBufferSize( |
| int receiveBufferSize) { |
| setProperty("receiveBufferSize", receiveBufferSize); |
| return this; |
| } |
| /** |
| * The TCP/UDP buffer sizes to be used during inbound communication. |
| * Size is bytes. |
| * |
| * The option will be converted to a <code>int</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder receiveBufferSize( |
| String receiveBufferSize) { |
| setProperty("receiveBufferSize", receiveBufferSize); |
| return this; |
| } |
| /** |
| * Configures the buffer size predictor. See details at Jetty |
| * documentation and this mail thread. |
| * |
| * The option is a: <code>int</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder receiveBufferSizePredictor( |
| int receiveBufferSizePredictor) { |
| setProperty("receiveBufferSizePredictor", receiveBufferSizePredictor); |
| return this; |
| } |
| /** |
| * Configures the buffer size predictor. See details at Jetty |
| * documentation and this mail thread. |
| * |
| * The option will be converted to a <code>int</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder receiveBufferSizePredictor( |
| String receiveBufferSizePredictor) { |
| setProperty("receiveBufferSizePredictor", receiveBufferSizePredictor); |
| return this; |
| } |
| /** |
| * The TCP/UDP buffer sizes to be used during outbound communication. |
| * Size is bytes. |
| * |
| * The option is a: <code>int</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder sendBufferSize( |
| int sendBufferSize) { |
| setProperty("sendBufferSize", sendBufferSize); |
| return this; |
| } |
| /** |
| * The TCP/UDP buffer sizes to be used during outbound communication. |
| * Size is bytes. |
| * |
| * The option will be converted to a <code>int</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder sendBufferSize( |
| String sendBufferSize) { |
| setProperty("sendBufferSize", sendBufferSize); |
| return this; |
| } |
| /** |
| * 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. |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder transferException( |
| boolean transferException) { |
| setProperty("transferException", transferException); |
| return this; |
| } |
| /** |
| * 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. |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder transferException( |
| String transferException) { |
| setProperty("transferException", transferException); |
| return this; |
| } |
| /** |
| * Only used for TCP. You can transfer the exchange over the wire |
| * instead of just the body. The following fields are transferred: In |
| * body, Out body, fault body, In headers, Out headers, fault headers, |
| * exchange properties, exchange exception. This requires that the |
| * objects are serializable. Camel will exclude any non-serializable |
| * objects and log it at WARN level. |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder transferExchange( |
| boolean transferExchange) { |
| setProperty("transferExchange", transferExchange); |
| return this; |
| } |
| /** |
| * Only used for TCP. You can transfer the exchange over the wire |
| * instead of just the body. The following fields are transferred: In |
| * body, Out body, fault body, In headers, Out headers, fault headers, |
| * exchange properties, exchange exception. This requires that the |
| * objects are serializable. Camel will exclude any non-serializable |
| * objects and log it at WARN level. |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder transferExchange( |
| String transferExchange) { |
| setProperty("transferExchange", transferExchange); |
| return this; |
| } |
| /** |
| * When netty works on nio mode, it uses default workerCount parameter |
| * from Netty, which is cpu_core_threads x 2. User can use this |
| * operation to override the default workerCount from Netty. |
| * |
| * The option is a: <code>int</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder workerCount( |
| int workerCount) { |
| setProperty("workerCount", workerCount); |
| return this; |
| } |
| /** |
| * When netty works on nio mode, it uses default workerCount parameter |
| * from Netty, which is cpu_core_threads x 2. User can use this |
| * operation to override the default workerCount from Netty. |
| * |
| * The option will be converted to a <code>int</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder workerCount( |
| String workerCount) { |
| setProperty("workerCount", workerCount); |
| return this; |
| } |
| /** |
| * To use a explicit EventLoopGroup as the boss thread pool. For example |
| * to share a thread pool with multiple consumers or producers. By |
| * default each consumer or producer has their own worker pool with 2 x |
| * cpu count core threads. |
| * |
| * The option is a: <code>io.netty.channel.EventLoopGroup</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder workerGroup( |
| Object workerGroup) { |
| setProperty("workerGroup", workerGroup); |
| return this; |
| } |
| /** |
| * To use a explicit EventLoopGroup as the boss thread pool. For example |
| * to share a thread pool with multiple consumers or producers. By |
| * default each consumer or producer has their own worker pool with 2 x |
| * cpu count core threads. |
| * |
| * The option will be converted to a |
| * <code>io.netty.channel.EventLoopGroup</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder workerGroup( |
| String workerGroup) { |
| setProperty("workerGroup", workerGroup); |
| return this; |
| } |
| /** |
| * 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. |
| * |
| * The option is a: <code>org.apache.camel.spi.ExceptionHandler</code> |
| * type. |
| * |
| * Group: consumer (advanced) |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder exceptionHandler( |
| ExceptionHandler exceptionHandler) { |
| setProperty("exceptionHandler", exceptionHandler); |
| return this; |
| } |
| /** |
| * 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. |
| * |
| * The option will be converted to a |
| * <code>org.apache.camel.spi.ExceptionHandler</code> type. |
| * |
| * Group: consumer (advanced) |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder exceptionHandler( |
| String exceptionHandler) { |
| setProperty("exceptionHandler", exceptionHandler); |
| return this; |
| } |
| /** |
| * Sets the exchange pattern when the consumer creates an exchange. |
| * |
| * The option is a: <code>org.apache.camel.ExchangePattern</code> type. |
| * |
| * Group: consumer (advanced) |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder exchangePattern( |
| ExchangePattern exchangePattern) { |
| setProperty("exchangePattern", exchangePattern); |
| return this; |
| } |
| /** |
| * Sets the exchange pattern when the consumer creates an exchange. |
| * |
| * The option will be converted to a |
| * <code>org.apache.camel.ExchangePattern</code> type. |
| * |
| * Group: consumer (advanced) |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder exchangePattern( |
| String exchangePattern) { |
| setProperty("exchangePattern", exchangePattern); |
| return this; |
| } |
| /** |
| * Whether the endpoint should use basic property binding (Camel 2.x) or |
| * the newer property binding with additional capabilities. |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder basicPropertyBinding( |
| boolean basicPropertyBinding) { |
| setProperty("basicPropertyBinding", basicPropertyBinding); |
| return this; |
| } |
| /** |
| * Whether the endpoint should use basic property binding (Camel 2.x) or |
| * the newer property binding with additional capabilities. |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder basicPropertyBinding( |
| String basicPropertyBinding) { |
| setProperty("basicPropertyBinding", basicPropertyBinding); |
| return this; |
| } |
| /** |
| * To use a custom configured NettyServerBootstrapConfiguration for |
| * configuring this endpoint. |
| * |
| * The option is a: <code>java.lang.Object</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder bootstrapConfiguration( |
| Object bootstrapConfiguration) { |
| setProperty("bootstrapConfiguration", bootstrapConfiguration); |
| return this; |
| } |
| /** |
| * To use a custom configured NettyServerBootstrapConfiguration for |
| * configuring this endpoint. |
| * |
| * The option will be converted to a <code>java.lang.Object</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder bootstrapConfiguration( |
| String bootstrapConfiguration) { |
| setProperty("bootstrapConfiguration", bootstrapConfiguration); |
| return this; |
| } |
| /** |
| * Sets whether synchronous processing should be strictly used, or Camel |
| * is allowed to use asynchronous processing (if supported). |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder synchronous( |
| boolean synchronous) { |
| setProperty("synchronous", synchronous); |
| return this; |
| } |
| /** |
| * Sets whether synchronous processing should be strictly used, or Camel |
| * is allowed to use asynchronous processing (if supported). |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointConsumerBuilder synchronous( |
| String synchronous) { |
| setProperty("synchronous", synchronous); |
| return this; |
| } |
| } |
| |
| /** |
| * Builder for endpoint producers for the Netty4 HTTP component. |
| */ |
| public interface NettyHttpEndpointProducerBuilder |
| extends |
| EndpointProducerBuilder { |
| default AdvancedNettyHttpEndpointProducerBuilder advanced() { |
| return (AdvancedNettyHttpEndpointProducerBuilder) this; |
| } |
| /** |
| * If the option is true, the producer will ignore the Exchange.HTTP_URI |
| * header, and use the endpoint's URI for request. You may also set the |
| * throwExceptionOnFailure to be false to let the producer send all the |
| * fault response back. The consumer working in the bridge mode will |
| * skip the gzip compression and WWW URL form encoding (by adding the |
| * Exchange.SKIP_GZIP_ENCODING and Exchange.SKIP_WWW_FORM_URLENCODED |
| * headers to the consumed exchange). |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: common |
| */ |
| default NettyHttpEndpointProducerBuilder bridgeEndpoint( |
| boolean bridgeEndpoint) { |
| setProperty("bridgeEndpoint", bridgeEndpoint); |
| return this; |
| } |
| /** |
| * If the option is true, the producer will ignore the Exchange.HTTP_URI |
| * header, and use the endpoint's URI for request. You may also set the |
| * throwExceptionOnFailure to be false to let the producer send all the |
| * fault response back. The consumer working in the bridge mode will |
| * skip the gzip compression and WWW URL form encoding (by adding the |
| * Exchange.SKIP_GZIP_ENCODING and Exchange.SKIP_WWW_FORM_URLENCODED |
| * headers to the consumed exchange). |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: common |
| */ |
| default NettyHttpEndpointProducerBuilder bridgeEndpoint( |
| String bridgeEndpoint) { |
| setProperty("bridgeEndpoint", bridgeEndpoint); |
| return this; |
| } |
| /** |
| * Whether or not to disconnect(close) from Netty Channel right after |
| * use. Can be used for both consumer and producer. |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: common |
| */ |
| default NettyHttpEndpointProducerBuilder disconnect(boolean disconnect) { |
| setProperty("disconnect", disconnect); |
| return this; |
| } |
| /** |
| * Whether or not to disconnect(close) from Netty Channel right after |
| * use. Can be used for both consumer and producer. |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: common |
| */ |
| default NettyHttpEndpointProducerBuilder disconnect(String disconnect) { |
| setProperty("disconnect", disconnect); |
| return this; |
| } |
| /** |
| * Setting to ensure socket is not closed due to inactivity. |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: common |
| */ |
| default NettyHttpEndpointProducerBuilder keepAlive(boolean keepAlive) { |
| setProperty("keepAlive", keepAlive); |
| return this; |
| } |
| /** |
| * Setting to ensure socket is not closed due to inactivity. |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: common |
| */ |
| default NettyHttpEndpointProducerBuilder keepAlive(String keepAlive) { |
| setProperty("keepAlive", keepAlive); |
| return this; |
| } |
| /** |
| * Setting to facilitate socket multiplexing. |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: common |
| */ |
| default NettyHttpEndpointProducerBuilder reuseAddress( |
| boolean reuseAddress) { |
| setProperty("reuseAddress", reuseAddress); |
| return this; |
| } |
| /** |
| * Setting to facilitate socket multiplexing. |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: common |
| */ |
| default NettyHttpEndpointProducerBuilder reuseAddress( |
| String reuseAddress) { |
| setProperty("reuseAddress", reuseAddress); |
| return this; |
| } |
| /** |
| * This option allows producers and consumers (in client mode) to reuse |
| * the same Netty Channel for the lifecycle of processing the Exchange. |
| * This is useful if you need to call a server multiple times in a Camel |
| * route and want to use the same network connection. When using this, |
| * the channel is not returned to the connection pool until the Exchange |
| * is done; or disconnected if the disconnect option is set to true. The |
| * reused Channel is stored on the Exchange as an exchange property with |
| * the key NettyConstants#NETTY_CHANNEL which allows you to obtain the |
| * channel during routing and use it as well. |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: common |
| */ |
| default NettyHttpEndpointProducerBuilder reuseChannel( |
| boolean reuseChannel) { |
| setProperty("reuseChannel", reuseChannel); |
| return this; |
| } |
| /** |
| * This option allows producers and consumers (in client mode) to reuse |
| * the same Netty Channel for the lifecycle of processing the Exchange. |
| * This is useful if you need to call a server multiple times in a Camel |
| * route and want to use the same network connection. When using this, |
| * the channel is not returned to the connection pool until the Exchange |
| * is done; or disconnected if the disconnect option is set to true. The |
| * reused Channel is stored on the Exchange as an exchange property with |
| * the key NettyConstants#NETTY_CHANNEL which allows you to obtain the |
| * channel during routing and use it as well. |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: common |
| */ |
| default NettyHttpEndpointProducerBuilder reuseChannel( |
| String reuseChannel) { |
| setProperty("reuseChannel", reuseChannel); |
| return this; |
| } |
| /** |
| * Setting to set endpoint as one-way or request-response. |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: common |
| */ |
| default NettyHttpEndpointProducerBuilder sync(boolean sync) { |
| setProperty("sync", sync); |
| return this; |
| } |
| /** |
| * Setting to set endpoint as one-way or request-response. |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: common |
| */ |
| default NettyHttpEndpointProducerBuilder sync(String sync) { |
| setProperty("sync", sync); |
| return this; |
| } |
| /** |
| * Setting to improve TCP protocol performance. |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: common |
| */ |
| default NettyHttpEndpointProducerBuilder tcpNoDelay(boolean tcpNoDelay) { |
| setProperty("tcpNoDelay", tcpNoDelay); |
| return this; |
| } |
| /** |
| * Setting to improve TCP protocol performance. |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: common |
| */ |
| default NettyHttpEndpointProducerBuilder tcpNoDelay(String tcpNoDelay) { |
| setProperty("tcpNoDelay", tcpNoDelay); |
| return this; |
| } |
| /** |
| * Time to wait for a socket connection to be available. Value is in |
| * milliseconds. |
| * |
| * The option is a: <code>int</code> type. |
| * |
| * Group: producer |
| */ |
| default NettyHttpEndpointProducerBuilder connectTimeout( |
| int connectTimeout) { |
| setProperty("connectTimeout", connectTimeout); |
| return this; |
| } |
| /** |
| * Time to wait for a socket connection to be available. Value is in |
| * milliseconds. |
| * |
| * The option will be converted to a <code>int</code> type. |
| * |
| * Group: producer |
| */ |
| default NettyHttpEndpointProducerBuilder connectTimeout( |
| String connectTimeout) { |
| setProperty("connectTimeout", connectTimeout); |
| return this; |
| } |
| /** |
| * Configure a cookie handler to maintain a HTTP session. |
| * |
| * The option is a: |
| * <code>org.apache.camel.http.common.cookie.CookieHandler</code> type. |
| * |
| * Group: producer |
| */ |
| default NettyHttpEndpointProducerBuilder cookieHandler( |
| Object cookieHandler) { |
| setProperty("cookieHandler", cookieHandler); |
| return this; |
| } |
| /** |
| * Configure a cookie handler to maintain a HTTP session. |
| * |
| * The option will be converted to a |
| * <code>org.apache.camel.http.common.cookie.CookieHandler</code> type. |
| * |
| * Group: producer |
| */ |
| default NettyHttpEndpointProducerBuilder cookieHandler( |
| String cookieHandler) { |
| setProperty("cookieHandler", cookieHandler); |
| return this; |
| } |
| /** |
| * Allows to use a timeout for the Netty producer when calling a remote |
| * server. By default no timeout is in use. The value is in milli |
| * seconds, so eg 30000 is 30 seconds. The requestTimeout is using |
| * Netty's ReadTimeoutHandler to trigger the timeout. |
| * |
| * The option is a: <code>long</code> type. |
| * |
| * Group: producer |
| */ |
| default NettyHttpEndpointProducerBuilder requestTimeout( |
| long requestTimeout) { |
| setProperty("requestTimeout", requestTimeout); |
| return this; |
| } |
| /** |
| * Allows to use a timeout for the Netty producer when calling a remote |
| * server. By default no timeout is in use. The value is in milli |
| * seconds, so eg 30000 is 30 seconds. The requestTimeout is using |
| * Netty's ReadTimeoutHandler to trigger the timeout. |
| * |
| * The option will be converted to a <code>long</code> type. |
| * |
| * Group: producer |
| */ |
| default NettyHttpEndpointProducerBuilder requestTimeout( |
| String requestTimeout) { |
| setProperty("requestTimeout", requestTimeout); |
| return this; |
| } |
| /** |
| * Option to disable throwing the HttpOperationFailedException in case |
| * of failed responses from the remote server. This allows you to get |
| * all responses regardless of the HTTP status code. |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: producer |
| */ |
| default NettyHttpEndpointProducerBuilder throwExceptionOnFailure( |
| boolean throwExceptionOnFailure) { |
| setProperty("throwExceptionOnFailure", throwExceptionOnFailure); |
| return this; |
| } |
| /** |
| * Option to disable throwing the HttpOperationFailedException in case |
| * of failed responses from the remote server. This allows you to get |
| * all responses regardless of the HTTP status code. |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: producer |
| */ |
| default NettyHttpEndpointProducerBuilder throwExceptionOnFailure( |
| String throwExceptionOnFailure) { |
| setProperty("throwExceptionOnFailure", throwExceptionOnFailure); |
| return this; |
| } |
| /** |
| * To use a single decoder. This options is deprecated use encoders |
| * instead. |
| * |
| * The option is a: <code>io.netty.channel.ChannelHandler</code> type. |
| * |
| * Group: codec |
| */ |
| @Deprecated |
| default NettyHttpEndpointProducerBuilder decoder(Object decoder) { |
| setProperty("decoder", decoder); |
| return this; |
| } |
| /** |
| * To use a single decoder. This options is deprecated use encoders |
| * instead. |
| * |
| * The option will be converted to a |
| * <code>io.netty.channel.ChannelHandler</code> type. |
| * |
| * Group: codec |
| */ |
| @Deprecated |
| default NettyHttpEndpointProducerBuilder decoder(String decoder) { |
| setProperty("decoder", decoder); |
| return this; |
| } |
| /** |
| * A list of decoders to be used. You can use a String which have values |
| * separated by comma, and have the values be looked up in the Registry. |
| * Just remember to prefix the value with # so Camel knows it should |
| * lookup. |
| * |
| * The option is a: |
| * <code>java.util.List<io.netty.channel.ChannelHandler></code> |
| * type. |
| * |
| * Group: codec |
| */ |
| default NettyHttpEndpointProducerBuilder decoders(List<Object> decoders) { |
| setProperty("decoders", decoders); |
| return this; |
| } |
| /** |
| * A list of decoders to be used. You can use a String which have values |
| * separated by comma, and have the values be looked up in the Registry. |
| * Just remember to prefix the value with # so Camel knows it should |
| * lookup. |
| * |
| * The option will be converted to a |
| * <code>java.util.List<io.netty.channel.ChannelHandler></code> |
| * type. |
| * |
| * Group: codec |
| */ |
| default NettyHttpEndpointProducerBuilder decoders(String decoders) { |
| setProperty("decoders", decoders); |
| return this; |
| } |
| /** |
| * To use a single encoder. This options is deprecated use encoders |
| * instead. |
| * |
| * The option is a: <code>io.netty.channel.ChannelHandler</code> type. |
| * |
| * Group: codec |
| */ |
| @Deprecated |
| default NettyHttpEndpointProducerBuilder encoder(Object encoder) { |
| setProperty("encoder", encoder); |
| return this; |
| } |
| /** |
| * To use a single encoder. This options is deprecated use encoders |
| * instead. |
| * |
| * The option will be converted to a |
| * <code>io.netty.channel.ChannelHandler</code> type. |
| * |
| * Group: codec |
| */ |
| @Deprecated |
| default NettyHttpEndpointProducerBuilder encoder(String encoder) { |
| setProperty("encoder", encoder); |
| return this; |
| } |
| /** |
| * A list of encoders to be used. You can use a String which have values |
| * separated by comma, and have the values be looked up in the Registry. |
| * Just remember to prefix the value with # so Camel knows it should |
| * lookup. |
| * |
| * The option is a: |
| * <code>java.util.List<io.netty.channel.ChannelHandler></code> |
| * type. |
| * |
| * Group: codec |
| */ |
| default NettyHttpEndpointProducerBuilder encoders(List<Object> encoders) { |
| setProperty("encoders", encoders); |
| return this; |
| } |
| /** |
| * A list of encoders to be used. You can use a String which have values |
| * separated by comma, and have the values be looked up in the Registry. |
| * Just remember to prefix the value with # so Camel knows it should |
| * lookup. |
| * |
| * The option will be converted to a |
| * <code>java.util.List<io.netty.channel.ChannelHandler></code> |
| * type. |
| * |
| * Group: codec |
| */ |
| default NettyHttpEndpointProducerBuilder encoders(String encoders) { |
| setProperty("encoders", encoders); |
| return this; |
| } |
| /** |
| * Which protocols to enable when using SSL. |
| * |
| * The option is a: <code>java.lang.String</code> type. |
| * |
| * Group: security |
| */ |
| default NettyHttpEndpointProducerBuilder enabledProtocols( |
| String enabledProtocols) { |
| setProperty("enabledProtocols", enabledProtocols); |
| return this; |
| } |
| /** |
| * Client side certificate keystore to be used for encryption. |
| * |
| * The option is a: <code>java.io.File</code> type. |
| * |
| * Group: security |
| */ |
| default NettyHttpEndpointProducerBuilder keyStoreFile(File keyStoreFile) { |
| setProperty("keyStoreFile", keyStoreFile); |
| return this; |
| } |
| /** |
| * Client side certificate keystore to be used for encryption. |
| * |
| * The option will be converted to a <code>java.io.File</code> type. |
| * |
| * Group: security |
| */ |
| default NettyHttpEndpointProducerBuilder keyStoreFile( |
| String keyStoreFile) { |
| setProperty("keyStoreFile", keyStoreFile); |
| return this; |
| } |
| /** |
| * Keystore format to be used for payload encryption. Defaults to JKS if |
| * not set. |
| * |
| * The option is a: <code>java.lang.String</code> type. |
| * |
| * Group: security |
| */ |
| default NettyHttpEndpointProducerBuilder keyStoreFormat( |
| String keyStoreFormat) { |
| setProperty("keyStoreFormat", keyStoreFormat); |
| return this; |
| } |
| /** |
| * Client side certificate keystore to be used for encryption. Is loaded |
| * by default from classpath, but you can prefix with classpath:, file:, |
| * or http: to load the resource from different systems. |
| * |
| * The option is a: <code>java.lang.String</code> type. |
| * |
| * Group: security |
| */ |
| default NettyHttpEndpointProducerBuilder keyStoreResource( |
| String keyStoreResource) { |
| setProperty("keyStoreResource", keyStoreResource); |
| return this; |
| } |
| /** |
| * Password setting to use in order to encrypt/decrypt payloads sent |
| * using SSH. |
| * |
| * The option is a: <code>java.lang.String</code> type. |
| * |
| * Group: security |
| */ |
| default NettyHttpEndpointProducerBuilder passphrase(String passphrase) { |
| setProperty("passphrase", passphrase); |
| return this; |
| } |
| /** |
| * Security provider to be used for payload encryption. Defaults to |
| * SunX509 if not set. |
| * |
| * The option is a: <code>java.lang.String</code> type. |
| * |
| * Group: security |
| */ |
| default NettyHttpEndpointProducerBuilder securityProvider( |
| String securityProvider) { |
| setProperty("securityProvider", securityProvider); |
| return this; |
| } |
| /** |
| * Setting to specify whether SSL encryption is applied to this |
| * endpoint. |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: security |
| */ |
| default NettyHttpEndpointProducerBuilder ssl(boolean ssl) { |
| setProperty("ssl", ssl); |
| return this; |
| } |
| /** |
| * Setting to specify whether SSL encryption is applied to this |
| * endpoint. |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: security |
| */ |
| default NettyHttpEndpointProducerBuilder ssl(String ssl) { |
| setProperty("ssl", ssl); |
| return this; |
| } |
| /** |
| * When enabled and in SSL mode, then the Netty consumer will enrich the |
| * Camel Message with headers having information about the client |
| * certificate such as subject name, issuer name, serial number, and the |
| * valid date range. |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: security |
| */ |
| default NettyHttpEndpointProducerBuilder sslClientCertHeaders( |
| boolean sslClientCertHeaders) { |
| setProperty("sslClientCertHeaders", sslClientCertHeaders); |
| return this; |
| } |
| /** |
| * When enabled and in SSL mode, then the Netty consumer will enrich the |
| * Camel Message with headers having information about the client |
| * certificate such as subject name, issuer name, serial number, and the |
| * valid date range. |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: security |
| */ |
| default NettyHttpEndpointProducerBuilder sslClientCertHeaders( |
| String sslClientCertHeaders) { |
| setProperty("sslClientCertHeaders", sslClientCertHeaders); |
| return this; |
| } |
| /** |
| * To configure security using SSLContextParameters. |
| * |
| * The option is a: |
| * <code>org.apache.camel.support.jsse.SSLContextParameters</code> type. |
| * |
| * Group: security |
| */ |
| default NettyHttpEndpointProducerBuilder sslContextParameters( |
| Object sslContextParameters) { |
| setProperty("sslContextParameters", sslContextParameters); |
| return this; |
| } |
| /** |
| * To configure security using SSLContextParameters. |
| * |
| * The option will be converted to a |
| * <code>org.apache.camel.support.jsse.SSLContextParameters</code> type. |
| * |
| * Group: security |
| */ |
| default NettyHttpEndpointProducerBuilder sslContextParameters( |
| String sslContextParameters) { |
| setProperty("sslContextParameters", sslContextParameters); |
| return this; |
| } |
| /** |
| * Reference to a class that could be used to return an SSL Handler. |
| * |
| * The option is a: <code>io.netty.handler.ssl.SslHandler</code> type. |
| * |
| * Group: security |
| */ |
| default NettyHttpEndpointProducerBuilder sslHandler(Object sslHandler) { |
| setProperty("sslHandler", sslHandler); |
| return this; |
| } |
| /** |
| * Reference to a class that could be used to return an SSL Handler. |
| * |
| * The option will be converted to a |
| * <code>io.netty.handler.ssl.SslHandler</code> type. |
| * |
| * Group: security |
| */ |
| default NettyHttpEndpointProducerBuilder sslHandler(String sslHandler) { |
| setProperty("sslHandler", sslHandler); |
| return this; |
| } |
| /** |
| * Server side certificate keystore to be used for encryption. |
| * |
| * The option is a: <code>java.io.File</code> type. |
| * |
| * Group: security |
| */ |
| default NettyHttpEndpointProducerBuilder trustStoreFile( |
| File trustStoreFile) { |
| setProperty("trustStoreFile", trustStoreFile); |
| return this; |
| } |
| /** |
| * Server side certificate keystore to be used for encryption. |
| * |
| * The option will be converted to a <code>java.io.File</code> type. |
| * |
| * Group: security |
| */ |
| default NettyHttpEndpointProducerBuilder trustStoreFile( |
| String trustStoreFile) { |
| setProperty("trustStoreFile", trustStoreFile); |
| return this; |
| } |
| /** |
| * Server side certificate keystore to be used for encryption. Is loaded |
| * by default from classpath, but you can prefix with classpath:, file:, |
| * or http: to load the resource from different systems. |
| * |
| * The option is a: <code>java.lang.String</code> type. |
| * |
| * Group: security |
| */ |
| default NettyHttpEndpointProducerBuilder trustStoreResource( |
| String trustStoreResource) { |
| setProperty("trustStoreResource", trustStoreResource); |
| return this; |
| } |
| /** |
| * Whether the producer should be started lazy (on the first message). |
| * By starting lazy you can use this to allow CamelContext and routes to |
| * startup in situations where a producer may otherwise fail during |
| * starting and cause the route to fail being started. By deferring this |
| * startup to be lazy then the startup failure can be handled during |
| * routing messages via Camel's routing error handlers. Beware that when |
| * the first message is processed then creating and starting the |
| * producer may take a little time and prolong the total processing time |
| * of the processing. |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: producer |
| */ |
| default NettyHttpEndpointProducerBuilder lazyStartProducer( |
| boolean lazyStartProducer) { |
| setProperty("lazyStartProducer", lazyStartProducer); |
| return this; |
| } |
| /** |
| * Whether the producer should be started lazy (on the first message). |
| * By starting lazy you can use this to allow CamelContext and routes to |
| * startup in situations where a producer may otherwise fail during |
| * starting and cause the route to fail being started. By deferring this |
| * startup to be lazy then the startup failure can be handled during |
| * routing messages via Camel's routing error handlers. Beware that when |
| * the first message is processed then creating and starting the |
| * producer may take a little time and prolong the total processing time |
| * of the processing. |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: producer |
| */ |
| default NettyHttpEndpointProducerBuilder lazyStartProducer( |
| String lazyStartProducer) { |
| setProperty("lazyStartProducer", lazyStartProducer); |
| return this; |
| } |
| } |
| |
| /** |
| * Advanced builder for endpoint producers for the Netty4 HTTP component. |
| */ |
| public interface AdvancedNettyHttpEndpointProducerBuilder |
| extends |
| EndpointProducerBuilder { |
| default NettyHttpEndpointProducerBuilder basic() { |
| return (NettyHttpEndpointProducerBuilder) this; |
| } |
| /** |
| * To use a custom ClientInitializerFactory. |
| * |
| * The option is a: |
| * <code>org.apache.camel.component.netty4.ClientInitializerFactory</code> type. |
| * |
| * Group: producer (advanced) |
| */ |
| default AdvancedNettyHttpEndpointProducerBuilder clientInitializerFactory( |
| Object clientInitializerFactory) { |
| setProperty("clientInitializerFactory", clientInitializerFactory); |
| return this; |
| } |
| /** |
| * To use a custom ClientInitializerFactory. |
| * |
| * The option will be converted to a |
| * <code>org.apache.camel.component.netty4.ClientInitializerFactory</code> type. |
| * |
| * Group: producer (advanced) |
| */ |
| default AdvancedNettyHttpEndpointProducerBuilder clientInitializerFactory( |
| String clientInitializerFactory) { |
| setProperty("clientInitializerFactory", clientInitializerFactory); |
| return this; |
| } |
| /** |
| * Channels can be lazily created to avoid exceptions, if the remote |
| * server is not up and running when the Camel producer is started. |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: producer (advanced) |
| */ |
| default AdvancedNettyHttpEndpointProducerBuilder lazyChannelCreation( |
| boolean lazyChannelCreation) { |
| setProperty("lazyChannelCreation", lazyChannelCreation); |
| return this; |
| } |
| /** |
| * Channels can be lazily created to avoid exceptions, if the remote |
| * server is not up and running when the Camel producer is started. |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: producer (advanced) |
| */ |
| default AdvancedNettyHttpEndpointProducerBuilder lazyChannelCreation( |
| String lazyChannelCreation) { |
| setProperty("lazyChannelCreation", lazyChannelCreation); |
| return this; |
| } |
| /** |
| * The status codes which are considered a success response. The values |
| * are inclusive. Multiple ranges can be defined, separated by comma, |
| * e.g. 200-204,209,301-304. Each range must be a single number or |
| * from-to with the dash included. The default range is 200-299. |
| * |
| * The option is a: <code>java.lang.String</code> type. |
| * |
| * Group: producer (advanced) |
| */ |
| default AdvancedNettyHttpEndpointProducerBuilder okStatusCodeRange( |
| String okStatusCodeRange) { |
| setProperty("okStatusCodeRange", okStatusCodeRange); |
| return this; |
| } |
| /** |
| * Whether producer pool is enabled or not. Important: If you turn this |
| * off then a single shared connection is used for the producer, also if |
| * you are doing request/reply. That means there is a potential issue |
| * with interleaved responses if replies comes back out-of-order. |
| * Therefore you need to have a correlation id in both the request and |
| * reply messages so you can properly correlate the replies to the Camel |
| * callback that is responsible for continue processing the message in |
| * Camel. To do this you need to implement |
| * NettyCamelStateCorrelationManager as correlation manager and |
| * configure it via the correlationManager option. See also the |
| * correlationManager option for more details. |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: producer (advanced) |
| */ |
| default AdvancedNettyHttpEndpointProducerBuilder producerPoolEnabled( |
| boolean producerPoolEnabled) { |
| setProperty("producerPoolEnabled", producerPoolEnabled); |
| return this; |
| } |
| /** |
| * Whether producer pool is enabled or not. Important: If you turn this |
| * off then a single shared connection is used for the producer, also if |
| * you are doing request/reply. That means there is a potential issue |
| * with interleaved responses if replies comes back out-of-order. |
| * Therefore you need to have a correlation id in both the request and |
| * reply messages so you can properly correlate the replies to the Camel |
| * callback that is responsible for continue processing the message in |
| * Camel. To do this you need to implement |
| * NettyCamelStateCorrelationManager as correlation manager and |
| * configure it via the correlationManager option. See also the |
| * correlationManager option for more details. |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: producer (advanced) |
| */ |
| default AdvancedNettyHttpEndpointProducerBuilder producerPoolEnabled( |
| String producerPoolEnabled) { |
| setProperty("producerPoolEnabled", producerPoolEnabled); |
| return this; |
| } |
| /** |
| * Sets the cap on the number of objects that can be allocated by the |
| * pool (checked out to clients, or idle awaiting checkout) at a given |
| * time. Use a negative value for no limit. |
| * |
| * The option is a: <code>int</code> type. |
| * |
| * Group: producer (advanced) |
| */ |
| default AdvancedNettyHttpEndpointProducerBuilder producerPoolMaxActive( |
| int producerPoolMaxActive) { |
| setProperty("producerPoolMaxActive", producerPoolMaxActive); |
| return this; |
| } |
| /** |
| * Sets the cap on the number of objects that can be allocated by the |
| * pool (checked out to clients, or idle awaiting checkout) at a given |
| * time. Use a negative value for no limit. |
| * |
| * The option will be converted to a <code>int</code> type. |
| * |
| * Group: producer (advanced) |
| */ |
| default AdvancedNettyHttpEndpointProducerBuilder producerPoolMaxActive( |
| String producerPoolMaxActive) { |
| setProperty("producerPoolMaxActive", producerPoolMaxActive); |
| return this; |
| } |
| /** |
| * Sets the cap on the number of idle instances in the pool. |
| * |
| * The option is a: <code>int</code> type. |
| * |
| * Group: producer (advanced) |
| */ |
| default AdvancedNettyHttpEndpointProducerBuilder producerPoolMaxIdle( |
| int producerPoolMaxIdle) { |
| setProperty("producerPoolMaxIdle", producerPoolMaxIdle); |
| return this; |
| } |
| /** |
| * Sets the cap on the number of idle instances in the pool. |
| * |
| * The option will be converted to a <code>int</code> type. |
| * |
| * Group: producer (advanced) |
| */ |
| default AdvancedNettyHttpEndpointProducerBuilder producerPoolMaxIdle( |
| String producerPoolMaxIdle) { |
| setProperty("producerPoolMaxIdle", producerPoolMaxIdle); |
| return this; |
| } |
| /** |
| * Sets the minimum amount of time (value in millis) an object may sit |
| * idle in the pool before it is eligible for eviction by the idle |
| * object evictor. |
| * |
| * The option is a: <code>long</code> type. |
| * |
| * Group: producer (advanced) |
| */ |
| default AdvancedNettyHttpEndpointProducerBuilder producerPoolMinEvictableIdle( |
| long producerPoolMinEvictableIdle) { |
| setProperty("producerPoolMinEvictableIdle", producerPoolMinEvictableIdle); |
| return this; |
| } |
| /** |
| * Sets the minimum amount of time (value in millis) an object may sit |
| * idle in the pool before it is eligible for eviction by the idle |
| * object evictor. |
| * |
| * The option will be converted to a <code>long</code> type. |
| * |
| * Group: producer (advanced) |
| */ |
| default AdvancedNettyHttpEndpointProducerBuilder producerPoolMinEvictableIdle( |
| String producerPoolMinEvictableIdle) { |
| setProperty("producerPoolMinEvictableIdle", producerPoolMinEvictableIdle); |
| return this; |
| } |
| /** |
| * Sets the minimum number of instances allowed in the producer pool |
| * before the evictor thread (if active) spawns new objects. |
| * |
| * The option is a: <code>int</code> type. |
| * |
| * Group: producer (advanced) |
| */ |
| default AdvancedNettyHttpEndpointProducerBuilder producerPoolMinIdle( |
| int producerPoolMinIdle) { |
| setProperty("producerPoolMinIdle", producerPoolMinIdle); |
| return this; |
| } |
| /** |
| * Sets the minimum number of instances allowed in the producer pool |
| * before the evictor thread (if active) spawns new objects. |
| * |
| * The option will be converted to a <code>int</code> type. |
| * |
| * Group: producer (advanced) |
| */ |
| default AdvancedNettyHttpEndpointProducerBuilder producerPoolMinIdle( |
| String producerPoolMinIdle) { |
| setProperty("producerPoolMinIdle", producerPoolMinIdle); |
| return this; |
| } |
| /** |
| * Sets whether to use a relative path in HTTP requests. |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: producer (advanced) |
| */ |
| default AdvancedNettyHttpEndpointProducerBuilder useRelativePath( |
| boolean useRelativePath) { |
| setProperty("useRelativePath", useRelativePath); |
| return this; |
| } |
| /** |
| * Sets whether to use a relative path in HTTP requests. |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: producer (advanced) |
| */ |
| default AdvancedNettyHttpEndpointProducerBuilder useRelativePath( |
| String useRelativePath) { |
| setProperty("useRelativePath", useRelativePath); |
| return this; |
| } |
| /** |
| * Only used for TCP when transferExchange is true. When set to true, |
| * serializable objects in headers and properties will be added to the |
| * exchange. Otherwise Camel will exclude any non-serializable objects |
| * and log it at WARN level. |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointProducerBuilder allowSerializedHeaders( |
| boolean allowSerializedHeaders) { |
| setProperty("allowSerializedHeaders", allowSerializedHeaders); |
| return this; |
| } |
| /** |
| * Only used for TCP when transferExchange is true. When set to true, |
| * serializable objects in headers and properties will be added to the |
| * exchange. Otherwise Camel will exclude any non-serializable objects |
| * and log it at WARN level. |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointProducerBuilder allowSerializedHeaders( |
| String allowSerializedHeaders) { |
| setProperty("allowSerializedHeaders", allowSerializedHeaders); |
| return this; |
| } |
| /** |
| * To use a explicit ChannelGroup. |
| * |
| * The option is a: <code>io.netty.channel.group.ChannelGroup</code> |
| * type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointProducerBuilder channelGroup( |
| Object channelGroup) { |
| setProperty("channelGroup", channelGroup); |
| return this; |
| } |
| /** |
| * To use a explicit ChannelGroup. |
| * |
| * The option will be converted to a |
| * <code>io.netty.channel.group.ChannelGroup</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointProducerBuilder channelGroup( |
| String channelGroup) { |
| setProperty("channelGroup", channelGroup); |
| return this; |
| } |
| /** |
| * To use a custom configured NettyHttpConfiguration for configuring |
| * this endpoint. |
| * |
| * The option is a: |
| * <code>org.apache.camel.component.netty4.http.NettyHttpConfiguration</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointProducerBuilder configuration( |
| Object configuration) { |
| setProperty("configuration", configuration); |
| return this; |
| } |
| /** |
| * To use a custom configured NettyHttpConfiguration for configuring |
| * this endpoint. |
| * |
| * The option will be converted to a |
| * <code>org.apache.camel.component.netty4.http.NettyHttpConfiguration</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointProducerBuilder configuration( |
| String configuration) { |
| setProperty("configuration", configuration); |
| return this; |
| } |
| /** |
| * Determines whether or not the raw input stream from Netty |
| * HttpRequest#getContent() or HttpResponset#getContent() is cached or |
| * not (Camel will read the stream into a in light-weight memory based |
| * Stream caching) cache. By default Camel will cache the Netty 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. Mind that |
| * if you enable this option, then you cannot read the Netty stream |
| * multiple times out of the box, and you would need manually to reset |
| * the reader index on the Netty raw stream. Also Netty will auto-close |
| * the Netty stream when the Netty HTTP server/HTTP client is done |
| * processing, which means that if the asynchronous routing engine is in |
| * use then any asynchronous thread that may continue routing the |
| * org.apache.camel.Exchange may not be able to read the Netty stream, |
| * because Netty has closed it. |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointProducerBuilder disableStreamCache( |
| boolean disableStreamCache) { |
| setProperty("disableStreamCache", disableStreamCache); |
| return this; |
| } |
| /** |
| * Determines whether or not the raw input stream from Netty |
| * HttpRequest#getContent() or HttpResponset#getContent() is cached or |
| * not (Camel will read the stream into a in light-weight memory based |
| * Stream caching) cache. By default Camel will cache the Netty 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. Mind that |
| * if you enable this option, then you cannot read the Netty stream |
| * multiple times out of the box, and you would need manually to reset |
| * the reader index on the Netty raw stream. Also Netty will auto-close |
| * the Netty stream when the Netty HTTP server/HTTP client is done |
| * processing, which means that if the asynchronous routing engine is in |
| * use then any asynchronous thread that may continue routing the |
| * org.apache.camel.Exchange may not be able to read the Netty stream, |
| * because Netty has closed it. |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointProducerBuilder disableStreamCache( |
| String disableStreamCache) { |
| setProperty("disableStreamCache", disableStreamCache); |
| return this; |
| } |
| /** |
| * To use a custom org.apache.camel.spi.HeaderFilterStrategy to filter |
| * headers. |
| * |
| * The option is a: |
| * <code>org.apache.camel.spi.HeaderFilterStrategy</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointProducerBuilder headerFilterStrategy( |
| HeaderFilterStrategy headerFilterStrategy) { |
| setProperty("headerFilterStrategy", headerFilterStrategy); |
| return this; |
| } |
| /** |
| * To use a custom org.apache.camel.spi.HeaderFilterStrategy to filter |
| * headers. |
| * |
| * The option will be converted to a |
| * <code>org.apache.camel.spi.HeaderFilterStrategy</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointProducerBuilder headerFilterStrategy( |
| String headerFilterStrategy) { |
| setProperty("headerFilterStrategy", headerFilterStrategy); |
| return this; |
| } |
| /** |
| * Whether to use native transport instead of NIO. Native transport |
| * takes advantage of the host operating system and is only supported on |
| * some platforms. You need to add the netty JAR for the host operating |
| * system you are using. See more details at: |
| * http://netty.io/wiki/native-transports.html. |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointProducerBuilder nativeTransport( |
| boolean nativeTransport) { |
| setProperty("nativeTransport", nativeTransport); |
| return this; |
| } |
| /** |
| * Whether to use native transport instead of NIO. Native transport |
| * takes advantage of the host operating system and is only supported on |
| * some platforms. You need to add the netty JAR for the host operating |
| * system you are using. See more details at: |
| * http://netty.io/wiki/native-transports.html. |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointProducerBuilder nativeTransport( |
| String nativeTransport) { |
| setProperty("nativeTransport", nativeTransport); |
| return this; |
| } |
| /** |
| * To use a custom |
| * org.apache.camel.component.netty4.http.NettyHttpBinding for binding |
| * to/from Netty and Camel Message API. |
| * |
| * The option is a: |
| * <code>org.apache.camel.component.netty4.http.NettyHttpBinding</code> |
| * type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointProducerBuilder nettyHttpBinding( |
| Object nettyHttpBinding) { |
| setProperty("nettyHttpBinding", nettyHttpBinding); |
| return this; |
| } |
| /** |
| * To use a custom |
| * org.apache.camel.component.netty4.http.NettyHttpBinding for binding |
| * to/from Netty and Camel Message API. |
| * |
| * The option will be converted to a |
| * <code>org.apache.camel.component.netty4.http.NettyHttpBinding</code> |
| * type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointProducerBuilder nettyHttpBinding( |
| String nettyHttpBinding) { |
| setProperty("nettyHttpBinding", nettyHttpBinding); |
| return this; |
| } |
| /** |
| * Allows to configure additional netty options using option. as prefix. |
| * For example option.child.keepAlive=false to set the netty option |
| * child.keepAlive=false. See the Netty documentation for possible |
| * options that can be used. |
| * |
| * The option is a: <code>java.util.Map<java.lang.String, |
| * java.lang.Object></code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointProducerBuilder options( |
| Map<String, Object> options) { |
| setProperty("options", options); |
| return this; |
| } |
| /** |
| * Allows to configure additional netty options using option. as prefix. |
| * For example option.child.keepAlive=false to set the netty option |
| * child.keepAlive=false. See the Netty documentation for possible |
| * options that can be used. |
| * |
| * The option will be converted to a |
| * <code>java.util.Map<java.lang.String, java.lang.Object></code> |
| * type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointProducerBuilder options(String options) { |
| setProperty("options", options); |
| return this; |
| } |
| /** |
| * The TCP/UDP buffer sizes to be used during inbound communication. |
| * Size is bytes. |
| * |
| * The option is a: <code>int</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointProducerBuilder receiveBufferSize( |
| int receiveBufferSize) { |
| setProperty("receiveBufferSize", receiveBufferSize); |
| return this; |
| } |
| /** |
| * The TCP/UDP buffer sizes to be used during inbound communication. |
| * Size is bytes. |
| * |
| * The option will be converted to a <code>int</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointProducerBuilder receiveBufferSize( |
| String receiveBufferSize) { |
| setProperty("receiveBufferSize", receiveBufferSize); |
| return this; |
| } |
| /** |
| * Configures the buffer size predictor. See details at Jetty |
| * documentation and this mail thread. |
| * |
| * The option is a: <code>int</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointProducerBuilder receiveBufferSizePredictor( |
| int receiveBufferSizePredictor) { |
| setProperty("receiveBufferSizePredictor", receiveBufferSizePredictor); |
| return this; |
| } |
| /** |
| * Configures the buffer size predictor. See details at Jetty |
| * documentation and this mail thread. |
| * |
| * The option will be converted to a <code>int</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointProducerBuilder receiveBufferSizePredictor( |
| String receiveBufferSizePredictor) { |
| setProperty("receiveBufferSizePredictor", receiveBufferSizePredictor); |
| return this; |
| } |
| /** |
| * The TCP/UDP buffer sizes to be used during outbound communication. |
| * Size is bytes. |
| * |
| * The option is a: <code>int</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointProducerBuilder sendBufferSize( |
| int sendBufferSize) { |
| setProperty("sendBufferSize", sendBufferSize); |
| return this; |
| } |
| /** |
| * The TCP/UDP buffer sizes to be used during outbound communication. |
| * Size is bytes. |
| * |
| * The option will be converted to a <code>int</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointProducerBuilder sendBufferSize( |
| String sendBufferSize) { |
| setProperty("sendBufferSize", sendBufferSize); |
| return this; |
| } |
| /** |
| * 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. |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointProducerBuilder transferException( |
| boolean transferException) { |
| setProperty("transferException", transferException); |
| return this; |
| } |
| /** |
| * 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. |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointProducerBuilder transferException( |
| String transferException) { |
| setProperty("transferException", transferException); |
| return this; |
| } |
| /** |
| * Only used for TCP. You can transfer the exchange over the wire |
| * instead of just the body. The following fields are transferred: In |
| * body, Out body, fault body, In headers, Out headers, fault headers, |
| * exchange properties, exchange exception. This requires that the |
| * objects are serializable. Camel will exclude any non-serializable |
| * objects and log it at WARN level. |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointProducerBuilder transferExchange( |
| boolean transferExchange) { |
| setProperty("transferExchange", transferExchange); |
| return this; |
| } |
| /** |
| * Only used for TCP. You can transfer the exchange over the wire |
| * instead of just the body. The following fields are transferred: In |
| * body, Out body, fault body, In headers, Out headers, fault headers, |
| * exchange properties, exchange exception. This requires that the |
| * objects are serializable. Camel will exclude any non-serializable |
| * objects and log it at WARN level. |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointProducerBuilder transferExchange( |
| String transferExchange) { |
| setProperty("transferExchange", transferExchange); |
| return this; |
| } |
| /** |
| * When netty works on nio mode, it uses default workerCount parameter |
| * from Netty, which is cpu_core_threads x 2. User can use this |
| * operation to override the default workerCount from Netty. |
| * |
| * The option is a: <code>int</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointProducerBuilder workerCount( |
| int workerCount) { |
| setProperty("workerCount", workerCount); |
| return this; |
| } |
| /** |
| * When netty works on nio mode, it uses default workerCount parameter |
| * from Netty, which is cpu_core_threads x 2. User can use this |
| * operation to override the default workerCount from Netty. |
| * |
| * The option will be converted to a <code>int</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointProducerBuilder workerCount( |
| String workerCount) { |
| setProperty("workerCount", workerCount); |
| return this; |
| } |
| /** |
| * To use a explicit EventLoopGroup as the boss thread pool. For example |
| * to share a thread pool with multiple consumers or producers. By |
| * default each consumer or producer has their own worker pool with 2 x |
| * cpu count core threads. |
| * |
| * The option is a: <code>io.netty.channel.EventLoopGroup</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointProducerBuilder workerGroup( |
| Object workerGroup) { |
| setProperty("workerGroup", workerGroup); |
| return this; |
| } |
| /** |
| * To use a explicit EventLoopGroup as the boss thread pool. For example |
| * to share a thread pool with multiple consumers or producers. By |
| * default each consumer or producer has their own worker pool with 2 x |
| * cpu count core threads. |
| * |
| * The option will be converted to a |
| * <code>io.netty.channel.EventLoopGroup</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointProducerBuilder workerGroup( |
| String workerGroup) { |
| setProperty("workerGroup", workerGroup); |
| return this; |
| } |
| /** |
| * Whether the endpoint should use basic property binding (Camel 2.x) or |
| * the newer property binding with additional capabilities. |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointProducerBuilder basicPropertyBinding( |
| boolean basicPropertyBinding) { |
| setProperty("basicPropertyBinding", basicPropertyBinding); |
| return this; |
| } |
| /** |
| * Whether the endpoint should use basic property binding (Camel 2.x) or |
| * the newer property binding with additional capabilities. |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointProducerBuilder basicPropertyBinding( |
| String basicPropertyBinding) { |
| setProperty("basicPropertyBinding", basicPropertyBinding); |
| return this; |
| } |
| /** |
| * To use a custom configured NettyServerBootstrapConfiguration for |
| * configuring this endpoint. |
| * |
| * The option is a: <code>java.lang.Object</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointProducerBuilder bootstrapConfiguration( |
| Object bootstrapConfiguration) { |
| setProperty("bootstrapConfiguration", bootstrapConfiguration); |
| return this; |
| } |
| /** |
| * To use a custom configured NettyServerBootstrapConfiguration for |
| * configuring this endpoint. |
| * |
| * The option will be converted to a <code>java.lang.Object</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointProducerBuilder bootstrapConfiguration( |
| String bootstrapConfiguration) { |
| setProperty("bootstrapConfiguration", bootstrapConfiguration); |
| return this; |
| } |
| /** |
| * Sets whether synchronous processing should be strictly used, or Camel |
| * is allowed to use asynchronous processing (if supported). |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointProducerBuilder synchronous( |
| boolean synchronous) { |
| setProperty("synchronous", synchronous); |
| return this; |
| } |
| /** |
| * Sets whether synchronous processing should be strictly used, or Camel |
| * is allowed to use asynchronous processing (if supported). |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointProducerBuilder synchronous( |
| String synchronous) { |
| setProperty("synchronous", synchronous); |
| return this; |
| } |
| } |
| |
| /** |
| * Builder for endpoint for the Netty4 HTTP component. |
| */ |
| public interface NettyHttpEndpointBuilder |
| extends |
| NettyHttpEndpointConsumerBuilder, NettyHttpEndpointProducerBuilder { |
| default AdvancedNettyHttpEndpointBuilder advanced() { |
| return (AdvancedNettyHttpEndpointBuilder) this; |
| } |
| /** |
| * If the option is true, the producer will ignore the Exchange.HTTP_URI |
| * header, and use the endpoint's URI for request. You may also set the |
| * throwExceptionOnFailure to be false to let the producer send all the |
| * fault response back. The consumer working in the bridge mode will |
| * skip the gzip compression and WWW URL form encoding (by adding the |
| * Exchange.SKIP_GZIP_ENCODING and Exchange.SKIP_WWW_FORM_URLENCODED |
| * headers to the consumed exchange). |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: common |
| */ |
| default NettyHttpEndpointBuilder bridgeEndpoint(boolean bridgeEndpoint) { |
| setProperty("bridgeEndpoint", bridgeEndpoint); |
| return this; |
| } |
| /** |
| * If the option is true, the producer will ignore the Exchange.HTTP_URI |
| * header, and use the endpoint's URI for request. You may also set the |
| * throwExceptionOnFailure to be false to let the producer send all the |
| * fault response back. The consumer working in the bridge mode will |
| * skip the gzip compression and WWW URL form encoding (by adding the |
| * Exchange.SKIP_GZIP_ENCODING and Exchange.SKIP_WWW_FORM_URLENCODED |
| * headers to the consumed exchange). |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: common |
| */ |
| default NettyHttpEndpointBuilder bridgeEndpoint(String bridgeEndpoint) { |
| setProperty("bridgeEndpoint", bridgeEndpoint); |
| return this; |
| } |
| /** |
| * Whether or not to disconnect(close) from Netty Channel right after |
| * use. Can be used for both consumer and producer. |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: common |
| */ |
| default NettyHttpEndpointBuilder disconnect(boolean disconnect) { |
| setProperty("disconnect", disconnect); |
| return this; |
| } |
| /** |
| * Whether or not to disconnect(close) from Netty Channel right after |
| * use. Can be used for both consumer and producer. |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: common |
| */ |
| default NettyHttpEndpointBuilder disconnect(String disconnect) { |
| setProperty("disconnect", disconnect); |
| return this; |
| } |
| /** |
| * Setting to ensure socket is not closed due to inactivity. |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: common |
| */ |
| default NettyHttpEndpointBuilder keepAlive(boolean keepAlive) { |
| setProperty("keepAlive", keepAlive); |
| return this; |
| } |
| /** |
| * Setting to ensure socket is not closed due to inactivity. |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: common |
| */ |
| default NettyHttpEndpointBuilder keepAlive(String keepAlive) { |
| setProperty("keepAlive", keepAlive); |
| return this; |
| } |
| /** |
| * Setting to facilitate socket multiplexing. |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: common |
| */ |
| default NettyHttpEndpointBuilder reuseAddress(boolean reuseAddress) { |
| setProperty("reuseAddress", reuseAddress); |
| return this; |
| } |
| /** |
| * Setting to facilitate socket multiplexing. |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: common |
| */ |
| default NettyHttpEndpointBuilder reuseAddress(String reuseAddress) { |
| setProperty("reuseAddress", reuseAddress); |
| return this; |
| } |
| /** |
| * This option allows producers and consumers (in client mode) to reuse |
| * the same Netty Channel for the lifecycle of processing the Exchange. |
| * This is useful if you need to call a server multiple times in a Camel |
| * route and want to use the same network connection. When using this, |
| * the channel is not returned to the connection pool until the Exchange |
| * is done; or disconnected if the disconnect option is set to true. The |
| * reused Channel is stored on the Exchange as an exchange property with |
| * the key NettyConstants#NETTY_CHANNEL which allows you to obtain the |
| * channel during routing and use it as well. |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: common |
| */ |
| default NettyHttpEndpointBuilder reuseChannel(boolean reuseChannel) { |
| setProperty("reuseChannel", reuseChannel); |
| return this; |
| } |
| /** |
| * This option allows producers and consumers (in client mode) to reuse |
| * the same Netty Channel for the lifecycle of processing the Exchange. |
| * This is useful if you need to call a server multiple times in a Camel |
| * route and want to use the same network connection. When using this, |
| * the channel is not returned to the connection pool until the Exchange |
| * is done; or disconnected if the disconnect option is set to true. The |
| * reused Channel is stored on the Exchange as an exchange property with |
| * the key NettyConstants#NETTY_CHANNEL which allows you to obtain the |
| * channel during routing and use it as well. |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: common |
| */ |
| default NettyHttpEndpointBuilder reuseChannel(String reuseChannel) { |
| setProperty("reuseChannel", reuseChannel); |
| return this; |
| } |
| /** |
| * Setting to set endpoint as one-way or request-response. |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: common |
| */ |
| default NettyHttpEndpointBuilder sync(boolean sync) { |
| setProperty("sync", sync); |
| return this; |
| } |
| /** |
| * Setting to set endpoint as one-way or request-response. |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: common |
| */ |
| default NettyHttpEndpointBuilder sync(String sync) { |
| setProperty("sync", sync); |
| return this; |
| } |
| /** |
| * Setting to improve TCP protocol performance. |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: common |
| */ |
| default NettyHttpEndpointBuilder tcpNoDelay(boolean tcpNoDelay) { |
| setProperty("tcpNoDelay", tcpNoDelay); |
| return this; |
| } |
| /** |
| * Setting to improve TCP protocol performance. |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: common |
| */ |
| default NettyHttpEndpointBuilder tcpNoDelay(String tcpNoDelay) { |
| setProperty("tcpNoDelay", tcpNoDelay); |
| return this; |
| } |
| /** |
| * To use a single decoder. This options is deprecated use encoders |
| * instead. |
| * |
| * The option is a: <code>io.netty.channel.ChannelHandler</code> type. |
| * |
| * Group: codec |
| */ |
| @Deprecated |
| default NettyHttpEndpointBuilder decoder(Object decoder) { |
| setProperty("decoder", decoder); |
| return this; |
| } |
| /** |
| * To use a single decoder. This options is deprecated use encoders |
| * instead. |
| * |
| * The option will be converted to a |
| * <code>io.netty.channel.ChannelHandler</code> type. |
| * |
| * Group: codec |
| */ |
| @Deprecated |
| default NettyHttpEndpointBuilder decoder(String decoder) { |
| setProperty("decoder", decoder); |
| return this; |
| } |
| /** |
| * A list of decoders to be used. You can use a String which have values |
| * separated by comma, and have the values be looked up in the Registry. |
| * Just remember to prefix the value with # so Camel knows it should |
| * lookup. |
| * |
| * The option is a: |
| * <code>java.util.List<io.netty.channel.ChannelHandler></code> |
| * type. |
| * |
| * Group: codec |
| */ |
| default NettyHttpEndpointBuilder decoders(List<Object> decoders) { |
| setProperty("decoders", decoders); |
| return this; |
| } |
| /** |
| * A list of decoders to be used. You can use a String which have values |
| * separated by comma, and have the values be looked up in the Registry. |
| * Just remember to prefix the value with # so Camel knows it should |
| * lookup. |
| * |
| * The option will be converted to a |
| * <code>java.util.List<io.netty.channel.ChannelHandler></code> |
| * type. |
| * |
| * Group: codec |
| */ |
| default NettyHttpEndpointBuilder decoders(String decoders) { |
| setProperty("decoders", decoders); |
| return this; |
| } |
| /** |
| * To use a single encoder. This options is deprecated use encoders |
| * instead. |
| * |
| * The option is a: <code>io.netty.channel.ChannelHandler</code> type. |
| * |
| * Group: codec |
| */ |
| @Deprecated |
| default NettyHttpEndpointBuilder encoder(Object encoder) { |
| setProperty("encoder", encoder); |
| return this; |
| } |
| /** |
| * To use a single encoder. This options is deprecated use encoders |
| * instead. |
| * |
| * The option will be converted to a |
| * <code>io.netty.channel.ChannelHandler</code> type. |
| * |
| * Group: codec |
| */ |
| @Deprecated |
| default NettyHttpEndpointBuilder encoder(String encoder) { |
| setProperty("encoder", encoder); |
| return this; |
| } |
| /** |
| * A list of encoders to be used. You can use a String which have values |
| * separated by comma, and have the values be looked up in the Registry. |
| * Just remember to prefix the value with # so Camel knows it should |
| * lookup. |
| * |
| * The option is a: |
| * <code>java.util.List<io.netty.channel.ChannelHandler></code> |
| * type. |
| * |
| * Group: codec |
| */ |
| default NettyHttpEndpointBuilder encoders(List<Object> encoders) { |
| setProperty("encoders", encoders); |
| return this; |
| } |
| /** |
| * A list of encoders to be used. You can use a String which have values |
| * separated by comma, and have the values be looked up in the Registry. |
| * Just remember to prefix the value with # so Camel knows it should |
| * lookup. |
| * |
| * The option will be converted to a |
| * <code>java.util.List<io.netty.channel.ChannelHandler></code> |
| * type. |
| * |
| * Group: codec |
| */ |
| default NettyHttpEndpointBuilder encoders(String encoders) { |
| setProperty("encoders", encoders); |
| return this; |
| } |
| /** |
| * Which protocols to enable when using SSL. |
| * |
| * The option is a: <code>java.lang.String</code> type. |
| * |
| * Group: security |
| */ |
| default NettyHttpEndpointBuilder enabledProtocols( |
| String enabledProtocols) { |
| setProperty("enabledProtocols", enabledProtocols); |
| return this; |
| } |
| /** |
| * Client side certificate keystore to be used for encryption. |
| * |
| * The option is a: <code>java.io.File</code> type. |
| * |
| * Group: security |
| */ |
| default NettyHttpEndpointBuilder keyStoreFile(File keyStoreFile) { |
| setProperty("keyStoreFile", keyStoreFile); |
| return this; |
| } |
| /** |
| * Client side certificate keystore to be used for encryption. |
| * |
| * The option will be converted to a <code>java.io.File</code> type. |
| * |
| * Group: security |
| */ |
| default NettyHttpEndpointBuilder keyStoreFile(String keyStoreFile) { |
| setProperty("keyStoreFile", keyStoreFile); |
| return this; |
| } |
| /** |
| * Keystore format to be used for payload encryption. Defaults to JKS if |
| * not set. |
| * |
| * The option is a: <code>java.lang.String</code> type. |
| * |
| * Group: security |
| */ |
| default NettyHttpEndpointBuilder keyStoreFormat(String keyStoreFormat) { |
| setProperty("keyStoreFormat", keyStoreFormat); |
| return this; |
| } |
| /** |
| * Client side certificate keystore to be used for encryption. Is loaded |
| * by default from classpath, but you can prefix with classpath:, file:, |
| * or http: to load the resource from different systems. |
| * |
| * The option is a: <code>java.lang.String</code> type. |
| * |
| * Group: security |
| */ |
| default NettyHttpEndpointBuilder keyStoreResource( |
| String keyStoreResource) { |
| setProperty("keyStoreResource", keyStoreResource); |
| return this; |
| } |
| /** |
| * Password setting to use in order to encrypt/decrypt payloads sent |
| * using SSH. |
| * |
| * The option is a: <code>java.lang.String</code> type. |
| * |
| * Group: security |
| */ |
| default NettyHttpEndpointBuilder passphrase(String passphrase) { |
| setProperty("passphrase", passphrase); |
| return this; |
| } |
| /** |
| * Security provider to be used for payload encryption. Defaults to |
| * SunX509 if not set. |
| * |
| * The option is a: <code>java.lang.String</code> type. |
| * |
| * Group: security |
| */ |
| default NettyHttpEndpointBuilder securityProvider( |
| String securityProvider) { |
| setProperty("securityProvider", securityProvider); |
| return this; |
| } |
| /** |
| * Setting to specify whether SSL encryption is applied to this |
| * endpoint. |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: security |
| */ |
| default NettyHttpEndpointBuilder ssl(boolean ssl) { |
| setProperty("ssl", ssl); |
| return this; |
| } |
| /** |
| * Setting to specify whether SSL encryption is applied to this |
| * endpoint. |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: security |
| */ |
| default NettyHttpEndpointBuilder ssl(String ssl) { |
| setProperty("ssl", ssl); |
| return this; |
| } |
| /** |
| * When enabled and in SSL mode, then the Netty consumer will enrich the |
| * Camel Message with headers having information about the client |
| * certificate such as subject name, issuer name, serial number, and the |
| * valid date range. |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: security |
| */ |
| default NettyHttpEndpointBuilder sslClientCertHeaders( |
| boolean sslClientCertHeaders) { |
| setProperty("sslClientCertHeaders", sslClientCertHeaders); |
| return this; |
| } |
| /** |
| * When enabled and in SSL mode, then the Netty consumer will enrich the |
| * Camel Message with headers having information about the client |
| * certificate such as subject name, issuer name, serial number, and the |
| * valid date range. |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: security |
| */ |
| default NettyHttpEndpointBuilder sslClientCertHeaders( |
| String sslClientCertHeaders) { |
| setProperty("sslClientCertHeaders", sslClientCertHeaders); |
| return this; |
| } |
| /** |
| * To configure security using SSLContextParameters. |
| * |
| * The option is a: |
| * <code>org.apache.camel.support.jsse.SSLContextParameters</code> type. |
| * |
| * Group: security |
| */ |
| default NettyHttpEndpointBuilder sslContextParameters( |
| Object sslContextParameters) { |
| setProperty("sslContextParameters", sslContextParameters); |
| return this; |
| } |
| /** |
| * To configure security using SSLContextParameters. |
| * |
| * The option will be converted to a |
| * <code>org.apache.camel.support.jsse.SSLContextParameters</code> type. |
| * |
| * Group: security |
| */ |
| default NettyHttpEndpointBuilder sslContextParameters( |
| String sslContextParameters) { |
| setProperty("sslContextParameters", sslContextParameters); |
| return this; |
| } |
| /** |
| * Reference to a class that could be used to return an SSL Handler. |
| * |
| * The option is a: <code>io.netty.handler.ssl.SslHandler</code> type. |
| * |
| * Group: security |
| */ |
| default NettyHttpEndpointBuilder sslHandler(Object sslHandler) { |
| setProperty("sslHandler", sslHandler); |
| return this; |
| } |
| /** |
| * Reference to a class that could be used to return an SSL Handler. |
| * |
| * The option will be converted to a |
| * <code>io.netty.handler.ssl.SslHandler</code> type. |
| * |
| * Group: security |
| */ |
| default NettyHttpEndpointBuilder sslHandler(String sslHandler) { |
| setProperty("sslHandler", sslHandler); |
| return this; |
| } |
| /** |
| * Server side certificate keystore to be used for encryption. |
| * |
| * The option is a: <code>java.io.File</code> type. |
| * |
| * Group: security |
| */ |
| default NettyHttpEndpointBuilder trustStoreFile(File trustStoreFile) { |
| setProperty("trustStoreFile", trustStoreFile); |
| return this; |
| } |
| /** |
| * Server side certificate keystore to be used for encryption. |
| * |
| * The option will be converted to a <code>java.io.File</code> type. |
| * |
| * Group: security |
| */ |
| default NettyHttpEndpointBuilder trustStoreFile(String trustStoreFile) { |
| setProperty("trustStoreFile", trustStoreFile); |
| return this; |
| } |
| /** |
| * Server side certificate keystore to be used for encryption. Is loaded |
| * by default from classpath, but you can prefix with classpath:, file:, |
| * or http: to load the resource from different systems. |
| * |
| * The option is a: <code>java.lang.String</code> type. |
| * |
| * Group: security |
| */ |
| default NettyHttpEndpointBuilder trustStoreResource( |
| String trustStoreResource) { |
| setProperty("trustStoreResource", trustStoreResource); |
| return this; |
| } |
| } |
| |
| /** |
| * Advanced builder for endpoint for the Netty4 HTTP component. |
| */ |
| public interface AdvancedNettyHttpEndpointBuilder |
| extends |
| AdvancedNettyHttpEndpointConsumerBuilder, AdvancedNettyHttpEndpointProducerBuilder { |
| default NettyHttpEndpointBuilder basic() { |
| return (NettyHttpEndpointBuilder) this; |
| } |
| /** |
| * Only used for TCP when transferExchange is true. When set to true, |
| * serializable objects in headers and properties will be added to the |
| * exchange. Otherwise Camel will exclude any non-serializable objects |
| * and log it at WARN level. |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointBuilder allowSerializedHeaders( |
| boolean allowSerializedHeaders) { |
| setProperty("allowSerializedHeaders", allowSerializedHeaders); |
| return this; |
| } |
| /** |
| * Only used for TCP when transferExchange is true. When set to true, |
| * serializable objects in headers and properties will be added to the |
| * exchange. Otherwise Camel will exclude any non-serializable objects |
| * and log it at WARN level. |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointBuilder allowSerializedHeaders( |
| String allowSerializedHeaders) { |
| setProperty("allowSerializedHeaders", allowSerializedHeaders); |
| return this; |
| } |
| /** |
| * To use a explicit ChannelGroup. |
| * |
| * The option is a: <code>io.netty.channel.group.ChannelGroup</code> |
| * type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointBuilder channelGroup( |
| Object channelGroup) { |
| setProperty("channelGroup", channelGroup); |
| return this; |
| } |
| /** |
| * To use a explicit ChannelGroup. |
| * |
| * The option will be converted to a |
| * <code>io.netty.channel.group.ChannelGroup</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointBuilder channelGroup( |
| String channelGroup) { |
| setProperty("channelGroup", channelGroup); |
| return this; |
| } |
| /** |
| * To use a custom configured NettyHttpConfiguration for configuring |
| * this endpoint. |
| * |
| * The option is a: |
| * <code>org.apache.camel.component.netty4.http.NettyHttpConfiguration</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointBuilder configuration( |
| Object configuration) { |
| setProperty("configuration", configuration); |
| return this; |
| } |
| /** |
| * To use a custom configured NettyHttpConfiguration for configuring |
| * this endpoint. |
| * |
| * The option will be converted to a |
| * <code>org.apache.camel.component.netty4.http.NettyHttpConfiguration</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointBuilder configuration( |
| String configuration) { |
| setProperty("configuration", configuration); |
| return this; |
| } |
| /** |
| * Determines whether or not the raw input stream from Netty |
| * HttpRequest#getContent() or HttpResponset#getContent() is cached or |
| * not (Camel will read the stream into a in light-weight memory based |
| * Stream caching) cache. By default Camel will cache the Netty 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. Mind that |
| * if you enable this option, then you cannot read the Netty stream |
| * multiple times out of the box, and you would need manually to reset |
| * the reader index on the Netty raw stream. Also Netty will auto-close |
| * the Netty stream when the Netty HTTP server/HTTP client is done |
| * processing, which means that if the asynchronous routing engine is in |
| * use then any asynchronous thread that may continue routing the |
| * org.apache.camel.Exchange may not be able to read the Netty stream, |
| * because Netty has closed it. |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointBuilder disableStreamCache( |
| boolean disableStreamCache) { |
| setProperty("disableStreamCache", disableStreamCache); |
| return this; |
| } |
| /** |
| * Determines whether or not the raw input stream from Netty |
| * HttpRequest#getContent() or HttpResponset#getContent() is cached or |
| * not (Camel will read the stream into a in light-weight memory based |
| * Stream caching) cache. By default Camel will cache the Netty 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. Mind that |
| * if you enable this option, then you cannot read the Netty stream |
| * multiple times out of the box, and you would need manually to reset |
| * the reader index on the Netty raw stream. Also Netty will auto-close |
| * the Netty stream when the Netty HTTP server/HTTP client is done |
| * processing, which means that if the asynchronous routing engine is in |
| * use then any asynchronous thread that may continue routing the |
| * org.apache.camel.Exchange may not be able to read the Netty stream, |
| * because Netty has closed it. |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointBuilder disableStreamCache( |
| String disableStreamCache) { |
| setProperty("disableStreamCache", disableStreamCache); |
| return this; |
| } |
| /** |
| * To use a custom org.apache.camel.spi.HeaderFilterStrategy to filter |
| * headers. |
| * |
| * The option is a: |
| * <code>org.apache.camel.spi.HeaderFilterStrategy</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointBuilder headerFilterStrategy( |
| HeaderFilterStrategy headerFilterStrategy) { |
| setProperty("headerFilterStrategy", headerFilterStrategy); |
| return this; |
| } |
| /** |
| * To use a custom org.apache.camel.spi.HeaderFilterStrategy to filter |
| * headers. |
| * |
| * The option will be converted to a |
| * <code>org.apache.camel.spi.HeaderFilterStrategy</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointBuilder headerFilterStrategy( |
| String headerFilterStrategy) { |
| setProperty("headerFilterStrategy", headerFilterStrategy); |
| return this; |
| } |
| /** |
| * Whether to use native transport instead of NIO. Native transport |
| * takes advantage of the host operating system and is only supported on |
| * some platforms. You need to add the netty JAR for the host operating |
| * system you are using. See more details at: |
| * http://netty.io/wiki/native-transports.html. |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointBuilder nativeTransport( |
| boolean nativeTransport) { |
| setProperty("nativeTransport", nativeTransport); |
| return this; |
| } |
| /** |
| * Whether to use native transport instead of NIO. Native transport |
| * takes advantage of the host operating system and is only supported on |
| * some platforms. You need to add the netty JAR for the host operating |
| * system you are using. See more details at: |
| * http://netty.io/wiki/native-transports.html. |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointBuilder nativeTransport( |
| String nativeTransport) { |
| setProperty("nativeTransport", nativeTransport); |
| return this; |
| } |
| /** |
| * To use a custom |
| * org.apache.camel.component.netty4.http.NettyHttpBinding for binding |
| * to/from Netty and Camel Message API. |
| * |
| * The option is a: |
| * <code>org.apache.camel.component.netty4.http.NettyHttpBinding</code> |
| * type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointBuilder nettyHttpBinding( |
| Object nettyHttpBinding) { |
| setProperty("nettyHttpBinding", nettyHttpBinding); |
| return this; |
| } |
| /** |
| * To use a custom |
| * org.apache.camel.component.netty4.http.NettyHttpBinding for binding |
| * to/from Netty and Camel Message API. |
| * |
| * The option will be converted to a |
| * <code>org.apache.camel.component.netty4.http.NettyHttpBinding</code> |
| * type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointBuilder nettyHttpBinding( |
| String nettyHttpBinding) { |
| setProperty("nettyHttpBinding", nettyHttpBinding); |
| return this; |
| } |
| /** |
| * Allows to configure additional netty options using option. as prefix. |
| * For example option.child.keepAlive=false to set the netty option |
| * child.keepAlive=false. See the Netty documentation for possible |
| * options that can be used. |
| * |
| * The option is a: <code>java.util.Map<java.lang.String, |
| * java.lang.Object></code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointBuilder options( |
| Map<String, Object> options) { |
| setProperty("options", options); |
| return this; |
| } |
| /** |
| * Allows to configure additional netty options using option. as prefix. |
| * For example option.child.keepAlive=false to set the netty option |
| * child.keepAlive=false. See the Netty documentation for possible |
| * options that can be used. |
| * |
| * The option will be converted to a |
| * <code>java.util.Map<java.lang.String, java.lang.Object></code> |
| * type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointBuilder options(String options) { |
| setProperty("options", options); |
| return this; |
| } |
| /** |
| * The TCP/UDP buffer sizes to be used during inbound communication. |
| * Size is bytes. |
| * |
| * The option is a: <code>int</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointBuilder receiveBufferSize( |
| int receiveBufferSize) { |
| setProperty("receiveBufferSize", receiveBufferSize); |
| return this; |
| } |
| /** |
| * The TCP/UDP buffer sizes to be used during inbound communication. |
| * Size is bytes. |
| * |
| * The option will be converted to a <code>int</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointBuilder receiveBufferSize( |
| String receiveBufferSize) { |
| setProperty("receiveBufferSize", receiveBufferSize); |
| return this; |
| } |
| /** |
| * Configures the buffer size predictor. See details at Jetty |
| * documentation and this mail thread. |
| * |
| * The option is a: <code>int</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointBuilder receiveBufferSizePredictor( |
| int receiveBufferSizePredictor) { |
| setProperty("receiveBufferSizePredictor", receiveBufferSizePredictor); |
| return this; |
| } |
| /** |
| * Configures the buffer size predictor. See details at Jetty |
| * documentation and this mail thread. |
| * |
| * The option will be converted to a <code>int</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointBuilder receiveBufferSizePredictor( |
| String receiveBufferSizePredictor) { |
| setProperty("receiveBufferSizePredictor", receiveBufferSizePredictor); |
| return this; |
| } |
| /** |
| * The TCP/UDP buffer sizes to be used during outbound communication. |
| * Size is bytes. |
| * |
| * The option is a: <code>int</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointBuilder sendBufferSize( |
| int sendBufferSize) { |
| setProperty("sendBufferSize", sendBufferSize); |
| return this; |
| } |
| /** |
| * The TCP/UDP buffer sizes to be used during outbound communication. |
| * Size is bytes. |
| * |
| * The option will be converted to a <code>int</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointBuilder sendBufferSize( |
| String sendBufferSize) { |
| setProperty("sendBufferSize", sendBufferSize); |
| return this; |
| } |
| /** |
| * 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. |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointBuilder transferException( |
| boolean transferException) { |
| setProperty("transferException", transferException); |
| return this; |
| } |
| /** |
| * 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. |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointBuilder transferException( |
| String transferException) { |
| setProperty("transferException", transferException); |
| return this; |
| } |
| /** |
| * Only used for TCP. You can transfer the exchange over the wire |
| * instead of just the body. The following fields are transferred: In |
| * body, Out body, fault body, In headers, Out headers, fault headers, |
| * exchange properties, exchange exception. This requires that the |
| * objects are serializable. Camel will exclude any non-serializable |
| * objects and log it at WARN level. |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointBuilder transferExchange( |
| boolean transferExchange) { |
| setProperty("transferExchange", transferExchange); |
| return this; |
| } |
| /** |
| * Only used for TCP. You can transfer the exchange over the wire |
| * instead of just the body. The following fields are transferred: In |
| * body, Out body, fault body, In headers, Out headers, fault headers, |
| * exchange properties, exchange exception. This requires that the |
| * objects are serializable. Camel will exclude any non-serializable |
| * objects and log it at WARN level. |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointBuilder transferExchange( |
| String transferExchange) { |
| setProperty("transferExchange", transferExchange); |
| return this; |
| } |
| /** |
| * When netty works on nio mode, it uses default workerCount parameter |
| * from Netty, which is cpu_core_threads x 2. User can use this |
| * operation to override the default workerCount from Netty. |
| * |
| * The option is a: <code>int</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointBuilder workerCount(int workerCount) { |
| setProperty("workerCount", workerCount); |
| return this; |
| } |
| /** |
| * When netty works on nio mode, it uses default workerCount parameter |
| * from Netty, which is cpu_core_threads x 2. User can use this |
| * operation to override the default workerCount from Netty. |
| * |
| * The option will be converted to a <code>int</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointBuilder workerCount(String workerCount) { |
| setProperty("workerCount", workerCount); |
| return this; |
| } |
| /** |
| * To use a explicit EventLoopGroup as the boss thread pool. For example |
| * to share a thread pool with multiple consumers or producers. By |
| * default each consumer or producer has their own worker pool with 2 x |
| * cpu count core threads. |
| * |
| * The option is a: <code>io.netty.channel.EventLoopGroup</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointBuilder workerGroup(Object workerGroup) { |
| setProperty("workerGroup", workerGroup); |
| return this; |
| } |
| /** |
| * To use a explicit EventLoopGroup as the boss thread pool. For example |
| * to share a thread pool with multiple consumers or producers. By |
| * default each consumer or producer has their own worker pool with 2 x |
| * cpu count core threads. |
| * |
| * The option will be converted to a |
| * <code>io.netty.channel.EventLoopGroup</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointBuilder workerGroup(String workerGroup) { |
| setProperty("workerGroup", workerGroup); |
| return this; |
| } |
| /** |
| * Whether the endpoint should use basic property binding (Camel 2.x) or |
| * the newer property binding with additional capabilities. |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointBuilder basicPropertyBinding( |
| boolean basicPropertyBinding) { |
| setProperty("basicPropertyBinding", basicPropertyBinding); |
| return this; |
| } |
| /** |
| * Whether the endpoint should use basic property binding (Camel 2.x) or |
| * the newer property binding with additional capabilities. |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointBuilder basicPropertyBinding( |
| String basicPropertyBinding) { |
| setProperty("basicPropertyBinding", basicPropertyBinding); |
| return this; |
| } |
| /** |
| * To use a custom configured NettyServerBootstrapConfiguration for |
| * configuring this endpoint. |
| * |
| * The option is a: <code>java.lang.Object</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointBuilder bootstrapConfiguration( |
| Object bootstrapConfiguration) { |
| setProperty("bootstrapConfiguration", bootstrapConfiguration); |
| return this; |
| } |
| /** |
| * To use a custom configured NettyServerBootstrapConfiguration for |
| * configuring this endpoint. |
| * |
| * The option will be converted to a <code>java.lang.Object</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointBuilder bootstrapConfiguration( |
| String bootstrapConfiguration) { |
| setProperty("bootstrapConfiguration", bootstrapConfiguration); |
| return this; |
| } |
| /** |
| * Sets whether synchronous processing should be strictly used, or Camel |
| * is allowed to use asynchronous processing (if supported). |
| * |
| * The option is a: <code>boolean</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointBuilder synchronous(boolean synchronous) { |
| setProperty("synchronous", synchronous); |
| return this; |
| } |
| /** |
| * Sets whether synchronous processing should be strictly used, or Camel |
| * is allowed to use asynchronous processing (if supported). |
| * |
| * The option will be converted to a <code>boolean</code> type. |
| * |
| * Group: advanced |
| */ |
| default AdvancedNettyHttpEndpointBuilder synchronous(String synchronous) { |
| setProperty("synchronous", synchronous); |
| return this; |
| } |
| } |
| /** |
| * Netty4 HTTP (camel-netty4-http) |
| * Netty HTTP server and client using the Netty 4.x library. |
| * |
| * Category: http |
| * Available as of version: 2.14 |
| * Maven coordinates: org.apache.camel:camel-netty4-http |
| * |
| * Syntax: <code>netty-http:protocol:host:port/path</code> |
| * |
| * Path parameter: protocol (required) |
| * The protocol to use which is either http, https or proxy - a consumer |
| * only option. |
| * The value can be one of: http, https |
| * |
| * Path parameter: host (required) |
| * The local hostname such as localhost, or 0.0.0.0 when being a consumer. |
| * The remote HTTP server hostname when using producer. |
| * |
| * Path parameter: port |
| * The host port number |
| * |
| * Path parameter: path |
| * Resource path |
| */ |
| default NettyHttpEndpointBuilder nettyHttp(String path) { |
| class NettyHttpEndpointBuilderImpl extends AbstractEndpointBuilder implements NettyHttpEndpointBuilder, AdvancedNettyHttpEndpointBuilder { |
| public NettyHttpEndpointBuilderImpl(String path) { |
| super("netty-http", path); |
| } |
| } |
| return new NettyHttpEndpointBuilderImpl(path); |
| } |
| } |