Package org.jboss.netty.channel
Class DefaultServerChannelConfig
- java.lang.Object
-
- org.jboss.netty.channel.DefaultServerChannelConfig
-
- All Implemented Interfaces:
ChannelConfig
- Direct Known Subclasses:
DefaultServerSocketChannelConfig
public class DefaultServerChannelConfig extends java.lang.Object implements ChannelConfig
The defaultServerSocketChannelConfig
implementation.
-
-
Field Summary
Fields Modifier and Type Field Description private ChannelBufferFactory
bufferFactory
private ChannelPipelineFactory
pipelineFactory
-
Constructor Summary
Constructors Constructor Description DefaultServerChannelConfig()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ChannelBufferFactory
getBufferFactory()
Returns the defaultChannelBufferFactory
used to create a newChannelBuffer
.int
getConnectTimeoutMillis()
Returns the connect timeout of the channel in milliseconds.ChannelPipelineFactory
getPipelineFactory()
Returns theChannelPipelineFactory
which will be used when a child channel is created.void
setBufferFactory(ChannelBufferFactory bufferFactory)
Sets the defaultChannelBufferFactory
used to create a newChannelBuffer
.void
setConnectTimeoutMillis(int connectTimeoutMillis)
Sets the connect timeout of the channel in milliseconds.boolean
setOption(java.lang.String key, java.lang.Object value)
Sets an individual option.void
setOptions(java.util.Map<java.lang.String,java.lang.Object> options)
Sets the configuration properties from the specifiedMap
.void
setPipelineFactory(ChannelPipelineFactory pipelineFactory)
Sets theChannelPipelineFactory
which will be used when a child channel is created.
-
-
-
Field Detail
-
pipelineFactory
private volatile ChannelPipelineFactory pipelineFactory
-
bufferFactory
private volatile ChannelBufferFactory bufferFactory
-
-
Method Detail
-
setOptions
public void setOptions(java.util.Map<java.lang.String,java.lang.Object> options)
Description copied from interface:ChannelConfig
Sets the configuration properties from the specifiedMap
.- Specified by:
setOptions
in interfaceChannelConfig
-
setOption
public boolean setOption(java.lang.String key, java.lang.Object value)
Sets an individual option. You can override this method to support additional configuration parameters.- Specified by:
setOption
in interfaceChannelConfig
- Returns:
true
if and only if the property has been set
-
getPipelineFactory
public ChannelPipelineFactory getPipelineFactory()
Description copied from interface:ChannelConfig
Returns theChannelPipelineFactory
which will be used when a child channel is created. If theChannel
does not create a child channel, this property is not used at all, and therefore will be ignored.- Specified by:
getPipelineFactory
in interfaceChannelConfig
-
setPipelineFactory
public void setPipelineFactory(ChannelPipelineFactory pipelineFactory)
Description copied from interface:ChannelConfig
Sets theChannelPipelineFactory
which will be used when a child channel is created. If theChannel
does not create a child channel, this property is not used at all, and therefore will be ignored.- Specified by:
setPipelineFactory
in interfaceChannelConfig
-
getBufferFactory
public ChannelBufferFactory getBufferFactory()
Description copied from interface:ChannelConfig
Returns the defaultChannelBufferFactory
used to create a newChannelBuffer
. The default isHeapChannelBufferFactory
. You can specify a different factory to change the defaultByteOrder
for example.- Specified by:
getBufferFactory
in interfaceChannelConfig
-
setBufferFactory
public void setBufferFactory(ChannelBufferFactory bufferFactory)
Description copied from interface:ChannelConfig
Sets the defaultChannelBufferFactory
used to create a newChannelBuffer
. The default isHeapChannelBufferFactory
. You can specify a different factory to change the defaultByteOrder
for example.- Specified by:
setBufferFactory
in interfaceChannelConfig
-
getConnectTimeoutMillis
public int getConnectTimeoutMillis()
Description copied from interface:ChannelConfig
Returns the connect timeout of the channel in milliseconds. If theChannel
does not support connect operation, this property is not used at all, and therefore will be ignored.- Specified by:
getConnectTimeoutMillis
in interfaceChannelConfig
- Returns:
- the connect timeout in milliseconds.
0
if disabled.
-
setConnectTimeoutMillis
public void setConnectTimeoutMillis(int connectTimeoutMillis)
Description copied from interface:ChannelConfig
Sets the connect timeout of the channel in milliseconds. If theChannel
does not support connect operation, this property is not used at all, and therefore will be ignored.- Specified by:
setConnectTimeoutMillis
in interfaceChannelConfig
- Parameters:
connectTimeoutMillis
- the connect timeout in milliseconds.0
to disable.
-
-