@UriParams public class NettyConfiguration extends NettyServerBootstrapConfiguration implements Cloneable
backlog, bossCount, bossPool, broadcast, channelGroup, connectTimeout, DEFAULT_ENABLED_PROTOCOLS, enabledProtocols, host, keepAlive, keyStoreFile, keyStoreFormat, keyStoreResource, needClientAuth, nettyServerBootstrapFactory, networkInterface, options, passphrase, port, protocol, receiveBufferSize, receiveBufferSizePredictor, reuseAddress, securityProvider, sendBufferSize, serverPipelineFactory, ssl, sslClientCertHeaders, sslContextParameters, sslHandler, tcpNoDelay, trustStoreFile, trustStoreResource, workerCount, workerPool
Constructor and Description |
---|
NettyConfiguration() |
Modifier and Type | Method and Description |
---|---|
NettyConfiguration |
copy()
Returns a copy of this configuration
|
String |
getCharsetName() |
ClientPipelineFactory |
getClientPipelineFactory() |
org.jboss.netty.channel.ChannelHandler |
getDecoder() |
int |
getDecoderMaxLineLength() |
List<org.jboss.netty.channel.ChannelHandler> |
getDecoders() |
TextLineDelimiter |
getDelimiter() |
org.jboss.netty.channel.ChannelHandler |
getEncoder() |
List<org.jboss.netty.channel.ChannelHandler> |
getEncoders() |
String |
getEncoding() |
long |
getMaxChannelMemorySize() |
int |
getMaximumPoolSize()
Deprecated.
|
long |
getMaxTotalMemorySize() |
org.apache.camel.LoggingLevel |
getNoReplyLogLevel() |
int |
getProducerPoolMaxActive() |
int |
getProducerPoolMaxIdle() |
long |
getProducerPoolMinEvictableIdle() |
int |
getProducerPoolMinIdle() |
long |
getRequestTimeout() |
org.apache.camel.LoggingLevel |
getServerClosedChannelExceptionCaughtLogLevel() |
org.apache.camel.LoggingLevel |
getServerExceptionCaughtLogLevel() |
boolean |
isAllowDefaultCodec() |
boolean |
isAutoAppendDelimiter() |
boolean |
isClientMode() |
boolean |
isDisconnect() |
boolean |
isDisconnectOnNoReply() |
boolean |
isLazyChannelCreation() |
boolean |
isOrderedThreadPoolExecutor() |
boolean |
isProducerPoolEnabled() |
boolean |
isSync() |
boolean |
isTextline() |
boolean |
isTransferExchange() |
boolean |
isUdpConnectionlessSending() |
boolean |
isUseChannelBuffer() |
void |
parseURI(URI uri,
Map<String,Object> parameters,
NettyComponent component,
String... supportedProtocols) |
void |
setAllowDefaultCodec(boolean allowDefaultCodec)
The netty component installs a default codec if both, encoder/deocder is null and textline is false.
|
void |
setAutoAppendDelimiter(boolean autoAppendDelimiter)
Whether or not to auto append missing end delimiter when sending using the textline codec.
|
void |
setClientMode(boolean clientMode)
If the clientMode is true, netty consumer will connect the address as a TCP client.
|
void |
setClientPipelineFactory(ClientPipelineFactory clientPipelineFactory)
To use a custom ClientPipelineFactory
|
void |
setDecoder(org.jboss.netty.channel.ChannelHandler decoder)
A custom ChannelHandler class that can be used to perform special marshalling of inbound payloads.
|
void |
setDecoderMaxLineLength(int decoderMaxLineLength)
The max line length to use for the textline codec.
|
void |
setDecoders(List<org.jboss.netty.channel.ChannelHandler> decoders)
A list of decoders to be used.
|
void |
setDelimiter(TextLineDelimiter delimiter)
The delimiter to use for the textline codec.
|
void |
setDisconnect(boolean disconnect)
Whether or not to disconnect(close) from Netty Channel right after use.
|
void |
setDisconnectOnNoReply(boolean disconnectOnNoReply)
If sync is enabled then this option dictates NettyConsumer if it should disconnect where there is no reply to send back.
|
void |
setEncoder(org.jboss.netty.channel.ChannelHandler encoder)
A custom ChannelHandler class that can be used to perform special marshalling of outbound payloads.
|
void |
setEncoders(List<org.jboss.netty.channel.ChannelHandler> encoders)
A list of encoders to be used.
|
void |
setEncoding(String encoding)
The encoding (a charset name) to use for the textline codec.
|
void |
setLazyChannelCreation(boolean lazyChannelCreation)
Channels can be lazily created to avoid exceptions, if the remote server is not up and running when the Camel producer is started.
|
void |
setMaxChannelMemorySize(long maxChannelMemorySize)
The maximum total size of the queued events per channel when using orderedThreadPoolExecutor.
|
void |
setMaximumPoolSize(int maximumPoolSize)
Deprecated.
|
void |
setMaxTotalMemorySize(long maxTotalMemorySize)
The maximum total size of the queued events for this pool when using orderedThreadPoolExecutor.
|
void |
setNoReplyLogLevel(org.apache.camel.LoggingLevel noReplyLogLevel)
If sync is enabled this option dictates NettyConsumer which logging level to use when logging a there is no reply to send back.
|
void |
setOrderedThreadPoolExecutor(boolean orderedThreadPoolExecutor)
Whether to use ordered thread pool, to ensure events are processed orderly on the same channel.
|
void |
setProducerPoolEnabled(boolean producerPoolEnabled)
Whether producer pool is enabled or not.
|
void |
setProducerPoolMaxActive(int producerPoolMaxActive)
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.
|
void |
setProducerPoolMaxIdle(int producerPoolMaxIdle)
Sets the cap on the number of "idle" instances in the pool.
|
void |
setProducerPoolMinEvictableIdle(long producerPoolMinEvictableIdle)
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.
|
void |
setProducerPoolMinIdle(int producerPoolMinIdle)
Sets the minimum number of instances allowed in the producer pool before the evictor thread (if active) spawns new objects.
|
void |
setRequestTimeout(long requestTimeout)
Allows to use a timeout for the Netty producer when calling a remote server.
|
void |
setServerClosedChannelExceptionCaughtLogLevel(org.apache.camel.LoggingLevel serverClosedChannelExceptionCaughtLogLevel)
If the server (NettyConsumer) catches an java.nio.channels.ClosedChannelException then its logged using this logging level.
|
void |
setServerExceptionCaughtLogLevel(org.apache.camel.LoggingLevel serverExceptionCaughtLogLevel)
If the server (NettyConsumer) catches an exception then its logged using this logging level.
|
void |
setSync(boolean sync)
Setting to set endpoint as one-way or request-response
|
void |
setTextline(boolean textline)
Only used for TCP.
|
void |
setTransferExchange(boolean transferExchange)
Only used for TCP.
|
void |
setUdpConnectionlessSending(boolean udpConnectionlessSending)
This option supports connection less udp sending which is a real fire and forget.
|
void |
setUseChannelBuffer(boolean useChannelBuffer)
If the useChannelBuffer is true, netty producer will turn the message body into
ChannelBuffer before sending it out. |
void |
validateConfiguration() |
compatible, getAddress, getBacklog, getBossCount, getBossPool, getChannelGroup, getConnectTimeout, getEnabledProtocols, getHost, getKeyStoreFile, getKeyStoreFormat, getKeyStoreResource, getNettyServerBootstrapFactory, getNetworkInterface, getOptions, getPassphrase, getPort, getProtocol, getReceiveBufferSize, getReceiveBufferSizePredictor, getSecurityProvider, getSendBufferSize, getServerPipelineFactory, getSslContextParameters, getSslHandler, getTrustStoreFile, getTrustStoreResource, getWorkerCount, getWorkerPool, isBroadcast, isKeepAlive, isNeedClientAuth, isReuseAddress, isSsl, isSslClientCertHeaders, isTcp, isTcpNoDelay, setBacklog, setBossCount, setBossPool, setBroadcast, setChannelGroup, setConnectTimeout, setEnabledProtocols, setHost, setKeepAlive, setKeyStoreFile, setKeyStoreFormat, setKeyStoreResource, setNeedClientAuth, setNettyServerBootstrapFactory, setNetworkInterface, setOptions, setPassphrase, setPort, setProtocol, setReceiveBufferSize, setReceiveBufferSizePredictor, setReuseAddress, setSecurityProvider, setSendBufferSize, setServerPipelineFactory, setSsl, setSslClientCertHeaders, setSslContextParameters, setSslHandler, setTcpNoDelay, setTrustStoreFile, setTrustStoreResource, setWorkerCount, setWorkerPool, toStringBootstrapConfiguration
public NettyConfiguration copy()
public void validateConfiguration()
public void parseURI(URI uri, Map<String,Object> parameters, NettyComponent component, String... supportedProtocols) throws Exception
Exception
public String getCharsetName()
public long getRequestTimeout()
public void setRequestTimeout(long requestTimeout)
public boolean isSync()
public void setSync(boolean sync)
public boolean isTextline()
public void setTextline(boolean textline)
public int getDecoderMaxLineLength()
public void setDecoderMaxLineLength(int decoderMaxLineLength)
public TextLineDelimiter getDelimiter()
public void setDelimiter(TextLineDelimiter delimiter)
public boolean isAutoAppendDelimiter()
public void setAutoAppendDelimiter(boolean autoAppendDelimiter)
public String getEncoding()
public void setEncoding(String encoding)
public List<org.jboss.netty.channel.ChannelHandler> getDecoders()
public void setDecoders(List<org.jboss.netty.channel.ChannelHandler> decoders)
public List<org.jboss.netty.channel.ChannelHandler> getEncoders()
public void setEncoders(List<org.jboss.netty.channel.ChannelHandler> encoders)
public org.jboss.netty.channel.ChannelHandler getEncoder()
public void setEncoder(org.jboss.netty.channel.ChannelHandler encoder)
public org.jboss.netty.channel.ChannelHandler getDecoder()
public void setDecoder(org.jboss.netty.channel.ChannelHandler decoder)
public boolean isDisconnect()
public void setDisconnect(boolean disconnect)
public boolean isLazyChannelCreation()
public void setLazyChannelCreation(boolean lazyChannelCreation)
public boolean isTransferExchange()
public void setTransferExchange(boolean transferExchange)
public boolean isDisconnectOnNoReply()
public void setDisconnectOnNoReply(boolean disconnectOnNoReply)
public org.apache.camel.LoggingLevel getNoReplyLogLevel()
public void setNoReplyLogLevel(org.apache.camel.LoggingLevel noReplyLogLevel)
public org.apache.camel.LoggingLevel getServerExceptionCaughtLogLevel()
public void setServerExceptionCaughtLogLevel(org.apache.camel.LoggingLevel serverExceptionCaughtLogLevel)
public org.apache.camel.LoggingLevel getServerClosedChannelExceptionCaughtLogLevel()
public void setServerClosedChannelExceptionCaughtLogLevel(org.apache.camel.LoggingLevel serverClosedChannelExceptionCaughtLogLevel)
public boolean isAllowDefaultCodec()
public void setAllowDefaultCodec(boolean allowDefaultCodec)
public void setClientPipelineFactory(ClientPipelineFactory clientPipelineFactory)
public ClientPipelineFactory getClientPipelineFactory()
@Deprecated public int getMaximumPoolSize()
@Deprecated public void setMaximumPoolSize(int maximumPoolSize)
public boolean isOrderedThreadPoolExecutor()
public void setOrderedThreadPoolExecutor(boolean orderedThreadPoolExecutor)
public int getProducerPoolMaxActive()
public void setProducerPoolMaxActive(int producerPoolMaxActive)
public int getProducerPoolMinIdle()
public void setProducerPoolMinIdle(int producerPoolMinIdle)
public int getProducerPoolMaxIdle()
public void setProducerPoolMaxIdle(int producerPoolMaxIdle)
public long getProducerPoolMinEvictableIdle()
public void setProducerPoolMinEvictableIdle(long producerPoolMinEvictableIdle)
public boolean isProducerPoolEnabled()
public void setProducerPoolEnabled(boolean producerPoolEnabled)
public boolean isUdpConnectionlessSending()
public void setUdpConnectionlessSending(boolean udpConnectionlessSending)
public boolean isClientMode()
public void setClientMode(boolean clientMode)
public boolean isUseChannelBuffer()
public void setUseChannelBuffer(boolean useChannelBuffer)
ChannelBuffer
before sending it out.public long getMaxChannelMemorySize()
public void setMaxChannelMemorySize(long maxChannelMemorySize)
public long getMaxTotalMemorySize()
public void setMaxTotalMemorySize(long maxTotalMemorySize)
Apache Camel