
public class DefaultChannelConfig extends Object implements ChannelConfig
SocketChannelConfig implementation.| Constructor and Description |
|---|
DefaultChannelConfig()
Creates a new instance.
|
| 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.
|
ChannelPipelineFactory |
getPipelineFactory()
Returns the
ChannelPipelineFactory which will be used when
a child channel is created. |
int |
getWriteTimeoutMillis()
Deprecated.
Use
WriteTimeoutHandler instead. |
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.
|
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 |
setPipelineFactory(ChannelPipelineFactory pipelineFactory)
Sets the
ChannelPipelineFactory which will be used when
a child channel is created. |
void |
setWriteTimeoutMillis(int writeTimeoutMillis)
Deprecated.
Use
WriteTimeoutHandler instead. |
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 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 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 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 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 ChannelConfig@Deprecated public int getWriteTimeoutMillis()
WriteTimeoutHandler instead.getWriteTimeoutMillis in interface ChannelConfig0 if disabled.public 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 ChannelConfig@Deprecated public void setWriteTimeoutMillis(int writeTimeoutMillis)
WriteTimeoutHandler instead.setWriteTimeoutMillis in interface ChannelConfigwriteTimeoutMillis - the write timeout in milliseconds.
0 to disable.Copyright © 2008-2013 JBoss, by Red Hat. All Rights Reserved.