blob: 82d350871c705196f2fd0a2adc3e850e0968b2d0 [file] [log] [blame]
/*
* 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;
/**
* Socket level networking using TCP or UDP with 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 NettyEndpointBuilderFactory {
/**
* Builder for endpoint consumers for the Netty4 component.
*/
public interface NettyEndpointConsumerBuilder
extends
EndpointConsumerBuilder {
default AdvancedNettyEndpointConsumerBuilder advanced() {
return (AdvancedNettyEndpointConsumerBuilder) 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 NettyEndpointConsumerBuilder 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 NettyEndpointConsumerBuilder 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 NettyEndpointConsumerBuilder 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 NettyEndpointConsumerBuilder keepAlive(String keepAlive) {
setProperty("keepAlive", keepAlive);
return this;
}
/**
* Setting to facilitate socket multiplexing.
*
* The option is a: <code>boolean</code> type.
*
* Group: common
*/
default NettyEndpointConsumerBuilder 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 NettyEndpointConsumerBuilder 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 NettyEndpointConsumerBuilder 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 NettyEndpointConsumerBuilder 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 NettyEndpointConsumerBuilder 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 NettyEndpointConsumerBuilder 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 NettyEndpointConsumerBuilder 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 NettyEndpointConsumerBuilder tcpNoDelay(String tcpNoDelay) {
setProperty("tcpNoDelay", tcpNoDelay);
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 NettyEndpointConsumerBuilder 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 NettyEndpointConsumerBuilder bridgeErrorHandler(
String bridgeErrorHandler) {
setProperty("bridgeErrorHandler", bridgeErrorHandler);
return this;
}
/**
* Setting to choose Multicast over UDP.
*
* The option is a: <code>boolean</code> type.
*
* Group: consumer
*/
default NettyEndpointConsumerBuilder broadcast(boolean broadcast) {
setProperty("broadcast", broadcast);
return this;
}
/**
* Setting to choose Multicast over UDP.
*
* The option will be converted to a <code>boolean</code> type.
*
* Group: consumer
*/
default NettyEndpointConsumerBuilder broadcast(String broadcast) {
setProperty("broadcast", broadcast);
return this;
}
/**
* If the clientMode is true, netty consumer will connect the address as
* a TCP client.
*
* The option is a: <code>boolean</code> type.
*
* Group: consumer
*/
default NettyEndpointConsumerBuilder clientMode(boolean clientMode) {
setProperty("clientMode", clientMode);
return this;
}
/**
* If the clientMode is true, netty consumer will connect the address as
* a TCP client.
*
* The option will be converted to a <code>boolean</code> type.
*
* Group: consumer
*/
default NettyEndpointConsumerBuilder clientMode(String clientMode) {
setProperty("clientMode", clientMode);
return this;
}
/**
* Used only in clientMode in consumer, the consumer will attempt to
* reconnect on disconnection if this is enabled.
*
* The option is a: <code>boolean</code> type.
*
* Group: consumer
*/
default NettyEndpointConsumerBuilder reconnect(boolean reconnect) {
setProperty("reconnect", reconnect);
return this;
}
/**
* Used only in clientMode in consumer, the consumer will attempt to
* reconnect on disconnection if this is enabled.
*
* The option will be converted to a <code>boolean</code> type.
*
* Group: consumer
*/
default NettyEndpointConsumerBuilder reconnect(String reconnect) {
setProperty("reconnect", reconnect);
return this;
}
/**
* Used if reconnect and clientMode is enabled. The interval in milli
* seconds to attempt reconnection.
*
* The option is a: <code>int</code> type.
*
* Group: consumer
*/
default NettyEndpointConsumerBuilder reconnectInterval(
int reconnectInterval) {
setProperty("reconnectInterval", reconnectInterval);
return this;
}
/**
* Used if reconnect and clientMode is enabled. The interval in milli
* seconds to attempt reconnection.
*
* The option will be converted to a <code>int</code> type.
*
* Group: consumer
*/
default NettyEndpointConsumerBuilder reconnectInterval(
String reconnectInterval) {
setProperty("reconnectInterval", reconnectInterval);
return this;
}
/**
* The netty component installs a default codec if both, encoder/decoder
* is null and textline is false. Setting allowDefaultCodec to false
* prevents the netty component from installing a default codec as the
* first element in the filter chain.
*
* The option is a: <code>boolean</code> type.
*
* Group: codec
*/
default NettyEndpointConsumerBuilder allowDefaultCodec(
boolean allowDefaultCodec) {
setProperty("allowDefaultCodec", allowDefaultCodec);
return this;
}
/**
* The netty component installs a default codec if both, encoder/decoder
* is null and textline is false. Setting allowDefaultCodec to false
* prevents the netty component from installing a default codec as the
* first element in the filter chain.
*
* The option will be converted to a <code>boolean</code> type.
*
* Group: codec
*/
default NettyEndpointConsumerBuilder allowDefaultCodec(
String allowDefaultCodec) {
setProperty("allowDefaultCodec", allowDefaultCodec);
return this;
}
/**
* Whether or not to auto append missing end delimiter when sending
* using the textline codec.
*
* The option is a: <code>boolean</code> type.
*
* Group: codec
*/
default NettyEndpointConsumerBuilder autoAppendDelimiter(
boolean autoAppendDelimiter) {
setProperty("autoAppendDelimiter", autoAppendDelimiter);
return this;
}
/**
* Whether or not to auto append missing end delimiter when sending
* using the textline codec.
*
* The option will be converted to a <code>boolean</code> type.
*
* Group: codec
*/
default NettyEndpointConsumerBuilder autoAppendDelimiter(
String autoAppendDelimiter) {
setProperty("autoAppendDelimiter", autoAppendDelimiter);
return this;
}
/**
* A custom ChannelHandler class that can be used to perform special
* marshalling of inbound payloads.
*
* The option is a: <code>io.netty.channel.ChannelHandler</code> type.
*
* Group: codec
*/
@Deprecated
default NettyEndpointConsumerBuilder decoder(Object decoder) {
setProperty("decoder", decoder);
return this;
}
/**
* A custom ChannelHandler class that can be used to perform special
* marshalling of inbound payloads.
*
* The option will be converted to a
* <code>io.netty.channel.ChannelHandler</code> type.
*
* Group: codec
*/
@Deprecated
default NettyEndpointConsumerBuilder decoder(String decoder) {
setProperty("decoder", decoder);
return this;
}
/**
* The max line length to use for the textline codec.
*
* The option is a: <code>int</code> type.
*
* Group: codec
*/
default NettyEndpointConsumerBuilder decoderMaxLineLength(
int decoderMaxLineLength) {
setProperty("decoderMaxLineLength", decoderMaxLineLength);
return this;
}
/**
* The max line length to use for the textline codec.
*
* The option will be converted to a <code>int</code> type.
*
* Group: codec
*/
default NettyEndpointConsumerBuilder decoderMaxLineLength(
String decoderMaxLineLength) {
setProperty("decoderMaxLineLength", decoderMaxLineLength);
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&lt;io.netty.channel.ChannelHandler&gt;</code>
* type.
*
* Group: codec
*/
default NettyEndpointConsumerBuilder 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&lt;io.netty.channel.ChannelHandler&gt;</code>
* type.
*
* Group: codec
*/
default NettyEndpointConsumerBuilder decoders(String decoders) {
setProperty("decoders", decoders);
return this;
}
/**
* The delimiter to use for the textline codec. Possible values are LINE
* and NULL.
*
* The option is a:
* <code>org.apache.camel.component.netty4.TextLineDelimiter</code>
* type.
*
* Group: codec
*/
default NettyEndpointConsumerBuilder delimiter(
TextLineDelimiter delimiter) {
setProperty("delimiter", delimiter);
return this;
}
/**
* The delimiter to use for the textline codec. Possible values are LINE
* and NULL.
*
* The option will be converted to a
* <code>org.apache.camel.component.netty4.TextLineDelimiter</code>
* type.
*
* Group: codec
*/
default NettyEndpointConsumerBuilder delimiter(String delimiter) {
setProperty("delimiter", delimiter);
return this;
}
/**
* A custom ChannelHandler class that can be used to perform special
* marshalling of outbound payloads.
*
* The option is a: <code>io.netty.channel.ChannelHandler</code> type.
*
* Group: codec
*/
@Deprecated
default NettyEndpointConsumerBuilder encoder(Object encoder) {
setProperty("encoder", encoder);
return this;
}
/**
* A custom ChannelHandler class that can be used to perform special
* marshalling of outbound payloads.
*
* The option will be converted to a
* <code>io.netty.channel.ChannelHandler</code> type.
*
* Group: codec
*/
@Deprecated
default NettyEndpointConsumerBuilder 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&lt;io.netty.channel.ChannelHandler&gt;</code>
* type.
*
* Group: codec
*/
default NettyEndpointConsumerBuilder 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&lt;io.netty.channel.ChannelHandler&gt;</code>
* type.
*
* Group: codec
*/
default NettyEndpointConsumerBuilder encoders(String encoders) {
setProperty("encoders", encoders);
return this;
}
/**
* The encoding (a charset name) to use for the textline codec. If not
* provided, Camel will use the JVM default Charset.
*
* The option is a: <code>java.lang.String</code> type.
*
* Group: codec
*/
default NettyEndpointConsumerBuilder encoding(String encoding) {
setProperty("encoding", encoding);
return this;
}
/**
* Only used for TCP. If no codec is specified, you can use this flag to
* indicate a text line based codec; if not specified or the value is
* false, then Object Serialization is assumed over TCP.
*
* The option is a: <code>boolean</code> type.
*
* Group: codec
*/
default NettyEndpointConsumerBuilder textline(boolean textline) {
setProperty("textline", textline);
return this;
}
/**
* Only used for TCP. If no codec is specified, you can use this flag to
* indicate a text line based codec; if not specified or the value is
* false, then Object Serialization is assumed over TCP.
*
* The option will be converted to a <code>boolean</code> type.
*
* Group: codec
*/
default NettyEndpointConsumerBuilder textline(String textline) {
setProperty("textline", textline);
return this;
}
/**
* Which protocols to enable when using SSL.
*
* The option is a: <code>java.lang.String</code> type.
*
* Group: security
*/
default NettyEndpointConsumerBuilder 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 NettyEndpointConsumerBuilder 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 NettyEndpointConsumerBuilder 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 NettyEndpointConsumerBuilder 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 NettyEndpointConsumerBuilder 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 NettyEndpointConsumerBuilder 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 NettyEndpointConsumerBuilder 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 NettyEndpointConsumerBuilder 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 NettyEndpointConsumerBuilder 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 NettyEndpointConsumerBuilder 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 NettyEndpointConsumerBuilder 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 NettyEndpointConsumerBuilder 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 NettyEndpointConsumerBuilder 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 NettyEndpointConsumerBuilder 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 NettyEndpointConsumerBuilder 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 NettyEndpointConsumerBuilder 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 NettyEndpointConsumerBuilder 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 NettyEndpointConsumerBuilder 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 NettyEndpointConsumerBuilder 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 NettyEndpointConsumerBuilder trustStoreResource(
String trustStoreResource) {
setProperty("trustStoreResource", trustStoreResource);
return this;
}
}
/**
* Advanced builder for endpoint consumers for the Netty4 component.
*/
public interface AdvancedNettyEndpointConsumerBuilder
extends
EndpointConsumerBuilder {
default NettyEndpointConsumerBuilder basic() {
return (NettyEndpointConsumerBuilder) 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 AdvancedNettyEndpointConsumerBuilder 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 AdvancedNettyEndpointConsumerBuilder 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 AdvancedNettyEndpointConsumerBuilder 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 AdvancedNettyEndpointConsumerBuilder 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 AdvancedNettyEndpointConsumerBuilder 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 AdvancedNettyEndpointConsumerBuilder bossGroup(String bossGroup) {
setProperty("bossGroup", bossGroup);
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 AdvancedNettyEndpointConsumerBuilder 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 AdvancedNettyEndpointConsumerBuilder disconnectOnNoReply(
String disconnectOnNoReply) {
setProperty("disconnectOnNoReply", disconnectOnNoReply);
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 AdvancedNettyEndpointConsumerBuilder 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 AdvancedNettyEndpointConsumerBuilder 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 AdvancedNettyEndpointConsumerBuilder 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 AdvancedNettyEndpointConsumerBuilder exchangePattern(
String exchangePattern) {
setProperty("exchangePattern", exchangePattern);
return this;
}
/**
* To use a custom NettyServerBootstrapFactory.
*
* The option is a:
* <code>org.apache.camel.component.netty4.NettyServerBootstrapFactory</code> type.
*
* Group: consumer (advanced)
*/
default AdvancedNettyEndpointConsumerBuilder 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 AdvancedNettyEndpointConsumerBuilder nettyServerBootstrapFactory(
String nettyServerBootstrapFactory) {
setProperty("nettyServerBootstrapFactory", nettyServerBootstrapFactory);
return this;
}
/**
* When using UDP then this option can be used to specify a network
* interface by its name, such as eth0 to join a multicast group.
*
* The option is a: <code>java.lang.String</code> type.
*
* Group: consumer (advanced)
*/
default AdvancedNettyEndpointConsumerBuilder networkInterface(
String networkInterface) {
setProperty("networkInterface", networkInterface);
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 AdvancedNettyEndpointConsumerBuilder 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 AdvancedNettyEndpointConsumerBuilder 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 AdvancedNettyEndpointConsumerBuilder 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 AdvancedNettyEndpointConsumerBuilder 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 AdvancedNettyEndpointConsumerBuilder 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 AdvancedNettyEndpointConsumerBuilder 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 AdvancedNettyEndpointConsumerBuilder 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 AdvancedNettyEndpointConsumerBuilder serverInitializerFactory(
String serverInitializerFactory) {
setProperty("serverInitializerFactory", serverInitializerFactory);
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 AdvancedNettyEndpointConsumerBuilder 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 AdvancedNettyEndpointConsumerBuilder 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 AdvancedNettyEndpointConsumerBuilder 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 AdvancedNettyEndpointConsumerBuilder allowSerializedHeaders(
String allowSerializedHeaders) {
setProperty("allowSerializedHeaders", allowSerializedHeaders);
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 AdvancedNettyEndpointConsumerBuilder 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 AdvancedNettyEndpointConsumerBuilder 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 AdvancedNettyEndpointConsumerBuilder 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 AdvancedNettyEndpointConsumerBuilder bootstrapConfiguration(
String bootstrapConfiguration) {
setProperty("bootstrapConfiguration", bootstrapConfiguration);
return this;
}
/**
* To use a explicit ChannelGroup.
*
* The option is a: <code>io.netty.channel.group.ChannelGroup</code>
* type.
*
* Group: advanced
*/
default AdvancedNettyEndpointConsumerBuilder 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 AdvancedNettyEndpointConsumerBuilder channelGroup(
String channelGroup) {
setProperty("channelGroup", channelGroup);
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 AdvancedNettyEndpointConsumerBuilder 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 AdvancedNettyEndpointConsumerBuilder nativeTransport(
String nativeTransport) {
setProperty("nativeTransport", nativeTransport);
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&lt;java.lang.String,
* java.lang.Object&gt;</code> type.
*
* Group: advanced
*/
default AdvancedNettyEndpointConsumerBuilder 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&lt;java.lang.String, java.lang.Object&gt;</code>
* type.
*
* Group: advanced
*/
default AdvancedNettyEndpointConsumerBuilder 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 AdvancedNettyEndpointConsumerBuilder 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 AdvancedNettyEndpointConsumerBuilder 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 AdvancedNettyEndpointConsumerBuilder 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 AdvancedNettyEndpointConsumerBuilder 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 AdvancedNettyEndpointConsumerBuilder 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 AdvancedNettyEndpointConsumerBuilder sendBufferSize(
String sendBufferSize) {
setProperty("sendBufferSize", sendBufferSize);
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 AdvancedNettyEndpointConsumerBuilder 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 AdvancedNettyEndpointConsumerBuilder synchronous(
String synchronous) {
setProperty("synchronous", synchronous);
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 AdvancedNettyEndpointConsumerBuilder 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 AdvancedNettyEndpointConsumerBuilder transferExchange(
String transferExchange) {
setProperty("transferExchange", transferExchange);
return this;
}
/**
* For UDP only. If enabled the using byte array codec instead of Java
* serialization protocol.
*
* The option is a: <code>boolean</code> type.
*
* Group: advanced
*/
default AdvancedNettyEndpointConsumerBuilder udpByteArrayCodec(
boolean udpByteArrayCodec) {
setProperty("udpByteArrayCodec", udpByteArrayCodec);
return this;
}
/**
* For UDP only. If enabled the using byte array codec instead of Java
* serialization protocol.
*
* The option will be converted to a <code>boolean</code> type.
*
* Group: advanced
*/
default AdvancedNettyEndpointConsumerBuilder udpByteArrayCodec(
String udpByteArrayCodec) {
setProperty("udpByteArrayCodec", udpByteArrayCodec);
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 AdvancedNettyEndpointConsumerBuilder 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 AdvancedNettyEndpointConsumerBuilder 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 AdvancedNettyEndpointConsumerBuilder 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 AdvancedNettyEndpointConsumerBuilder workerGroup(
String workerGroup) {
setProperty("workerGroup", workerGroup);
return this;
}
}
/**
* Builder for endpoint producers for the Netty4 component.
*/
public interface NettyEndpointProducerBuilder
extends
EndpointProducerBuilder {
default AdvancedNettyEndpointProducerBuilder advanced() {
return (AdvancedNettyEndpointProducerBuilder) 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 NettyEndpointProducerBuilder 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 NettyEndpointProducerBuilder 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 NettyEndpointProducerBuilder 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 NettyEndpointProducerBuilder keepAlive(String keepAlive) {
setProperty("keepAlive", keepAlive);
return this;
}
/**
* Setting to facilitate socket multiplexing.
*
* The option is a: <code>boolean</code> type.
*
* Group: common
*/
default NettyEndpointProducerBuilder 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 NettyEndpointProducerBuilder 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 NettyEndpointProducerBuilder 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 NettyEndpointProducerBuilder 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 NettyEndpointProducerBuilder 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 NettyEndpointProducerBuilder 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 NettyEndpointProducerBuilder 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 NettyEndpointProducerBuilder 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 NettyEndpointProducerBuilder 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 NettyEndpointProducerBuilder connectTimeout(
String connectTimeout) {
setProperty("connectTimeout", connectTimeout);
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 NettyEndpointProducerBuilder 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 NettyEndpointProducerBuilder lazyStartProducer(
String lazyStartProducer) {
setProperty("lazyStartProducer", lazyStartProducer);
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 NettyEndpointProducerBuilder 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 NettyEndpointProducerBuilder requestTimeout(
String requestTimeout) {
setProperty("requestTimeout", requestTimeout);
return this;
}
/**
* The netty component installs a default codec if both, encoder/decoder
* is null and textline is false. Setting allowDefaultCodec to false
* prevents the netty component from installing a default codec as the
* first element in the filter chain.
*
* The option is a: <code>boolean</code> type.
*
* Group: codec
*/
default NettyEndpointProducerBuilder allowDefaultCodec(
boolean allowDefaultCodec) {
setProperty("allowDefaultCodec", allowDefaultCodec);
return this;
}
/**
* The netty component installs a default codec if both, encoder/decoder
* is null and textline is false. Setting allowDefaultCodec to false
* prevents the netty component from installing a default codec as the
* first element in the filter chain.
*
* The option will be converted to a <code>boolean</code> type.
*
* Group: codec
*/
default NettyEndpointProducerBuilder allowDefaultCodec(
String allowDefaultCodec) {
setProperty("allowDefaultCodec", allowDefaultCodec);
return this;
}
/**
* Whether or not to auto append missing end delimiter when sending
* using the textline codec.
*
* The option is a: <code>boolean</code> type.
*
* Group: codec
*/
default NettyEndpointProducerBuilder autoAppendDelimiter(
boolean autoAppendDelimiter) {
setProperty("autoAppendDelimiter", autoAppendDelimiter);
return this;
}
/**
* Whether or not to auto append missing end delimiter when sending
* using the textline codec.
*
* The option will be converted to a <code>boolean</code> type.
*
* Group: codec
*/
default NettyEndpointProducerBuilder autoAppendDelimiter(
String autoAppendDelimiter) {
setProperty("autoAppendDelimiter", autoAppendDelimiter);
return this;
}
/**
* A custom ChannelHandler class that can be used to perform special
* marshalling of inbound payloads.
*
* The option is a: <code>io.netty.channel.ChannelHandler</code> type.
*
* Group: codec
*/
@Deprecated
default NettyEndpointProducerBuilder decoder(Object decoder) {
setProperty("decoder", decoder);
return this;
}
/**
* A custom ChannelHandler class that can be used to perform special
* marshalling of inbound payloads.
*
* The option will be converted to a
* <code>io.netty.channel.ChannelHandler</code> type.
*
* Group: codec
*/
@Deprecated
default NettyEndpointProducerBuilder decoder(String decoder) {
setProperty("decoder", decoder);
return this;
}
/**
* The max line length to use for the textline codec.
*
* The option is a: <code>int</code> type.
*
* Group: codec
*/
default NettyEndpointProducerBuilder decoderMaxLineLength(
int decoderMaxLineLength) {
setProperty("decoderMaxLineLength", decoderMaxLineLength);
return this;
}
/**
* The max line length to use for the textline codec.
*
* The option will be converted to a <code>int</code> type.
*
* Group: codec
*/
default NettyEndpointProducerBuilder decoderMaxLineLength(
String decoderMaxLineLength) {
setProperty("decoderMaxLineLength", decoderMaxLineLength);
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&lt;io.netty.channel.ChannelHandler&gt;</code>
* type.
*
* Group: codec
*/
default NettyEndpointProducerBuilder 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&lt;io.netty.channel.ChannelHandler&gt;</code>
* type.
*
* Group: codec
*/
default NettyEndpointProducerBuilder decoders(String decoders) {
setProperty("decoders", decoders);
return this;
}
/**
* The delimiter to use for the textline codec. Possible values are LINE
* and NULL.
*
* The option is a:
* <code>org.apache.camel.component.netty4.TextLineDelimiter</code>
* type.
*
* Group: codec
*/
default NettyEndpointProducerBuilder delimiter(
TextLineDelimiter delimiter) {
setProperty("delimiter", delimiter);
return this;
}
/**
* The delimiter to use for the textline codec. Possible values are LINE
* and NULL.
*
* The option will be converted to a
* <code>org.apache.camel.component.netty4.TextLineDelimiter</code>
* type.
*
* Group: codec
*/
default NettyEndpointProducerBuilder delimiter(String delimiter) {
setProperty("delimiter", delimiter);
return this;
}
/**
* A custom ChannelHandler class that can be used to perform special
* marshalling of outbound payloads.
*
* The option is a: <code>io.netty.channel.ChannelHandler</code> type.
*
* Group: codec
*/
@Deprecated
default NettyEndpointProducerBuilder encoder(Object encoder) {
setProperty("encoder", encoder);
return this;
}
/**
* A custom ChannelHandler class that can be used to perform special
* marshalling of outbound payloads.
*
* The option will be converted to a
* <code>io.netty.channel.ChannelHandler</code> type.
*
* Group: codec
*/
@Deprecated
default NettyEndpointProducerBuilder 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&lt;io.netty.channel.ChannelHandler&gt;</code>
* type.
*
* Group: codec
*/
default NettyEndpointProducerBuilder 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&lt;io.netty.channel.ChannelHandler&gt;</code>
* type.
*
* Group: codec
*/
default NettyEndpointProducerBuilder encoders(String encoders) {
setProperty("encoders", encoders);
return this;
}
/**
* The encoding (a charset name) to use for the textline codec. If not
* provided, Camel will use the JVM default Charset.
*
* The option is a: <code>java.lang.String</code> type.
*
* Group: codec
*/
default NettyEndpointProducerBuilder encoding(String encoding) {
setProperty("encoding", encoding);
return this;
}
/**
* Only used for TCP. If no codec is specified, you can use this flag to
* indicate a text line based codec; if not specified or the value is
* false, then Object Serialization is assumed over TCP.
*
* The option is a: <code>boolean</code> type.
*
* Group: codec
*/
default NettyEndpointProducerBuilder textline(boolean textline) {
setProperty("textline", textline);
return this;
}
/**
* Only used for TCP. If no codec is specified, you can use this flag to
* indicate a text line based codec; if not specified or the value is
* false, then Object Serialization is assumed over TCP.
*
* The option will be converted to a <code>boolean</code> type.
*
* Group: codec
*/
default NettyEndpointProducerBuilder textline(String textline) {
setProperty("textline", textline);
return this;
}
/**
* Which protocols to enable when using SSL.
*
* The option is a: <code>java.lang.String</code> type.
*
* Group: security
*/
default NettyEndpointProducerBuilder 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 NettyEndpointProducerBuilder 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 NettyEndpointProducerBuilder 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 NettyEndpointProducerBuilder 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 NettyEndpointProducerBuilder 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 NettyEndpointProducerBuilder 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 NettyEndpointProducerBuilder 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 NettyEndpointProducerBuilder 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 NettyEndpointProducerBuilder 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 NettyEndpointProducerBuilder 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 NettyEndpointProducerBuilder 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 NettyEndpointProducerBuilder 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 NettyEndpointProducerBuilder 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 NettyEndpointProducerBuilder 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 NettyEndpointProducerBuilder 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 NettyEndpointProducerBuilder 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 NettyEndpointProducerBuilder 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 NettyEndpointProducerBuilder trustStoreResource(
String trustStoreResource) {
setProperty("trustStoreResource", trustStoreResource);
return this;
}
}
/**
* Advanced builder for endpoint producers for the Netty4 component.
*/
public interface AdvancedNettyEndpointProducerBuilder
extends
EndpointProducerBuilder {
default NettyEndpointProducerBuilder basic() {
return (NettyEndpointProducerBuilder) this;
}
/**
* To use a custom ClientInitializerFactory.
*
* The option is a:
* <code>org.apache.camel.component.netty4.ClientInitializerFactory</code> type.
*
* Group: producer (advanced)
*/
default AdvancedNettyEndpointProducerBuilder 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 AdvancedNettyEndpointProducerBuilder clientInitializerFactory(
String clientInitializerFactory) {
setProperty("clientInitializerFactory", clientInitializerFactory);
return this;
}
/**
* To use a custom correlation manager to manage how request and reply
* messages are mapped when using request/reply with the netty producer.
* This should only be used if you have a way to map requests together
* with replies such as if there is correlation ids in both the request
* and reply messages. This can be used if you want to multiplex
* concurrent messages on the same channel (aka connection) in netty.
* When doing this you must have a way to correlate the request and
* reply messages so you can store the right reply on the inflight Camel
* Exchange before its continued routed. We recommend extending the
* TimeoutCorrelationManagerSupport when you build custom correlation
* managers. This provides support for timeout and other complexities
* you otherwise would need to implement as well. See also the
* producerPoolEnabled option for more details.
*
* The option is a:
* <code>org.apache.camel.component.netty4.NettyCamelStateCorrelationManager</code> type.
*
* Group: producer (advanced)
*/
default AdvancedNettyEndpointProducerBuilder correlationManager(
Object correlationManager) {
setProperty("correlationManager", correlationManager);
return this;
}
/**
* To use a custom correlation manager to manage how request and reply
* messages are mapped when using request/reply with the netty producer.
* This should only be used if you have a way to map requests together
* with replies such as if there is correlation ids in both the request
* and reply messages. This can be used if you want to multiplex
* concurrent messages on the same channel (aka connection) in netty.
* When doing this you must have a way to correlate the request and
* reply messages so you can store the right reply on the inflight Camel
* Exchange before its continued routed. We recommend extending the
* TimeoutCorrelationManagerSupport when you build custom correlation
* managers. This provides support for timeout and other complexities
* you otherwise would need to implement as well. See also the
* producerPoolEnabled option for more details.
*
* The option will be converted to a
* <code>org.apache.camel.component.netty4.NettyCamelStateCorrelationManager</code> type.
*
* Group: producer (advanced)
*/
default AdvancedNettyEndpointProducerBuilder correlationManager(
String correlationManager) {
setProperty("correlationManager", correlationManager);
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 AdvancedNettyEndpointProducerBuilder 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 AdvancedNettyEndpointProducerBuilder lazyChannelCreation(
String lazyChannelCreation) {
setProperty("lazyChannelCreation", lazyChannelCreation);
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 AdvancedNettyEndpointProducerBuilder 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 AdvancedNettyEndpointProducerBuilder 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 AdvancedNettyEndpointProducerBuilder 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 AdvancedNettyEndpointProducerBuilder 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 AdvancedNettyEndpointProducerBuilder 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 AdvancedNettyEndpointProducerBuilder 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 AdvancedNettyEndpointProducerBuilder 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 AdvancedNettyEndpointProducerBuilder 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 AdvancedNettyEndpointProducerBuilder 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 AdvancedNettyEndpointProducerBuilder producerPoolMinIdle(
String producerPoolMinIdle) {
setProperty("producerPoolMinIdle", producerPoolMinIdle);
return this;
}
/**
* This option supports connection less udp sending which is a real fire
* and forget. A connected udp send receive the PortUnreachableException
* if no one is listen on the receiving port.
*
* The option is a: <code>boolean</code> type.
*
* Group: producer (advanced)
*/
default AdvancedNettyEndpointProducerBuilder udpConnectionlessSending(
boolean udpConnectionlessSending) {
setProperty("udpConnectionlessSending", udpConnectionlessSending);
return this;
}
/**
* This option supports connection less udp sending which is a real fire
* and forget. A connected udp send receive the PortUnreachableException
* if no one is listen on the receiving port.
*
* The option will be converted to a <code>boolean</code> type.
*
* Group: producer (advanced)
*/
default AdvancedNettyEndpointProducerBuilder udpConnectionlessSending(
String udpConnectionlessSending) {
setProperty("udpConnectionlessSending", udpConnectionlessSending);
return this;
}
/**
* If the useByteBuf is true, netty producer will turn the message body
* into ByteBuf before sending it out.
*
* The option is a: <code>boolean</code> type.
*
* Group: producer (advanced)
*/
default AdvancedNettyEndpointProducerBuilder useByteBuf(
boolean useByteBuf) {
setProperty("useByteBuf", useByteBuf);
return this;
}
/**
* If the useByteBuf is true, netty producer will turn the message body
* into ByteBuf before sending it out.
*
* The option will be converted to a <code>boolean</code> type.
*
* Group: producer (advanced)
*/
default AdvancedNettyEndpointProducerBuilder useByteBuf(
String useByteBuf) {
setProperty("useByteBuf", useByteBuf);
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 AdvancedNettyEndpointProducerBuilder 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 AdvancedNettyEndpointProducerBuilder allowSerializedHeaders(
String allowSerializedHeaders) {
setProperty("allowSerializedHeaders", allowSerializedHeaders);
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 AdvancedNettyEndpointProducerBuilder 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 AdvancedNettyEndpointProducerBuilder 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 AdvancedNettyEndpointProducerBuilder 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 AdvancedNettyEndpointProducerBuilder bootstrapConfiguration(
String bootstrapConfiguration) {
setProperty("bootstrapConfiguration", bootstrapConfiguration);
return this;
}
/**
* To use a explicit ChannelGroup.
*
* The option is a: <code>io.netty.channel.group.ChannelGroup</code>
* type.
*
* Group: advanced
*/
default AdvancedNettyEndpointProducerBuilder 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 AdvancedNettyEndpointProducerBuilder channelGroup(
String channelGroup) {
setProperty("channelGroup", channelGroup);
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 AdvancedNettyEndpointProducerBuilder 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 AdvancedNettyEndpointProducerBuilder nativeTransport(
String nativeTransport) {
setProperty("nativeTransport", nativeTransport);
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&lt;java.lang.String,
* java.lang.Object&gt;</code> type.
*
* Group: advanced
*/
default AdvancedNettyEndpointProducerBuilder 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&lt;java.lang.String, java.lang.Object&gt;</code>
* type.
*
* Group: advanced
*/
default AdvancedNettyEndpointProducerBuilder 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 AdvancedNettyEndpointProducerBuilder 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 AdvancedNettyEndpointProducerBuilder 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 AdvancedNettyEndpointProducerBuilder 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 AdvancedNettyEndpointProducerBuilder 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 AdvancedNettyEndpointProducerBuilder 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 AdvancedNettyEndpointProducerBuilder sendBufferSize(
String sendBufferSize) {
setProperty("sendBufferSize", sendBufferSize);
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 AdvancedNettyEndpointProducerBuilder 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 AdvancedNettyEndpointProducerBuilder synchronous(
String synchronous) {
setProperty("synchronous", synchronous);
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 AdvancedNettyEndpointProducerBuilder 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 AdvancedNettyEndpointProducerBuilder transferExchange(
String transferExchange) {
setProperty("transferExchange", transferExchange);
return this;
}
/**
* For UDP only. If enabled the using byte array codec instead of Java
* serialization protocol.
*
* The option is a: <code>boolean</code> type.
*
* Group: advanced
*/
default AdvancedNettyEndpointProducerBuilder udpByteArrayCodec(
boolean udpByteArrayCodec) {
setProperty("udpByteArrayCodec", udpByteArrayCodec);
return this;
}
/**
* For UDP only. If enabled the using byte array codec instead of Java
* serialization protocol.
*
* The option will be converted to a <code>boolean</code> type.
*
* Group: advanced
*/
default AdvancedNettyEndpointProducerBuilder udpByteArrayCodec(
String udpByteArrayCodec) {
setProperty("udpByteArrayCodec", udpByteArrayCodec);
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 AdvancedNettyEndpointProducerBuilder 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 AdvancedNettyEndpointProducerBuilder 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 AdvancedNettyEndpointProducerBuilder 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 AdvancedNettyEndpointProducerBuilder workerGroup(
String workerGroup) {
setProperty("workerGroup", workerGroup);
return this;
}
}
/**
* Builder for endpoint for the Netty4 component.
*/
public interface NettyEndpointBuilder
extends
NettyEndpointConsumerBuilder, NettyEndpointProducerBuilder {
default AdvancedNettyEndpointBuilder advanced() {
return (AdvancedNettyEndpointBuilder) 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 NettyEndpointBuilder 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 NettyEndpointBuilder 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 NettyEndpointBuilder 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 NettyEndpointBuilder keepAlive(String keepAlive) {
setProperty("keepAlive", keepAlive);
return this;
}
/**
* Setting to facilitate socket multiplexing.
*
* The option is a: <code>boolean</code> type.
*
* Group: common
*/
default NettyEndpointBuilder 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 NettyEndpointBuilder 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 NettyEndpointBuilder 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 NettyEndpointBuilder 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 NettyEndpointBuilder 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 NettyEndpointBuilder 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 NettyEndpointBuilder 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 NettyEndpointBuilder tcpNoDelay(String tcpNoDelay) {
setProperty("tcpNoDelay", tcpNoDelay);
return this;
}
/**
* The netty component installs a default codec if both, encoder/decoder
* is null and textline is false. Setting allowDefaultCodec to false
* prevents the netty component from installing a default codec as the
* first element in the filter chain.
*
* The option is a: <code>boolean</code> type.
*
* Group: codec
*/
default NettyEndpointBuilder allowDefaultCodec(boolean allowDefaultCodec) {
setProperty("allowDefaultCodec", allowDefaultCodec);
return this;
}
/**
* The netty component installs a default codec if both, encoder/decoder
* is null and textline is false. Setting allowDefaultCodec to false
* prevents the netty component from installing a default codec as the
* first element in the filter chain.
*
* The option will be converted to a <code>boolean</code> type.
*
* Group: codec
*/
default NettyEndpointBuilder allowDefaultCodec(String allowDefaultCodec) {
setProperty("allowDefaultCodec", allowDefaultCodec);
return this;
}
/**
* Whether or not to auto append missing end delimiter when sending
* using the textline codec.
*
* The option is a: <code>boolean</code> type.
*
* Group: codec
*/
default NettyEndpointBuilder autoAppendDelimiter(
boolean autoAppendDelimiter) {
setProperty("autoAppendDelimiter", autoAppendDelimiter);
return this;
}
/**
* Whether or not to auto append missing end delimiter when sending
* using the textline codec.
*
* The option will be converted to a <code>boolean</code> type.
*
* Group: codec
*/
default NettyEndpointBuilder autoAppendDelimiter(
String autoAppendDelimiter) {
setProperty("autoAppendDelimiter", autoAppendDelimiter);
return this;
}
/**
* A custom ChannelHandler class that can be used to perform special
* marshalling of inbound payloads.
*
* The option is a: <code>io.netty.channel.ChannelHandler</code> type.
*
* Group: codec
*/
@Deprecated
default NettyEndpointBuilder decoder(Object decoder) {
setProperty("decoder", decoder);
return this;
}
/**
* A custom ChannelHandler class that can be used to perform special
* marshalling of inbound payloads.
*
* The option will be converted to a
* <code>io.netty.channel.ChannelHandler</code> type.
*
* Group: codec
*/
@Deprecated
default NettyEndpointBuilder decoder(String decoder) {
setProperty("decoder", decoder);
return this;
}
/**
* The max line length to use for the textline codec.
*
* The option is a: <code>int</code> type.
*
* Group: codec
*/
default NettyEndpointBuilder decoderMaxLineLength(
int decoderMaxLineLength) {
setProperty("decoderMaxLineLength", decoderMaxLineLength);
return this;
}
/**
* The max line length to use for the textline codec.
*
* The option will be converted to a <code>int</code> type.
*
* Group: codec
*/
default NettyEndpointBuilder decoderMaxLineLength(
String decoderMaxLineLength) {
setProperty("decoderMaxLineLength", decoderMaxLineLength);
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&lt;io.netty.channel.ChannelHandler&gt;</code>
* type.
*
* Group: codec
*/
default NettyEndpointBuilder 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&lt;io.netty.channel.ChannelHandler&gt;</code>
* type.
*
* Group: codec
*/
default NettyEndpointBuilder decoders(String decoders) {
setProperty("decoders", decoders);
return this;
}
/**
* The delimiter to use for the textline codec. Possible values are LINE
* and NULL.
*
* The option is a:
* <code>org.apache.camel.component.netty4.TextLineDelimiter</code>
* type.
*
* Group: codec
*/
default NettyEndpointBuilder delimiter(TextLineDelimiter delimiter) {
setProperty("delimiter", delimiter);
return this;
}
/**
* The delimiter to use for the textline codec. Possible values are LINE
* and NULL.
*
* The option will be converted to a
* <code>org.apache.camel.component.netty4.TextLineDelimiter</code>
* type.
*
* Group: codec
*/
default NettyEndpointBuilder delimiter(String delimiter) {
setProperty("delimiter", delimiter);
return this;
}
/**
* A custom ChannelHandler class that can be used to perform special
* marshalling of outbound payloads.
*
* The option is a: <code>io.netty.channel.ChannelHandler</code> type.
*
* Group: codec
*/
@Deprecated
default NettyEndpointBuilder encoder(Object encoder) {
setProperty("encoder", encoder);
return this;
}
/**
* A custom ChannelHandler class that can be used to perform special
* marshalling of outbound payloads.
*
* The option will be converted to a
* <code>io.netty.channel.ChannelHandler</code> type.
*
* Group: codec
*/
@Deprecated
default NettyEndpointBuilder 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&lt;io.netty.channel.ChannelHandler&gt;</code>
* type.
*
* Group: codec
*/
default NettyEndpointBuilder 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&lt;io.netty.channel.ChannelHandler&gt;</code>
* type.
*
* Group: codec
*/
default NettyEndpointBuilder encoders(String encoders) {
setProperty("encoders", encoders);
return this;
}
/**
* The encoding (a charset name) to use for the textline codec. If not
* provided, Camel will use the JVM default Charset.
*
* The option is a: <code>java.lang.String</code> type.
*
* Group: codec
*/
default NettyEndpointBuilder encoding(String encoding) {
setProperty("encoding", encoding);
return this;
}
/**
* Only used for TCP. If no codec is specified, you can use this flag to
* indicate a text line based codec; if not specified or the value is
* false, then Object Serialization is assumed over TCP.
*
* The option is a: <code>boolean</code> type.
*
* Group: codec
*/
default NettyEndpointBuilder textline(boolean textline) {
setProperty("textline", textline);
return this;
}
/**
* Only used for TCP. If no codec is specified, you can use this flag to
* indicate a text line based codec; if not specified or the value is
* false, then Object Serialization is assumed over TCP.
*
* The option will be converted to a <code>boolean</code> type.
*
* Group: codec
*/
default NettyEndpointBuilder textline(String textline) {
setProperty("textline", textline);
return this;
}
/**
* Which protocols to enable when using SSL.
*
* The option is a: <code>java.lang.String</code> type.
*
* Group: security
*/
default NettyEndpointBuilder 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 NettyEndpointBuilder 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 NettyEndpointBuilder 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 NettyEndpointBuilder 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 NettyEndpointBuilder 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 NettyEndpointBuilder 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 NettyEndpointBuilder 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 NettyEndpointBuilder 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 NettyEndpointBuilder 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 NettyEndpointBuilder 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 NettyEndpointBuilder 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 NettyEndpointBuilder 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 NettyEndpointBuilder 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 NettyEndpointBuilder 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 NettyEndpointBuilder 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 NettyEndpointBuilder 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 NettyEndpointBuilder 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 NettyEndpointBuilder trustStoreResource(
String trustStoreResource) {
setProperty("trustStoreResource", trustStoreResource);
return this;
}
}
/**
* Advanced builder for endpoint for the Netty4 component.
*/
public interface AdvancedNettyEndpointBuilder
extends
AdvancedNettyEndpointConsumerBuilder, AdvancedNettyEndpointProducerBuilder {
default NettyEndpointBuilder basic() {
return (NettyEndpointBuilder) 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 AdvancedNettyEndpointBuilder 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 AdvancedNettyEndpointBuilder allowSerializedHeaders(
String allowSerializedHeaders) {
setProperty("allowSerializedHeaders", allowSerializedHeaders);
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 AdvancedNettyEndpointBuilder 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 AdvancedNettyEndpointBuilder 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 AdvancedNettyEndpointBuilder 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 AdvancedNettyEndpointBuilder bootstrapConfiguration(
String bootstrapConfiguration) {
setProperty("bootstrapConfiguration", bootstrapConfiguration);
return this;
}
/**
* To use a explicit ChannelGroup.
*
* The option is a: <code>io.netty.channel.group.ChannelGroup</code>
* type.
*
* Group: advanced
*/
default AdvancedNettyEndpointBuilder 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 AdvancedNettyEndpointBuilder channelGroup(String channelGroup) {
setProperty("channelGroup", channelGroup);
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 AdvancedNettyEndpointBuilder 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 AdvancedNettyEndpointBuilder nativeTransport(
String nativeTransport) {
setProperty("nativeTransport", nativeTransport);
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&lt;java.lang.String,
* java.lang.Object&gt;</code> type.
*
* Group: advanced
*/
default AdvancedNettyEndpointBuilder 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&lt;java.lang.String, java.lang.Object&gt;</code>
* type.
*
* Group: advanced
*/
default AdvancedNettyEndpointBuilder 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 AdvancedNettyEndpointBuilder 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 AdvancedNettyEndpointBuilder 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 AdvancedNettyEndpointBuilder 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 AdvancedNettyEndpointBuilder 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 AdvancedNettyEndpointBuilder 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 AdvancedNettyEndpointBuilder sendBufferSize(
String sendBufferSize) {
setProperty("sendBufferSize", sendBufferSize);
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 AdvancedNettyEndpointBuilder 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 AdvancedNettyEndpointBuilder synchronous(String synchronous) {
setProperty("synchronous", synchronous);
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 AdvancedNettyEndpointBuilder 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 AdvancedNettyEndpointBuilder transferExchange(
String transferExchange) {
setProperty("transferExchange", transferExchange);
return this;
}
/**
* For UDP only. If enabled the using byte array codec instead of Java
* serialization protocol.
*
* The option is a: <code>boolean</code> type.
*
* Group: advanced
*/
default AdvancedNettyEndpointBuilder udpByteArrayCodec(
boolean udpByteArrayCodec) {
setProperty("udpByteArrayCodec", udpByteArrayCodec);
return this;
}
/**
* For UDP only. If enabled the using byte array codec instead of Java
* serialization protocol.
*
* The option will be converted to a <code>boolean</code> type.
*
* Group: advanced
*/
default AdvancedNettyEndpointBuilder udpByteArrayCodec(
String udpByteArrayCodec) {
setProperty("udpByteArrayCodec", udpByteArrayCodec);
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 AdvancedNettyEndpointBuilder 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 AdvancedNettyEndpointBuilder 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 AdvancedNettyEndpointBuilder 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 AdvancedNettyEndpointBuilder workerGroup(String workerGroup) {
setProperty("workerGroup", workerGroup);
return this;
}
}
/**
* Proxy enum for
* <code>org.apache.camel.component.netty4.TextLineDelimiter</code> enum.
*/
enum TextLineDelimiter {
LINE,
NULL;
}
/**
* Netty4 (camel-netty4)
* Socket level networking using TCP or UDP with the Netty 4.x library.
*
* Category: networking,tcp,udp
* Available as of version: 2.14
* Maven coordinates: org.apache.camel:camel-netty4
*
* Syntax: <code>netty:protocol:host:port</code>
*
* Path parameter: protocol (required)
* The protocol to use which can be tcp or udp.
* The value can be one of: tcp, udp
*
* Path parameter: host (required)
* The hostname. For the consumer the hostname is localhost or 0.0.0.0. For
* the producer the hostname is the remote host to connect to
*
* Path parameter: port (required)
* The host port number
*/
default NettyEndpointBuilder netty(String path) {
class NettyEndpointBuilderImpl extends AbstractEndpointBuilder implements NettyEndpointBuilder, AdvancedNettyEndpointBuilder {
public NettyEndpointBuilderImpl(String path) {
super("netty", path);
}
}
return new NettyEndpointBuilderImpl(path);
}
}