Added the list of available options
This commit is contained in:
parent
274fa4aac5
commit
87390319c8
@ -31,6 +31,7 @@ import java.util.concurrent.LinkedBlockingQueue;
|
|||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
import org.jboss.netty.channel.Channel;
|
import org.jboss.netty.channel.Channel;
|
||||||
|
import org.jboss.netty.channel.ChannelConfig;
|
||||||
import org.jboss.netty.channel.ChannelFactory;
|
import org.jboss.netty.channel.ChannelFactory;
|
||||||
import org.jboss.netty.channel.ChannelFuture;
|
import org.jboss.netty.channel.ChannelFuture;
|
||||||
import org.jboss.netty.channel.ChannelHandlerContext;
|
import org.jboss.netty.channel.ChannelHandlerContext;
|
||||||
@ -59,6 +60,9 @@ import org.jboss.netty.channel.SimpleChannelHandler;
|
|||||||
* b.setOption("receiveBufferSize", 1048576);
|
* b.setOption("receiveBufferSize", 1048576);
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
* For the detailed list of available options, please refer to
|
||||||
|
* {@link ChannelConfig} and its sub-types
|
||||||
|
*
|
||||||
* <h3>Configuring a channel pipeline</h3>
|
* <h3>Configuring a channel pipeline</h3>
|
||||||
*
|
*
|
||||||
* Every channel has its own {@link ChannelPipeline} and you can configure it
|
* Every channel has its own {@link ChannelPipeline} and you can configure it
|
||||||
|
@ -34,6 +34,7 @@ import java.util.concurrent.LinkedBlockingQueue;
|
|||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
import org.jboss.netty.channel.Channel;
|
import org.jboss.netty.channel.Channel;
|
||||||
|
import org.jboss.netty.channel.ChannelConfig;
|
||||||
import org.jboss.netty.channel.ChannelException;
|
import org.jboss.netty.channel.ChannelException;
|
||||||
import org.jboss.netty.channel.ChannelFactory;
|
import org.jboss.netty.channel.ChannelFactory;
|
||||||
import org.jboss.netty.channel.ChannelFuture;
|
import org.jboss.netty.channel.ChannelFuture;
|
||||||
@ -80,6 +81,9 @@ import org.jboss.netty.channel.SimpleChannelHandler;
|
|||||||
* b.setOption("child.receiveBufferSize", 1048576);
|
* b.setOption("child.receiveBufferSize", 1048576);
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
* For the detailed list of available options, please refer to
|
||||||
|
* {@link ChannelConfig} and its sub-types.
|
||||||
|
*
|
||||||
* <h3>Configuring a parent channel pipeline</h3>
|
* <h3>Configuring a parent channel pipeline</h3>
|
||||||
*
|
*
|
||||||
* It is rare to configure the pipeline of a parent channel because what it's
|
* It is rare to configure the pipeline of a parent channel because what it's
|
||||||
|
@ -26,6 +26,7 @@ import java.io.IOException;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import org.jboss.netty.channel.socket.SocketChannelConfig;
|
import org.jboss.netty.channel.socket.SocketChannelConfig;
|
||||||
|
import org.jboss.netty.channel.socket.nio.NioSocketChannelConfig;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -40,6 +41,29 @@ import org.jboss.netty.channel.socket.SocketChannelConfig;
|
|||||||
* cfg.setTcpNoDelay(false);
|
* cfg.setTcpNoDelay(false);
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
* <h3>Option map</h3>
|
||||||
|
*
|
||||||
|
* An option map property is a dynamic write-only property which allows
|
||||||
|
* the configuration of a {@link Channel} without down-casting its associated
|
||||||
|
* {@link ChannelConfig}. To update an option map, please call {@link #setOptions(Map)}.
|
||||||
|
* <p>
|
||||||
|
* All {@link ChannelConfig} has the following options:
|
||||||
|
* <table>
|
||||||
|
* <tr>
|
||||||
|
* <th>Name</th><th>Associated setter method</th>
|
||||||
|
* </tr><tr>
|
||||||
|
* <td>{@code "connectTimeoutMillis"}</td><td>{@link #setConnectTimeoutMillis(int)}</td>
|
||||||
|
* </tr><tr>
|
||||||
|
* <td>{@code "writeTimeoutMillis"}</td><td>{@link #setWriteTimeoutMillis(int)}</td>
|
||||||
|
* </tr><tr>
|
||||||
|
* <td>{@code "pipelineFactory"}</td><td>{@link #setPipelineFactory(ChannelPipelineFactory)}</td>
|
||||||
|
* </tr>
|
||||||
|
* </table>
|
||||||
|
*
|
||||||
|
* More options are available in the sub-types of {@link ChannelConfig}. For
|
||||||
|
* example, you can configure the parameters which are specific to a TCP/IP
|
||||||
|
* socket as explained in {@link SocketChannelConfig} or {@link NioSocketChannelConfig}.
|
||||||
|
*
|
||||||
* @author The Netty Project (netty-dev@lists.jboss.org)
|
* @author The Netty Project (netty-dev@lists.jboss.org)
|
||||||
* @author Trustin Lee (tlee@redhat.com)
|
* @author Trustin Lee (tlee@redhat.com)
|
||||||
*
|
*
|
||||||
|
@ -29,6 +29,23 @@ import org.jboss.netty.channel.ChannelConfig;
|
|||||||
/**
|
/**
|
||||||
* A {@link ChannelConfig} for a {@link ServerSocketChannel}.
|
* A {@link ChannelConfig} for a {@link ServerSocketChannel}.
|
||||||
*
|
*
|
||||||
|
* <h3>Available options</h3>
|
||||||
|
*
|
||||||
|
* In addition to the options provided by {@link ChannelConfig},
|
||||||
|
* {@link ServerSocketChannelConfig} allows the following options in the
|
||||||
|
* option map:
|
||||||
|
* <table>
|
||||||
|
* <tr>
|
||||||
|
* <th>Name</th><th>Associated setter method</th>
|
||||||
|
* </tr><tr>
|
||||||
|
* <td>{@code "backlog"}</td><td>{@link #setBacklog(int)}</td>
|
||||||
|
* </tr><tr>
|
||||||
|
* <td>{@code "reuseAddress"}</td><td>{@link #setReuseAddress(boolean)}</td>
|
||||||
|
* </tr><tr>
|
||||||
|
* <td>{@code "receiveBufferSize"}</td><td>{@link #setReceiveBufferSize(int)}</td>
|
||||||
|
* </tr>
|
||||||
|
* </table>
|
||||||
|
*
|
||||||
* @author The Netty Project (netty-dev@lists.jboss.org)
|
* @author The Netty Project (netty-dev@lists.jboss.org)
|
||||||
* @author Trustin Lee (tlee@redhat.com)
|
* @author Trustin Lee (tlee@redhat.com)
|
||||||
*
|
*
|
||||||
|
@ -29,6 +29,30 @@ import org.jboss.netty.channel.ChannelConfig;
|
|||||||
/**
|
/**
|
||||||
* A {@link ChannelConfig} for a {@link SocketChannel}.
|
* A {@link ChannelConfig} for a {@link SocketChannel}.
|
||||||
*
|
*
|
||||||
|
* <h3>Available options</h3>
|
||||||
|
*
|
||||||
|
* In addition to the options provided by {@link ChannelConfig},
|
||||||
|
* {@link SocketChannelConfig} allows the following options in the option map:
|
||||||
|
* <table>
|
||||||
|
* <tr>
|
||||||
|
* <th>Name</th><th>Associated setter method</th>
|
||||||
|
* </tr><tr>
|
||||||
|
* <td>{@code "keepAlive"}</td><td>{@link #setKeepAlive(boolean)}</td>
|
||||||
|
* </tr><tr>
|
||||||
|
* <td>{@code "reuseAddress"}</td><td>{@link #setReuseAddress(boolean)}</td>
|
||||||
|
* </tr><tr>
|
||||||
|
* <td>{@code "soLinger"}</td><td>{@link #setSoLinger(int)}</td>
|
||||||
|
* </tr><tr>
|
||||||
|
* <td>{@code "tcpNoDelay"}</td><td>{@link #setTcpNoDelay(boolean)}</td>
|
||||||
|
* </tr><tr>
|
||||||
|
* <td>{@code "receiveBufferSize"}</td><td>{@link #setReceiveBufferSize(int)}</td>
|
||||||
|
* </tr><tr>
|
||||||
|
* <td>{@code "sendBufferSize"}</td><td>{@link #setSendBufferSize(int)}</td>
|
||||||
|
* </tr><tr>
|
||||||
|
* <td>{@code "trafficClass"}</td><td>{@link #setTrafficClass(int)}</td>
|
||||||
|
* </tr>
|
||||||
|
* </table>
|
||||||
|
*
|
||||||
* @author The Netty Project (netty-dev@lists.jboss.org)
|
* @author The Netty Project (netty-dev@lists.jboss.org)
|
||||||
* @author Trustin Lee (tlee@redhat.com)
|
* @author Trustin Lee (tlee@redhat.com)
|
||||||
*
|
*
|
||||||
|
@ -25,12 +25,30 @@ package org.jboss.netty.channel.socket.nio;
|
|||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
import java.nio.channels.WritableByteChannel;
|
import java.nio.channels.WritableByteChannel;
|
||||||
|
|
||||||
|
import org.jboss.netty.channel.ChannelConfig;
|
||||||
import org.jboss.netty.channel.socket.SocketChannel;
|
import org.jboss.netty.channel.socket.SocketChannel;
|
||||||
import org.jboss.netty.channel.socket.SocketChannelConfig;
|
import org.jboss.netty.channel.socket.SocketChannelConfig;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A {@link SocketChannelConfig} for a NIO TCP/IP {@link SocketChannel}.
|
* A {@link SocketChannelConfig} for a NIO TCP/IP {@link SocketChannel}.
|
||||||
*
|
*
|
||||||
|
* <h3>Available options</h3>
|
||||||
|
*
|
||||||
|
* In addition to the options provided by {@link ChannelConfig} and
|
||||||
|
* {@link SocketChannelConfig}, {@link NioSocketChannelConfig} allows the
|
||||||
|
* following options in the option map:
|
||||||
|
* <table>
|
||||||
|
* <tr>
|
||||||
|
* <th>Name</th><th>Associated setter method</th>
|
||||||
|
* </tr><tr>
|
||||||
|
* <td>{@code "writeSpinCount"}</td><td>{@link #setWriteSpinCount(int)}</td>
|
||||||
|
* </tr><tr>
|
||||||
|
* <td>{@code "receiveBufferSizePredictor"}</td><td>{@link #setReceiveBufferSizePredictor(ReceiveBufferSizePredictor)}</td>
|
||||||
|
* </tr><tr>
|
||||||
|
* <td>{@code "readWriteFair"}</td><td>{@link #setReadWriteFair(boolean)}</td>
|
||||||
|
* </tr>
|
||||||
|
* </table>
|
||||||
|
*
|
||||||
* @author The Netty Project (netty-dev@lists.jboss.org)
|
* @author The Netty Project (netty-dev@lists.jboss.org)
|
||||||
* @author Trustin Lee (tlee@redhat.com)
|
* @author Trustin Lee (tlee@redhat.com)
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user