
public final class HttpTunnelingSocketChannelConfig extends Object implements SocketChannelConfig
ChannelConfig of a client-side HTTP tunneling
SocketChannel. A SocketChannel created by
HttpTunnelingClientSocketChannelFactory will return an instance of
this configuration type for SocketChannel.getConfig().
SocketChannelConfig,
HttpTunnelingSocketChannelConfig allows the following options in
the option map:
| Name | Associated setter method |
|---|---|
"sslContext" | setSslContext(SSLContext) |
"enabledSslCiperSuites" | setEnabledSslCipherSuites(String[]) |
"enabledSslProtocols" | setEnabledSslProtocols(String[]) |
"enableSslSessionCreation" | setEnableSslSessionCreation(boolean) |
| Modifier and Type | Method and Description |
|---|---|
ChannelBufferFactory |
getBufferFactory()
Returns the default
ChannelBufferFactory used to create a new
ChannelBuffer. |
int |
getConnectTimeoutMillis()
Returns the connect timeout of the channel in milliseconds.
|
String[] |
getEnabledSslCipherSuites()
Returns the cipher suites enabled for use on an
SSLEngine. |
String[] |
getEnabledSslProtocols()
Returns the protocol versions enabled for use on an
SSLEngine. |
ChannelPipelineFactory |
getPipelineFactory()
Returns the
ChannelPipelineFactory which will be used when
a child channel is created. |
int |
getReceiveBufferSize()
Gets the
StandardSocketOptions.SO_RCVBUF option. |
int |
getSendBufferSize()
Gets the
StandardSocketOptions.SO_SNDBUF option. |
String |
getServerName()
Returns the host name of the HTTP server.
|
String |
getServerPath()
Returns the path where the
HttpTunnelingServlet is mapped to. |
int |
getSoLinger()
Gets the
StandardSocketOptions.SO_LINGER option. |
SSLContext |
getSslContext()
Returns the
SSLContext which is used to establish an HTTPS
connection. |
int |
getTrafficClass()
Gets the
StandardSocketOptions.IP_TOS option. |
boolean |
isEnableSslSessionCreation()
|
boolean |
isKeepAlive()
Gets the
StandardSocketOptions.SO_KEEPALIVE option. |
boolean |
isReuseAddress()
Gets the
StandardSocketOptions.SO_REUSEADDR option. |
boolean |
isTcpNoDelay()
Gets the
StandardSocketOptions.TCP_NODELAY option. |
void |
setBufferFactory(ChannelBufferFactory bufferFactory)
Sets the default
ChannelBufferFactory used to create a new
ChannelBuffer. |
void |
setConnectTimeoutMillis(int connectTimeoutMillis)
Sets the connect timeout of the channel in milliseconds.
|
void |
setEnabledSslCipherSuites(String[] suites)
Sets the cipher suites enabled for use on an
SSLEngine. |
void |
setEnabledSslProtocols(String[] protocols)
Sets the protocol versions enabled for use on an
SSLEngine. |
void |
setEnableSslSessionCreation(boolean flag)
Sets whether new
SSLSessions may be established by an
SSLEngine. |
void |
setKeepAlive(boolean keepAlive)
Sets the
StandardSocketOptions.SO_KEEPALIVE option. |
boolean |
setOption(String key,
Object value)
Sets a configuration property with the specified name and value.
|
void |
setOptions(Map<String,Object> options)
Sets the configuration properties from the specified
Map. |
void |
setPerformancePreferences(int connectionTime,
int latency,
int bandwidth)
Sets the performance preferences as specified in
Socket.setPerformancePreferences(int, int, int). |
void |
setPipelineFactory(ChannelPipelineFactory pipelineFactory)
Sets the
ChannelPipelineFactory which will be used when
a child channel is created. |
void |
setReceiveBufferSize(int receiveBufferSize)
Sets the
StandardSocketOptions.SO_RCVBUF option. |
void |
setReuseAddress(boolean reuseAddress)
Sets the
StandardSocketOptions.SO_REUSEADDR option. |
void |
setSendBufferSize(int sendBufferSize)
Sets the
StandardSocketOptions.SO_SNDBUF option. |
void |
setServerName(String serverName)
Sets the host name of the HTTP server.
|
void |
setServerPath(String serverPath)
Sets the path where the
HttpTunnelingServlet is mapped to. |
void |
setSoLinger(int soLinger)
Sets the
StandardSocketOptions.SO_LINGER option. |
void |
setSslContext(SSLContext sslContext)
Sets the
SSLContext which is used to establish an HTTPS connection. |
void |
setTcpNoDelay(boolean tcpNoDelay)
Sets the
StandardSocketOptions.TCP_NODELAY option. |
void |
setTrafficClass(int trafficClass)
Sets the
StandardSocketOptions.IP_TOS option. |
public String getServerName()
null, the
"Host" header is not sent by the HTTP tunneling client.public void setServerName(String serverName)
null, the
"Host" header is not sent by the HTTP tunneling client.public String getServerPath()
HttpTunnelingServlet is mapped to.
The default value is "/netty-tunnel".public void setServerPath(String serverPath)
HttpTunnelingServlet is mapped to.
The default value is "/netty-tunnel".public SSLContext getSslContext()
SSLContext which is used to establish an HTTPS
connection. If null, a plain-text HTTP connection is established.public void setSslContext(SSLContext sslContext)
SSLContext which is used to establish an HTTPS connection.
If null, a plain-text HTTP connection is established.public String[] getEnabledSslCipherSuites()
SSLEngine.
If null, the default value will be used.SSLEngine.getEnabledCipherSuites()public void setEnabledSslCipherSuites(String[] suites)
SSLEngine.
If null, the default value will be used.public String[] getEnabledSslProtocols()
SSLEngine.SSLEngine.getEnabledProtocols()public void setEnabledSslProtocols(String[] protocols)
SSLEngine.public boolean isEnableSslSessionCreation()
SSLEngine.getEnableSessionCreation()public void setEnableSslSessionCreation(boolean flag)
SSLSessions may be established by an
SSLEngine.public void setOptions(Map<String,Object> options)
ChannelConfigMap.setOptions in interface ChannelConfigpublic boolean setOption(String key, Object value)
ChannelConfig
public boolean setOption(String name, Object value) {
if (super.setOption(name, value)) {
return true;
}
if (name.equals("additionalOption")) {
....
return true;
}
return false;
}
setOption in interface ChannelConfigtrue if and only if the property has been setpublic int getReceiveBufferSize()
SocketChannelConfigStandardSocketOptions.SO_RCVBUF option.getReceiveBufferSize in interface SocketChannelConfigpublic int getSendBufferSize()
SocketChannelConfigStandardSocketOptions.SO_SNDBUF option.getSendBufferSize in interface SocketChannelConfigpublic int getSoLinger()
SocketChannelConfigStandardSocketOptions.SO_LINGER option.getSoLinger in interface SocketChannelConfigpublic int getTrafficClass()
SocketChannelConfigStandardSocketOptions.IP_TOS option.getTrafficClass in interface SocketChannelConfigpublic boolean isKeepAlive()
SocketChannelConfigStandardSocketOptions.SO_KEEPALIVE option.isKeepAlive in interface SocketChannelConfigpublic boolean isReuseAddress()
SocketChannelConfigStandardSocketOptions.SO_REUSEADDR option.isReuseAddress in interface SocketChannelConfigpublic boolean isTcpNoDelay()
SocketChannelConfigStandardSocketOptions.TCP_NODELAY option.isTcpNoDelay in interface SocketChannelConfigpublic void setKeepAlive(boolean keepAlive)
SocketChannelConfigStandardSocketOptions.SO_KEEPALIVE option.setKeepAlive in interface SocketChannelConfigpublic void setPerformancePreferences(int connectionTime,
int latency,
int bandwidth)
SocketChannelConfigSocket.setPerformancePreferences(int, int, int).setPerformancePreferences in interface SocketChannelConfigpublic void setReceiveBufferSize(int receiveBufferSize)
SocketChannelConfigStandardSocketOptions.SO_RCVBUF option.setReceiveBufferSize in interface SocketChannelConfigpublic void setReuseAddress(boolean reuseAddress)
SocketChannelConfigStandardSocketOptions.SO_REUSEADDR option.setReuseAddress in interface SocketChannelConfigpublic void setSendBufferSize(int sendBufferSize)
SocketChannelConfigStandardSocketOptions.SO_SNDBUF option.setSendBufferSize in interface SocketChannelConfigpublic void setSoLinger(int soLinger)
SocketChannelConfigStandardSocketOptions.SO_LINGER option.setSoLinger in interface SocketChannelConfigpublic void setTcpNoDelay(boolean tcpNoDelay)
SocketChannelConfigStandardSocketOptions.TCP_NODELAY option.setTcpNoDelay in interface SocketChannelConfigpublic void setTrafficClass(int trafficClass)
SocketChannelConfigStandardSocketOptions.IP_TOS option.setTrafficClass in interface SocketChannelConfigpublic ChannelBufferFactory getBufferFactory()
ChannelConfigChannelBufferFactory used to create a new
ChannelBuffer. The default is HeapChannelBufferFactory.
You can specify a different factory to change the default
ByteOrder for example.getBufferFactory in interface ChannelConfigpublic int getConnectTimeoutMillis()
ChannelConfigChannel does not support connect operation, this property is not
used at all, and therefore will be ignored.getConnectTimeoutMillis in interface ChannelConfig0 if disabled.public ChannelPipelineFactory getPipelineFactory()
ChannelConfigChannelPipelineFactory which will be used when
a child channel is created. If the Channel does not create
a child channel, this property is not used at all, and therefore will
be ignored.getPipelineFactory in interface ChannelConfigpublic void setBufferFactory(ChannelBufferFactory bufferFactory)
ChannelConfigChannelBufferFactory used to create a new
ChannelBuffer. The default is HeapChannelBufferFactory.
You can specify a different factory to change the default
ByteOrder for example.setBufferFactory in interface ChannelConfigpublic void setConnectTimeoutMillis(int connectTimeoutMillis)
ChannelConfigChannel does not support connect operation, this property is not
used at all, and therefore will be ignored.setConnectTimeoutMillis in interface ChannelConfigconnectTimeoutMillis - the connect timeout in milliseconds.
0 to disable.public void setPipelineFactory(ChannelPipelineFactory pipelineFactory)
ChannelConfigChannelPipelineFactory which will be used when
a child channel is created. If the Channel does not create
a child channel, this property is not used at all, and therefore will
be ignored.setPipelineFactory in interface ChannelConfigCopyright © 2008-2014 The Netty Project. All Rights Reserved.