|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.netty.channel.socket.http.HttpTunnelingSocketChannelConfig
public final class HttpTunnelingSocketChannelConfig
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()
.
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) |
Method Summary | |
---|---|
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 SO_RCVBUF option. |
int |
getSendBufferSize()
Gets the 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 SO_LINGER option. |
SSLContext |
getSslContext()
Returns the SSLContext which is used to establish an HTTPS
connection. |
int |
getTrafficClass()
Gets the traffic class. |
boolean |
isEnableSslSessionCreation()
Returns true if new SSLSession s may be established by
an SSLEngine . |
boolean |
isKeepAlive()
Gets the SO_KEEPALIVE option. |
boolean |
isReuseAddress()
Gets the SO_REUSEADDR option. |
boolean |
isTcpNoDelay()
Gets the SO_TCPNODELAY 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 SSLSession s may be established by an
SSLEngine . |
void |
setKeepAlive(boolean keepAlive)
Sets the 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)
Gets the SO_RCVBUF option. |
void |
setReuseAddress(boolean reuseAddress)
Sets the SO_REUSEADDR option. |
void |
setSendBufferSize(int sendBufferSize)
Sets the 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 SO_LINGER option. |
void |
setSslContext(SSLContext sslContext)
Sets the SSLContext which is used to establish an HTTPS connection. |
void |
setTcpNoDelay(boolean tcpNoDelay)
Sets the SO_TCPNODELAY option. |
void |
setTrafficClass(int trafficClass)
Sets the traffic class as specified in Socket.setTrafficClass(int) . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
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.
SSLEngine.setEnabledCipherSuites(String[])
public String[] getEnabledSslProtocols()
SSLEngine
.
SSLEngine.getEnabledProtocols()
public void setEnabledSslProtocols(String[] protocols)
SSLEngine
.
SSLEngine.setEnabledProtocols(String[])
public boolean isEnableSslSessionCreation()
true
if new SSLSession
s may be established by
an SSLEngine
.
SSLEngine.getEnableSessionCreation()
public void setEnableSslSessionCreation(boolean flag)
SSLSession
s may be established by an
SSLEngine
.
SSLEngine.setEnableSessionCreation(boolean)
public void setOptions(Map<String,Object> options)
ChannelConfig
Map
.
setOptions
in interface ChannelConfig
public 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 ChannelConfig
true
if and only if the property has been setpublic int getReceiveBufferSize()
SocketChannelConfig
SO_RCVBUF
option.
getReceiveBufferSize
in interface SocketChannelConfig
public int getSendBufferSize()
SocketChannelConfig
SO_SNDBUF
option.
getSendBufferSize
in interface SocketChannelConfig
public int getSoLinger()
SocketChannelConfig
SO_LINGER
option.
getSoLinger
in interface SocketChannelConfig
public int getTrafficClass()
SocketChannelConfig
getTrafficClass
in interface SocketChannelConfig
public boolean isKeepAlive()
SocketChannelConfig
SO_KEEPALIVE
option.
isKeepAlive
in interface SocketChannelConfig
public boolean isReuseAddress()
SocketChannelConfig
SO_REUSEADDR
option.
isReuseAddress
in interface SocketChannelConfig
public boolean isTcpNoDelay()
SocketChannelConfig
SO_TCPNODELAY
option.
isTcpNoDelay
in interface SocketChannelConfig
public void setKeepAlive(boolean keepAlive)
SocketChannelConfig
SO_KEEPALIVE
option.
setKeepAlive
in interface SocketChannelConfig
public void setPerformancePreferences(int connectionTime, int latency, int bandwidth)
SocketChannelConfig
Socket.setPerformancePreferences(int, int, int)
.
setPerformancePreferences
in interface SocketChannelConfig
public void setReceiveBufferSize(int receiveBufferSize)
SocketChannelConfig
SO_RCVBUF
option.
setReceiveBufferSize
in interface SocketChannelConfig
public void setReuseAddress(boolean reuseAddress)
SocketChannelConfig
SO_REUSEADDR
option.
setReuseAddress
in interface SocketChannelConfig
public void setSendBufferSize(int sendBufferSize)
SocketChannelConfig
SO_SNDBUF
option.
setSendBufferSize
in interface SocketChannelConfig
public void setSoLinger(int soLinger)
SocketChannelConfig
SO_LINGER
option.
setSoLinger
in interface SocketChannelConfig
public void setTcpNoDelay(boolean tcpNoDelay)
SocketChannelConfig
SO_TCPNODELAY
option.
setTcpNoDelay
in interface SocketChannelConfig
public void setTrafficClass(int trafficClass)
SocketChannelConfig
Socket.setTrafficClass(int)
.
setTrafficClass
in interface SocketChannelConfig
public ChannelBufferFactory getBufferFactory()
ChannelConfig
ChannelBufferFactory
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 ChannelConfig
public int getConnectTimeoutMillis()
ChannelConfig
Channel
does not support connect operation, this property is not
used at all, and therefore will be ignored.
getConnectTimeoutMillis
in interface ChannelConfig
0
if disabled.public ChannelPipelineFactory getPipelineFactory()
ChannelConfig
ChannelPipelineFactory
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 ChannelConfig
public void setBufferFactory(ChannelBufferFactory bufferFactory)
ChannelConfig
ChannelBufferFactory
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 ChannelConfig
public void setConnectTimeoutMillis(int connectTimeoutMillis)
ChannelConfig
Channel
does not support connect operation, this property is not
used at all, and therefore will be ignored.
setConnectTimeoutMillis
in interface ChannelConfig
connectTimeoutMillis
- the connect timeout in milliseconds.
0
to disable.public void setPipelineFactory(ChannelPipelineFactory pipelineFactory)
ChannelConfig
ChannelPipelineFactory
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 ChannelConfig
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |