Class HttpTunnelingSocketChannelConfig
java.lang.Object
org.jboss.netty.channel.socket.http.HttpTunnelingSocketChannelConfig
- All Implemented Interfaces:
ChannelConfig,SocketChannelConfig
The
ChannelConfig of a client-side HTTP tunneling
SocketChannel. A SocketChannel created by
HttpTunnelingClientSocketChannelFactory will return an instance of
this configuration type for SocketChannel.getConfig().
Available options
In addition to the options provided bySocketChannelConfig,
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) |
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final HttpTunnelingClientSocketChannelprivate String[]private String[]private booleanprivate Stringprivate Stringprivate SSLContext -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionReturns the defaultChannelBufferFactoryused to create a newChannelBuffer.intReturns the connect timeout of the channel in milliseconds.String[]Returns the cipher suites enabled for use on anSSLEngine.String[]Returns the protocol versions enabled for use on anSSLEngine.Returns theChannelPipelineFactorywhich will be used when a child channel is created.intGets theStandardSocketOptions.SO_RCVBUFoption.intGets theStandardSocketOptions.SO_SNDBUFoption.Returns the host name of the HTTP server.Returns the path where theHttpTunnelingServletis mapped to.intGets theStandardSocketOptions.SO_LINGERoption.Returns theSSLContextwhich is used to establish an HTTPS connection.intGets theStandardSocketOptions.IP_TOSoption.booleanbooleanGets theStandardSocketOptions.SO_KEEPALIVEoption.booleanGets theStandardSocketOptions.SO_REUSEADDRoption.booleanGets theStandardSocketOptions.TCP_NODELAYoption.voidsetBufferFactory(ChannelBufferFactory bufferFactory) Sets the defaultChannelBufferFactoryused to create a newChannelBuffer.voidsetConnectTimeoutMillis(int connectTimeoutMillis) Sets the connect timeout of the channel in milliseconds.voidsetEnabledSslCipherSuites(String[] suites) Sets the cipher suites enabled for use on anSSLEngine.voidsetEnabledSslProtocols(String[] protocols) Sets the protocol versions enabled for use on anSSLEngine.voidsetEnableSslSessionCreation(boolean flag) Sets whether newSSLSessions may be established by anSSLEngine.voidsetKeepAlive(boolean keepAlive) Sets theStandardSocketOptions.SO_KEEPALIVEoption.booleanSets a configuration property with the specified name and value.voidsetOptions(Map<String, Object> options) Sets the configuration properties from the specifiedMap.voidsetPerformancePreferences(int connectionTime, int latency, int bandwidth) Sets the performance preferences as specified inSocket.setPerformancePreferences(int, int, int).voidsetPipelineFactory(ChannelPipelineFactory pipelineFactory) Sets theChannelPipelineFactorywhich will be used when a child channel is created.voidsetReceiveBufferSize(int receiveBufferSize) Sets theStandardSocketOptions.SO_RCVBUFoption.voidsetReuseAddress(boolean reuseAddress) Sets theStandardSocketOptions.SO_REUSEADDRoption.voidsetSendBufferSize(int sendBufferSize) Sets theStandardSocketOptions.SO_SNDBUFoption.voidsetServerName(String serverName) Sets the host name of the HTTP server.voidsetServerPath(String serverPath) Sets the path where theHttpTunnelingServletis mapped to.voidsetSoLinger(int soLinger) Sets theStandardSocketOptions.SO_LINGERoption.voidsetSslContext(SSLContext sslContext) Sets theSSLContextwhich is used to establish an HTTPS connection.voidsetTcpNoDelay(boolean tcpNoDelay) Sets theStandardSocketOptions.TCP_NODELAYoption.voidsetTrafficClass(int trafficClass) Sets theStandardSocketOptions.IP_TOSoption.
-
Field Details
-
channel
-
serverName
-
serverPath
-
sslContext
-
enabledSslCipherSuites
-
enabledSslProtocols
-
enableSslSessionCreation
private volatile boolean enableSslSessionCreation
-
-
Constructor Details
-
HttpTunnelingSocketChannelConfig
HttpTunnelingSocketChannelConfig(HttpTunnelingClientSocketChannel channel) Creates a new instance.
-
-
Method Details
-
getServerName
Returns the host name of the HTTP server. Ifnull, the"Host"header is not sent by the HTTP tunneling client. -
setServerName
Sets the host name of the HTTP server. Ifnull, the"Host"header is not sent by the HTTP tunneling client. -
getServerPath
Returns the path where theHttpTunnelingServletis mapped to. The default value is"/netty-tunnel". -
setServerPath
Sets the path where theHttpTunnelingServletis mapped to. The default value is"/netty-tunnel". -
getSslContext
Returns theSSLContextwhich is used to establish an HTTPS connection. Ifnull, a plain-text HTTP connection is established. -
setSslContext
Sets theSSLContextwhich is used to establish an HTTPS connection. Ifnull, a plain-text HTTP connection is established. -
getEnabledSslCipherSuites
Returns the cipher suites enabled for use on anSSLEngine. Ifnull, the default value will be used.- See Also:
-
setEnabledSslCipherSuites
Sets the cipher suites enabled for use on anSSLEngine. Ifnull, the default value will be used.- See Also:
-
getEnabledSslProtocols
Returns the protocol versions enabled for use on anSSLEngine.- See Also:
-
setEnabledSslProtocols
Sets the protocol versions enabled for use on anSSLEngine.- See Also:
-
isEnableSslSessionCreation
public boolean isEnableSslSessionCreation()- See Also:
-
setEnableSslSessionCreation
public void setEnableSslSessionCreation(boolean flag) Sets whether newSSLSessions may be established by anSSLEngine.- See Also:
-
setOptions
Description copied from interface:ChannelConfigSets the configuration properties from the specifiedMap.- Specified by:
setOptionsin interfaceChannelConfig
-
setOption
Description copied from interface:ChannelConfigSets a configuration property with the specified name and value. To override this method properly, you must call the super class:public boolean setOption(String name, Object value) { if (super.setOption(name, value)) { return true; } if (name.equals("additionalOption")) { .... return true; } return false; }- Specified by:
setOptionin interfaceChannelConfig- Returns:
trueif and only if the property has been set
-
getReceiveBufferSize
public int getReceiveBufferSize()Description copied from interface:SocketChannelConfigGets theStandardSocketOptions.SO_RCVBUFoption.- Specified by:
getReceiveBufferSizein interfaceSocketChannelConfig
-
getSendBufferSize
public int getSendBufferSize()Description copied from interface:SocketChannelConfigGets theStandardSocketOptions.SO_SNDBUFoption.- Specified by:
getSendBufferSizein interfaceSocketChannelConfig
-
getSoLinger
public int getSoLinger()Description copied from interface:SocketChannelConfigGets theStandardSocketOptions.SO_LINGERoption.- Specified by:
getSoLingerin interfaceSocketChannelConfig
-
getTrafficClass
public int getTrafficClass()Description copied from interface:SocketChannelConfigGets theStandardSocketOptions.IP_TOSoption.- Specified by:
getTrafficClassin interfaceSocketChannelConfig
-
isKeepAlive
public boolean isKeepAlive()Description copied from interface:SocketChannelConfigGets theStandardSocketOptions.SO_KEEPALIVEoption.- Specified by:
isKeepAlivein interfaceSocketChannelConfig
-
isReuseAddress
public boolean isReuseAddress()Description copied from interface:SocketChannelConfigGets theStandardSocketOptions.SO_REUSEADDRoption.- Specified by:
isReuseAddressin interfaceSocketChannelConfig
-
isTcpNoDelay
public boolean isTcpNoDelay()Description copied from interface:SocketChannelConfigGets theStandardSocketOptions.TCP_NODELAYoption.- Specified by:
isTcpNoDelayin interfaceSocketChannelConfig
-
setKeepAlive
public void setKeepAlive(boolean keepAlive) Description copied from interface:SocketChannelConfigSets theStandardSocketOptions.SO_KEEPALIVEoption.- Specified by:
setKeepAlivein interfaceSocketChannelConfig
-
setPerformancePreferences
public void setPerformancePreferences(int connectionTime, int latency, int bandwidth) Description copied from interface:SocketChannelConfigSets the performance preferences as specified inSocket.setPerformancePreferences(int, int, int).- Specified by:
setPerformancePreferencesin interfaceSocketChannelConfig
-
setReceiveBufferSize
public void setReceiveBufferSize(int receiveBufferSize) Description copied from interface:SocketChannelConfigSets theStandardSocketOptions.SO_RCVBUFoption.- Specified by:
setReceiveBufferSizein interfaceSocketChannelConfig
-
setReuseAddress
public void setReuseAddress(boolean reuseAddress) Description copied from interface:SocketChannelConfigSets theStandardSocketOptions.SO_REUSEADDRoption.- Specified by:
setReuseAddressin interfaceSocketChannelConfig
-
setSendBufferSize
public void setSendBufferSize(int sendBufferSize) Description copied from interface:SocketChannelConfigSets theStandardSocketOptions.SO_SNDBUFoption.- Specified by:
setSendBufferSizein interfaceSocketChannelConfig
-
setSoLinger
public void setSoLinger(int soLinger) Description copied from interface:SocketChannelConfigSets theStandardSocketOptions.SO_LINGERoption.- Specified by:
setSoLingerin interfaceSocketChannelConfig
-
setTcpNoDelay
public void setTcpNoDelay(boolean tcpNoDelay) Description copied from interface:SocketChannelConfigSets theStandardSocketOptions.TCP_NODELAYoption.- Specified by:
setTcpNoDelayin interfaceSocketChannelConfig
-
setTrafficClass
public void setTrafficClass(int trafficClass) Description copied from interface:SocketChannelConfigSets theStandardSocketOptions.IP_TOSoption.- Specified by:
setTrafficClassin interfaceSocketChannelConfig
-
getBufferFactory
Description copied from interface:ChannelConfigReturns the defaultChannelBufferFactoryused to create a newChannelBuffer. The default isHeapChannelBufferFactory. You can specify a different factory to change the defaultByteOrderfor example.- Specified by:
getBufferFactoryin interfaceChannelConfig
-
getConnectTimeoutMillis
public int getConnectTimeoutMillis()Description copied from interface:ChannelConfigReturns the connect timeout of the channel in milliseconds. If theChanneldoes not support connect operation, this property is not used at all, and therefore will be ignored.- Specified by:
getConnectTimeoutMillisin interfaceChannelConfig- Returns:
- the connect timeout in milliseconds.
0if disabled.
-
getPipelineFactory
Description copied from interface:ChannelConfigReturns theChannelPipelineFactorywhich will be used when a child channel is created. If theChanneldoes not create a child channel, this property is not used at all, and therefore will be ignored.- Specified by:
getPipelineFactoryin interfaceChannelConfig
-
setBufferFactory
Description copied from interface:ChannelConfigSets the defaultChannelBufferFactoryused to create a newChannelBuffer. The default isHeapChannelBufferFactory. You can specify a different factory to change the defaultByteOrderfor example.- Specified by:
setBufferFactoryin interfaceChannelConfig
-
setConnectTimeoutMillis
public void setConnectTimeoutMillis(int connectTimeoutMillis) Description copied from interface:ChannelConfigSets the connect timeout of the channel in milliseconds. If theChanneldoes not support connect operation, this property is not used at all, and therefore will be ignored.- Specified by:
setConnectTimeoutMillisin interfaceChannelConfig- Parameters:
connectTimeoutMillis- the connect timeout in milliseconds.0to disable.
-
setPipelineFactory
Description copied from interface:ChannelConfigSets theChannelPipelineFactorywhich will be used when a child channel is created. If theChanneldoes not create a child channel, this property is not used at all, and therefore will be ignored.- Specified by:
setPipelineFactoryin interfaceChannelConfig
-