@UriParams public class NettyServerBootstrapConfiguration extends Object implements Cloneable
Modifier and Type | Field and Description |
---|---|
protected int |
backlog |
protected int |
bossCount |
protected org.jboss.netty.channel.socket.nio.BossPool |
bossPool |
protected boolean |
broadcast |
protected org.jboss.netty.channel.group.ChannelGroup |
channelGroup |
protected long |
connectTimeout |
static String |
DEFAULT_ENABLED_PROTOCOLS |
protected String |
enabledProtocols |
protected String |
host |
protected boolean |
keepAlive |
protected File |
keyStoreFile |
protected String |
keyStoreFormat |
protected String |
keyStoreResource |
protected boolean |
needClientAuth |
protected NettyServerBootstrapFactory |
nettyServerBootstrapFactory |
protected String |
networkInterface |
protected Map<String,Object> |
options |
protected String |
passphrase |
protected int |
port |
protected String |
protocol |
protected long |
receiveBufferSize |
protected int |
receiveBufferSizePredictor |
protected boolean |
reuseAddress |
protected String |
securityProvider |
protected long |
sendBufferSize |
protected ServerPipelineFactory |
serverPipelineFactory |
protected boolean |
ssl |
protected boolean |
sslClientCertHeaders |
protected org.apache.camel.util.jsse.SSLContextParameters |
sslContextParameters |
protected org.jboss.netty.handler.ssl.SslHandler |
sslHandler |
protected boolean |
tcpNoDelay |
protected File |
trustStoreFile |
protected String |
trustStoreResource |
protected int |
workerCount |
protected org.jboss.netty.channel.socket.nio.WorkerPool |
workerPool |
Constructor and Description |
---|
NettyServerBootstrapConfiguration() |
Modifier and Type | Method and Description |
---|---|
boolean |
compatible(NettyServerBootstrapConfiguration other)
Checks if the other
NettyServerBootstrapConfiguration is compatible
with this, as a Netty listener bound on port X shares the same common
NettyServerBootstrapConfiguration , which must be identical. |
String |
getAddress() |
int |
getBacklog() |
int |
getBossCount() |
org.jboss.netty.channel.socket.nio.BossPool |
getBossPool() |
org.jboss.netty.channel.group.ChannelGroup |
getChannelGroup() |
long |
getConnectTimeout() |
String |
getEnabledProtocols() |
String |
getHost() |
File |
getKeyStoreFile()
Deprecated.
|
String |
getKeyStoreFormat() |
String |
getKeyStoreResource() |
NettyServerBootstrapFactory |
getNettyServerBootstrapFactory() |
String |
getNetworkInterface() |
Map<String,Object> |
getOptions() |
String |
getPassphrase() |
int |
getPort() |
String |
getProtocol() |
long |
getReceiveBufferSize() |
int |
getReceiveBufferSizePredictor() |
String |
getSecurityProvider() |
long |
getSendBufferSize() |
ServerPipelineFactory |
getServerPipelineFactory() |
org.apache.camel.util.jsse.SSLContextParameters |
getSslContextParameters() |
org.jboss.netty.handler.ssl.SslHandler |
getSslHandler() |
File |
getTrustStoreFile()
Deprecated.
|
String |
getTrustStoreResource() |
int |
getWorkerCount() |
org.jboss.netty.channel.socket.nio.WorkerPool |
getWorkerPool() |
boolean |
isBroadcast() |
boolean |
isKeepAlive() |
boolean |
isNeedClientAuth() |
boolean |
isReuseAddress() |
boolean |
isSsl() |
boolean |
isSslClientCertHeaders() |
boolean |
isTcp() |
boolean |
isTcpNoDelay() |
void |
setBacklog(int backlog)
Allows to configure a backlog for netty consumer (server).
|
void |
setBossCount(int bossCount)
When netty works on nio mode, it uses default bossCount parameter from Netty, which is 1.
|
void |
setBossPool(org.jboss.netty.channel.socket.nio.BossPool bossPool)
To use a explicit org.jboss.netty.channel.socket.nio.BossPool as the boss thread pool.
|
void |
setBroadcast(boolean broadcast)
Setting to choose Multicast over UDP
|
void |
setChannelGroup(org.jboss.netty.channel.group.ChannelGroup channelGroup)
To use a explicit ChannelGroup.
|
void |
setConnectTimeout(long connectTimeout)
Time to wait for a socket connection to be available.
|
void |
setEnabledProtocols(String enabledProtocols)
Which protocols to enable when using SSL
|
void |
setHost(String host)
The hostname.
|
void |
setKeepAlive(boolean keepAlive)
Setting to ensure socket is not closed due to inactivity
|
void |
setKeyStoreFile(File keyStoreFile)
Deprecated.
|
void |
setKeyStoreFormat(String keyStoreFormat)
Keystore format to be used for payload encryption.
|
void |
setKeyStoreResource(String keyStoreResource)
Client side certificate keystore to be used for encryption.
|
void |
setNeedClientAuth(boolean needClientAuth)
Configures whether the server needs client authentication when using SSL.
|
void |
setNettyServerBootstrapFactory(NettyServerBootstrapFactory nettyServerBootstrapFactory)
To use a custom NettyServerBootstrapFactory
|
void |
setNetworkInterface(String networkInterface)
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.
|
void |
setOptions(Map<String,Object> options)
Allows to configure additional netty options using "option." as prefix.
|
void |
setPassphrase(String passphrase)
Password setting to use in order to encrypt/decrypt payloads sent using SSH
|
void |
setPort(int port)
The host port number
|
void |
setProtocol(String protocol)
The protocol to use which can be tcp or udp.
|
void |
setReceiveBufferSize(long receiveBufferSize)
The TCP/UDP buffer sizes to be used during inbound communication.
|
void |
setReceiveBufferSizePredictor(int receiveBufferSizePredictor)
Configures the buffer size predictor.
|
void |
setReuseAddress(boolean reuseAddress)
Setting to facilitate socket multiplexing
|
void |
setSecurityProvider(String securityProvider)
Security provider to be used for payload encryption.
|
void |
setSendBufferSize(long sendBufferSize)
The TCP/UDP buffer sizes to be used during outbound communication.
|
void |
setServerPipelineFactory(ServerPipelineFactory serverPipelineFactory)
To use a custom ServerPipelineFactory
|
void |
setSsl(boolean ssl)
Setting to specify whether SSL encryption is applied to this endpoint
|
void |
setSslClientCertHeaders(boolean sslClientCertHeaders)
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.
|
void |
setSslContextParameters(org.apache.camel.util.jsse.SSLContextParameters sslContextParameters)
To configure security using SSLContextParameters
|
void |
setSslHandler(org.jboss.netty.handler.ssl.SslHandler sslHandler)
Reference to a class that could be used to return an SSL Handler
|
void |
setTcpNoDelay(boolean tcpNoDelay)
Setting to improve TCP protocol performance
|
void |
setTrustStoreFile(File trustStoreFile)
Deprecated.
|
void |
setTrustStoreResource(String trustStoreResource)
Server side certificate keystore to be used for encryption.
|
void |
setWorkerCount(int workerCount)
When netty works on nio mode, it uses default workerCount parameter from Netty, which is cpu_core_threads*2.
|
void |
setWorkerPool(org.jboss.netty.channel.socket.nio.WorkerPool workerPool)
To use a explicit org.jboss.netty.channel.socket.nio.WorkerPool as the worker thread pool.
|
String |
toStringBootstrapConfiguration() |
public static final String DEFAULT_ENABLED_PROTOCOLS
@UriPath(enums="tcp,udp") @Metadata(required="true") protected String protocol
@UriPath @Metadata(required="true") protected String host
@UriPath @Metadata(required="true") protected int port
@UriParam(label="consumer") protected boolean broadcast
@UriParam(label="advanced", defaultValue="65536") protected long sendBufferSize
@UriParam(label="advanced", defaultValue="65536") protected long receiveBufferSize
@UriParam(label="advanced") protected int receiveBufferSizePredictor
@UriParam(label="consumer,advanced", defaultValue="1") protected int bossCount
@UriParam(label="consumer,advanced") protected int workerCount
@UriParam(defaultValue="true") protected boolean keepAlive
@UriParam(defaultValue="true") protected boolean tcpNoDelay
@UriParam(defaultValue="true") protected boolean reuseAddress
@UriParam(label="producer", defaultValue="10000") protected long connectTimeout
@UriParam(label="consumer,advanced") protected int backlog
@UriParam(label="consumer,advanced") protected ServerPipelineFactory serverPipelineFactory
@UriParam(label="consumer,advanced") protected NettyServerBootstrapFactory nettyServerBootstrapFactory
@UriParam(label="advanced", prefix="option.", multiValue=true) protected Map<String,Object> options
@UriParam(label="security") protected boolean ssl
@UriParam(label="security") protected boolean sslClientCertHeaders
@UriParam(label="security") protected org.jboss.netty.handler.ssl.SslHandler sslHandler
@UriParam(label="security") protected org.apache.camel.util.jsse.SSLContextParameters sslContextParameters
@UriParam(label="consumer,security") protected boolean needClientAuth
@UriParam(label="security") protected File keyStoreFile
@UriParam(label="security") protected File trustStoreFile
@UriParam(label="security") protected String keyStoreResource
@UriParam(label="security") protected String trustStoreResource
@UriParam(defaultValue="JKS", label="security") protected String keyStoreFormat
@UriParam(defaultValue="SunX509", label="security") protected String securityProvider
@UriParam(defaultValue="TLSv1,TLSv1.1,TLSv1.2", label="security") protected String enabledProtocols
@UriParam(label="security", secret=true) protected String passphrase
@UriParam(label="consumer,advanced") protected org.jboss.netty.channel.socket.nio.BossPool bossPool
@UriParam(label="consumer,advanced") protected org.jboss.netty.channel.socket.nio.WorkerPool workerPool
@UriParam(label="consumer,advanced") protected org.jboss.netty.channel.group.ChannelGroup channelGroup
@UriParam(label="consumer,advanced") protected String networkInterface
public String getAddress()
public boolean isTcp()
public String getProtocol()
public void setProtocol(String protocol)
public String getHost()
public void setHost(String host)
public int getPort()
public void setPort(int port)
public boolean isBroadcast()
public void setBroadcast(boolean broadcast)
public long getSendBufferSize()
public void setSendBufferSize(long sendBufferSize)
public long getReceiveBufferSize()
public void setReceiveBufferSize(long receiveBufferSize)
public int getReceiveBufferSizePredictor()
public void setReceiveBufferSizePredictor(int receiveBufferSizePredictor)
public int getWorkerCount()
public void setWorkerCount(int workerCount)
public int getBossCount()
public void setBossCount(int bossCount)
public boolean isKeepAlive()
public void setKeepAlive(boolean keepAlive)
public boolean isTcpNoDelay()
public void setTcpNoDelay(boolean tcpNoDelay)
public boolean isReuseAddress()
public void setReuseAddress(boolean reuseAddress)
public long getConnectTimeout()
public void setConnectTimeout(long connectTimeout)
public int getBacklog()
public void setBacklog(int backlog)
public boolean isSsl()
public void setSsl(boolean ssl)
public boolean isSslClientCertHeaders()
public void setSslClientCertHeaders(boolean sslClientCertHeaders)
public org.jboss.netty.handler.ssl.SslHandler getSslHandler()
public void setSslHandler(org.jboss.netty.handler.ssl.SslHandler sslHandler)
public org.apache.camel.util.jsse.SSLContextParameters getSslContextParameters()
public void setSslContextParameters(org.apache.camel.util.jsse.SSLContextParameters sslContextParameters)
public boolean isNeedClientAuth()
public void setNeedClientAuth(boolean needClientAuth)
@Deprecated public File getKeyStoreFile()
@Deprecated public void setKeyStoreFile(File keyStoreFile)
@Deprecated public File getTrustStoreFile()
@Deprecated public void setTrustStoreFile(File trustStoreFile)
public String getKeyStoreResource()
public void setKeyStoreResource(String keyStoreResource)
public String getTrustStoreResource()
public void setTrustStoreResource(String trustStoreResource)
public String getKeyStoreFormat()
public void setKeyStoreFormat(String keyStoreFormat)
public String getSecurityProvider()
public void setSecurityProvider(String securityProvider)
public String getPassphrase()
public void setPassphrase(String passphrase)
public ServerPipelineFactory getServerPipelineFactory()
public void setServerPipelineFactory(ServerPipelineFactory serverPipelineFactory)
public NettyServerBootstrapFactory getNettyServerBootstrapFactory()
public void setNettyServerBootstrapFactory(NettyServerBootstrapFactory nettyServerBootstrapFactory)
public void setOptions(Map<String,Object> options)
public org.jboss.netty.channel.socket.nio.BossPool getBossPool()
public void setBossPool(org.jboss.netty.channel.socket.nio.BossPool bossPool)
public org.jboss.netty.channel.socket.nio.WorkerPool getWorkerPool()
public void setWorkerPool(org.jboss.netty.channel.socket.nio.WorkerPool workerPool)
public org.jboss.netty.channel.group.ChannelGroup getChannelGroup()
public void setChannelGroup(org.jboss.netty.channel.group.ChannelGroup channelGroup)
public String getNetworkInterface()
public void setNetworkInterface(String networkInterface)
public String getEnabledProtocols()
public void setEnabledProtocols(String enabledProtocols)
public boolean compatible(NettyServerBootstrapConfiguration other)
NettyServerBootstrapConfiguration
is compatible
with this, as a Netty listener bound on port X shares the same common
NettyServerBootstrapConfiguration
, which must be identical.public String toStringBootstrapConfiguration()
Apache Camel