org.jboss.netty.channel
Class DefaultServerChannelConfig

java.lang.Object
  extended by org.jboss.netty.channel.DefaultServerChannelConfig
All Implemented Interfaces:
ChannelConfig
Direct Known Subclasses:
DefaultServerSocketChannelConfig

public class DefaultServerChannelConfig
extends Object
implements ChannelConfig

The default ServerSocketChannelConfig implementation.

Version:
$Rev: 2080 $, $Date: 2010-01-26 18:04:19 +0900 (Tue, 26 Jan 2010) $
Author:
The Netty Project, Trustin Lee

Constructor Summary
DefaultServerChannelConfig()
          Creates a new instance.
 
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.
 ChannelPipelineFactory getPipelineFactory()
          Returns the ChannelPipelineFactory which will be used when a child channel is created.
 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 an individual option.
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultServerChannelConfig

public DefaultServerChannelConfig()
Creates a new instance.

Method Detail

setOptions

public void setOptions(Map<String,Object> options)
Description copied from interface: ChannelConfig
Sets the configuration properties from the specified Map.

Specified by:
setOptions in interface ChannelConfig

setOption

public boolean setOption(String key,
                         Object value)
Sets an individual option. You can override this method to support additional configuration parameters.

Specified by:
setOption in interface ChannelConfig
Returns:
true if and only if the property has been set

getPipelineFactory

public ChannelPipelineFactory getPipelineFactory()
Description copied from interface: ChannelConfig
Returns the 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.

Specified by:
getPipelineFactory in interface ChannelConfig

setPipelineFactory

public void setPipelineFactory(ChannelPipelineFactory pipelineFactory)
Description copied from interface: ChannelConfig
Sets the 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.

Specified by:
setPipelineFactory in interface ChannelConfig

getBufferFactory

public ChannelBufferFactory getBufferFactory()
Description copied from interface: ChannelConfig
Returns the default ChannelBufferFactory used to create a new ChannelBuffer. The default is HeapChannelBufferFactory. You can specify a different factory to change the default ByteOrder for example.

Specified by:
getBufferFactory in interface ChannelConfig

setBufferFactory

public void setBufferFactory(ChannelBufferFactory bufferFactory)
Description copied from interface: ChannelConfig
Sets the default ChannelBufferFactory used to create a new ChannelBuffer. The default is HeapChannelBufferFactory. You can specify a different factory to change the default ByteOrder for example.

Specified by:
setBufferFactory in interface ChannelConfig

getConnectTimeoutMillis

public int getConnectTimeoutMillis()
Description copied from interface: ChannelConfig
Returns the connect timeout of the channel in milliseconds. If the Channel does not support connect operation, this property is not used at all, and therefore will be ignored.

Specified by:
getConnectTimeoutMillis in interface ChannelConfig
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 the Channel does not support connect operation, this property is not used at all, and therefore will be ignored.

Specified by:
setConnectTimeoutMillis in interface ChannelConfig
Parameters:
connectTimeoutMillis - the connect timeout in milliseconds. 0 to disable.


Copyright © 2008-2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.