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 defaultServerSocketChannelConfigimplementation.
-
-
Field Summary
Fields Modifier and Type Field Description private ChannelBufferFactorybufferFactoryprivate ChannelPipelineFactorypipelineFactory
-
Constructor Summary
Constructors Constructor Description DefaultServerChannelConfig()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ChannelBufferFactorygetBufferFactory()Returns the defaultChannelBufferFactoryused to create a newChannelBuffer.intgetConnectTimeoutMillis()Returns the connect timeout of the channel in milliseconds.ChannelPipelineFactorygetPipelineFactory()Returns theChannelPipelineFactorywhich will be used when a child channel is created.voidsetBufferFactory(ChannelBufferFactory bufferFactory)Sets the defaultChannelBufferFactoryused to create a newChannelBuffer.voidsetConnectTimeoutMillis(int connectTimeoutMillis)Sets the connect timeout of the channel in milliseconds.booleansetOption(java.lang.String key, java.lang.Object value)Sets an individual option.voidsetOptions(java.util.Map<java.lang.String,java.lang.Object> options)Sets the configuration properties from the specifiedMap.voidsetPipelineFactory(ChannelPipelineFactory pipelineFactory)Sets theChannelPipelineFactorywhich 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:ChannelConfigSets the configuration properties from the specifiedMap.- Specified by:
setOptionsin 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:
setOptionin interfaceChannelConfig- Returns:
trueif and only if the property has been set
-
getPipelineFactory
public ChannelPipelineFactory 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
-
setPipelineFactory
public void setPipelineFactory(ChannelPipelineFactory pipelineFactory)
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
-
getBufferFactory
public ChannelBufferFactory 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
-
setBufferFactory
public void setBufferFactory(ChannelBufferFactory bufferFactory)
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
-
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.
-
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.
-
-