Merge remote branch 'upstream/master'

This commit is contained in:
Jestan Nirojan 2011-12-02 03:39:09 +05:30
commit 78c949f282
627 changed files with 6407 additions and 4280 deletions

1
.gitignore vendored
View File

@ -7,3 +7,4 @@
/*.iml
/*.ipr
/*.iws
/*.geany

56
pom.xml
View File

@ -73,7 +73,7 @@
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
<version>2.3.0</version>
<version>2.4.1</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>
@ -128,7 +128,7 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.6.1</version>
<version>1.6.4</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>
@ -176,19 +176,19 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.2</version>
<version>4.10</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.easymock</groupId>
<artifactId>easymock</artifactId>
<version>2.5.2</version>
<version>3.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.easymock</groupId>
<artifactId>easymockclassextension</artifactId>
<version>2.5.2</version>
<version>3.1</version>
<scope>test</scope>
</dependency>
<dependency>
@ -200,7 +200,7 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.6.1</version>
<version>1.6.4</version>
<scope>test</scope>
</dependency>
</dependencies>
@ -225,7 +225,7 @@
<plugin>
<!-- See org.jboss:jboss-parent -->
<artifactId>maven-enforcer-plugin</artifactId>
<version>1.0</version>
<version>1.0.1</version>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
@ -241,7 +241,7 @@
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.4.3</version>
<version>2.5</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
@ -272,7 +272,7 @@
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.7.2</version>
<version>2.10</version>
<configuration>
<forkMode>once</forkMode>
<excludes>
@ -329,7 +329,7 @@
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.6</version>
<version>1.7</version>
<executions>
<execution>
<id>write-version</id>
@ -434,7 +434,7 @@
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.7</version>
<version>2.8</version>
<executions>
<execution>
<id>generate-javadoc</id>
@ -529,6 +529,36 @@
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.eclipse.wst.css</groupId>
<artifactId>core</artifactId>
<version>1.1.101-v200705302225</version>
<exclusions>
<exclusion>
<groupId>org.apache</groupId>
<artifactId>xerces</artifactId>
</exclusion>
<exclusion>
<groupId>com.ibm</groupId>
<artifactId>icu</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.eclipse.wst.sse</groupId>
<artifactId>core</artifactId>
<version>1.1.202-v200709061102</version>
<exclusions>
<exclusion>
<groupId>org.apache</groupId>
<artifactId>xerces</artifactId>
</exclusion>
<exclusion>
<groupId>com.ibm</groupId>
<artifactId>icu</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.jboss</groupId>
<artifactId>jbossorg-docbook-xslt</artifactId>
@ -615,7 +645,7 @@
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2</version>
<version>2.2.1</version>
<executions>
<execution>
<id>generate-distribution</id>
@ -636,7 +666,7 @@
</plugin>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<version>2.1</version>
<version>2.2.1</version>
<configuration>
<!-- We don't want to use the default release profile because it
causes the JavaDoc and source jars to be deployed twice. -->

View File

@ -43,8 +43,6 @@ import org.jboss.netty.util.ExternalResourceReleasable;
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*
* @apiviz.uses org.jboss.netty.channel.ChannelFactory
*/
public class Bootstrap implements ExternalResourceReleasable {
@ -60,7 +58,6 @@ public class Bootstrap implements ExternalResourceReleasable {
* I/O operation is requested.
*/
protected Bootstrap() {
super();
}
/**

View File

@ -106,8 +106,6 @@ import org.jboss.netty.channel.Channels;
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*
* @apiviz.landmark
*/
public class ClientBootstrap extends Bootstrap {
@ -118,7 +116,6 @@ public class ClientBootstrap extends Bootstrap {
* operation is requested.
*/
public ClientBootstrap() {
super();
}
/**

View File

@ -115,8 +115,6 @@ import org.jboss.netty.channel.Channels;
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*
* @apiviz.landmark
*/
public class ConnectionlessBootstrap extends Bootstrap {
@ -127,7 +125,6 @@ public class ConnectionlessBootstrap extends Bootstrap {
* operation is requested.
*/
public ConnectionlessBootstrap() {
super();
}
/**

View File

@ -156,8 +156,6 @@ import org.jboss.netty.channel.SimpleChannelUpstreamHandler;
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*
* @apiviz.landmark
*/
public class ServerBootstrap extends Bootstrap {
@ -170,7 +168,6 @@ public class ServerBootstrap extends Bootstrap {
* operation is requested.
*/
public ServerBootstrap() {
super();
}
/**

View File

@ -29,8 +29,6 @@ import java.nio.charset.Charset;
*
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*/
public abstract class AbstractChannelBuffer implements ChannelBuffer {
@ -138,6 +136,11 @@ public abstract class AbstractChannelBuffer implements ChannelBuffer {
}
}
@Override
public boolean getBoolean(int index) {
return (getByte(index) == 1);
}
@Override
public short getUnsignedByte(int index) {
return (short) (getByte(index) & 0xFF);
@ -196,6 +199,11 @@ public abstract class AbstractChannelBuffer implements ChannelBuffer {
dst.writerIndex(dst.writerIndex() + length);
}
@Override
public void setBoolean(int index, boolean value) {
setByte(index, value ? 1 : 0);
}
@Override
public void setChar(int index, int value) {
setShort(index, value);
@ -271,6 +279,11 @@ public abstract class AbstractChannelBuffer implements ChannelBuffer {
return getByte(readerIndex ++);
}
@Override
public boolean readBoolean() {
return (readByte() == 1);
}
@Override
public short readUnsignedByte() {
return (short) (readByte() & 0xFF);
@ -427,6 +440,11 @@ public abstract class AbstractChannelBuffer implements ChannelBuffer {
readerIndex = newReaderIndex;
}
@Override
public void writeBoolean(boolean value) {
writeByte(value ? 1 : 0);
}
@Override
public void writeByte(int value) {
setByte(writerIndex ++, value);

View File

@ -22,8 +22,6 @@ import java.nio.ByteOrder;
*
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*/
public abstract class AbstractChannelBufferFactory implements ChannelBufferFactory {

View File

@ -25,8 +25,6 @@ import java.nio.ByteOrder;
*
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*/
public class BigEndianHeapChannelBuffer extends HeapChannelBuffer {

View File

@ -31,9 +31,6 @@ import java.nio.channels.ScatteringByteChannel;
*
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*
*/
public class ByteBufferBackedChannelBuffer extends AbstractChannelBuffer {

View File

@ -232,8 +232,6 @@ import java.nio.charset.UnsupportedCharsetException;
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*
* @apiviz.landmark
*/
public interface ChannelBuffer extends Comparable<ChannelBuffer> {
@ -449,6 +447,17 @@ public interface ChannelBuffer extends Comparable<ChannelBuffer> {
*/
void ensureWritableBytes(int writableBytes);
/**
* Gets a boolean at the specified absolute (@code index) in this buffer.
* This method does not modify the {@code readerIndex} or {@code writerIndex}
* of this buffer.
*
* @throws IndexOutOfBoundsException
* if the specified {@code index} is less than {@code 0} or
* {@code index + 1} is greater than {@code this.capacity}
*/
boolean getBoolean(int index);
/**
* Gets a byte at the specified absolute {@code index} in this buffer.
* This method does not modify {@code readerIndex} or {@code writerIndex} of
@ -720,6 +729,18 @@ public interface ChannelBuffer extends Comparable<ChannelBuffer> {
*/
int getBytes(int index, GatheringByteChannel out, int length) throws IOException;
/**
* Sets the specified boolean at the specified absolute {@code index} in this
* buffer.
* This method does not modify {@code readerIndex} or {@code writerIndex} of
* this buffer.
*
* @throws IndexOutOfBoundsException
* if the specified {@code index} is less than {@code 0} or
* {@code index + 1} is greater than {@code this.capacity}
*/
void setBoolean(int index, boolean value);
/**
* Sets the specified byte at the specified absolute {@code index} in this
* buffer. The 24 high-order bits of the specified value are ignored.
@ -970,6 +991,15 @@ public interface ChannelBuffer extends Comparable<ChannelBuffer> {
*/
void setZero(int index, int length);
/**
* Gets a boolean at the current {@code readerIndex} and increases
* the {@code readerIndex} by {@code 1} in this buffer.
*
* @throws IndexOutOfBoundsException
* if {@code this.readableBytes} is less than {@code 1}
*/
boolean readBoolean();
/**
* Gets a byte at the current {@code readerIndex} and increases
* the {@code readerIndex} by {@code 1} in this buffer.
@ -1229,6 +1259,15 @@ public interface ChannelBuffer extends Comparable<ChannelBuffer> {
*/
void skipBytes(int length);
/**
* Sets the specified boolean at the current {@code writerIndex}
* and increases the {@code writerIndex} by {@code 1} in this buffer.
*
* @throws IndexOutOfBoundsException
* if {@code this.writableBytes} is less than {@code 1}
*/
void writeBoolean(boolean value);
/**
* Sets the specified byte at the current {@code writerIndex}
* and increases the {@code writerIndex} by {@code 1} in this buffer.

View File

@ -23,7 +23,6 @@ import java.nio.ByteOrder;
*
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
* @version $Rev$, $Date$
*/
public interface ChannelBufferFactory {

View File

@ -28,8 +28,6 @@ package org.jboss.netty.buffer;
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*
* @apiviz.uses org.jboss.netty.buffer.ChannelBuffer
*/
public interface ChannelBufferIndexFinder {
@ -47,7 +45,7 @@ public interface ChannelBufferIndexFinder {
/**
* Index finder which locates a {@code NUL (0x00)} byte.
*/
static ChannelBufferIndexFinder NUL = new ChannelBufferIndexFinder() {
ChannelBufferIndexFinder NUL = new ChannelBufferIndexFinder() {
@Override
public boolean find(ChannelBuffer buffer, int guessedIndex) {
return buffer.getByte(guessedIndex) == 0;
@ -57,7 +55,7 @@ public interface ChannelBufferIndexFinder {
/**
* Index finder which locates a non-{@code NUL (0x00)} byte.
*/
static ChannelBufferIndexFinder NOT_NUL = new ChannelBufferIndexFinder() {
ChannelBufferIndexFinder NOT_NUL = new ChannelBufferIndexFinder() {
@Override
public boolean find(ChannelBuffer buffer, int guessedIndex) {
return buffer.getByte(guessedIndex) != 0;
@ -67,7 +65,7 @@ public interface ChannelBufferIndexFinder {
/**
* Index finder which locates a {@code CR ('\r')} byte.
*/
static ChannelBufferIndexFinder CR = new ChannelBufferIndexFinder() {
ChannelBufferIndexFinder CR = new ChannelBufferIndexFinder() {
@Override
public boolean find(ChannelBuffer buffer, int guessedIndex) {
return buffer.getByte(guessedIndex) == '\r';
@ -77,7 +75,7 @@ public interface ChannelBufferIndexFinder {
/**
* Index finder which locates a non-{@code CR ('\r')} byte.
*/
static ChannelBufferIndexFinder NOT_CR = new ChannelBufferIndexFinder() {
ChannelBufferIndexFinder NOT_CR = new ChannelBufferIndexFinder() {
@Override
public boolean find(ChannelBuffer buffer, int guessedIndex) {
return buffer.getByte(guessedIndex) != '\r';
@ -87,7 +85,7 @@ public interface ChannelBufferIndexFinder {
/**
* Index finder which locates a {@code LF ('\n')} byte.
*/
static ChannelBufferIndexFinder LF = new ChannelBufferIndexFinder() {
ChannelBufferIndexFinder LF = new ChannelBufferIndexFinder() {
@Override
public boolean find(ChannelBuffer buffer, int guessedIndex) {
return buffer.getByte(guessedIndex) == '\n';
@ -97,7 +95,7 @@ public interface ChannelBufferIndexFinder {
/**
* Index finder which locates a non-{@code LF ('\n')} byte.
*/
static ChannelBufferIndexFinder NOT_LF = new ChannelBufferIndexFinder() {
ChannelBufferIndexFinder NOT_LF = new ChannelBufferIndexFinder() {
@Override
public boolean find(ChannelBuffer buffer, int guessedIndex) {
return buffer.getByte(guessedIndex) != '\n';
@ -107,7 +105,7 @@ public interface ChannelBufferIndexFinder {
/**
* Index finder which locates a {@code CR ('\r')} or {@code LF ('\n')}.
*/
static ChannelBufferIndexFinder CRLF = new ChannelBufferIndexFinder() {
ChannelBufferIndexFinder CRLF = new ChannelBufferIndexFinder() {
@Override
public boolean find(ChannelBuffer buffer, int guessedIndex) {
byte b = buffer.getByte(guessedIndex);
@ -119,7 +117,7 @@ public interface ChannelBufferIndexFinder {
* Index finder which locates a byte which is neither a {@code CR ('\r')}
* nor a {@code LF ('\n')}.
*/
static ChannelBufferIndexFinder NOT_CRLF = new ChannelBufferIndexFinder() {
ChannelBufferIndexFinder NOT_CRLF = new ChannelBufferIndexFinder() {
@Override
public boolean find(ChannelBuffer buffer, int guessedIndex) {
byte b = buffer.getByte(guessedIndex);
@ -131,7 +129,7 @@ public interface ChannelBufferIndexFinder {
* Index finder which locates a linear whitespace
* ({@code ' '} and {@code '\t'}).
*/
static ChannelBufferIndexFinder LINEAR_WHITESPACE = new ChannelBufferIndexFinder() {
ChannelBufferIndexFinder LINEAR_WHITESPACE = new ChannelBufferIndexFinder() {
@Override
public boolean find(ChannelBuffer buffer, int guessedIndex) {
byte b = buffer.getByte(guessedIndex);
@ -143,7 +141,7 @@ public interface ChannelBufferIndexFinder {
* Index finder which locates a byte which is not a linear whitespace
* (neither {@code ' '} nor {@code '\t'}).
*/
static ChannelBufferIndexFinder NOT_LINEAR_WHITESPACE = new ChannelBufferIndexFinder() {
ChannelBufferIndexFinder NOT_LINEAR_WHITESPACE = new ChannelBufferIndexFinder() {
@Override
public boolean find(ChannelBuffer buffer, int guessedIndex) {
byte b = buffer.getByte(guessedIndex);

View File

@ -35,8 +35,6 @@ import java.io.InputStream;
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*
* @see ChannelBufferOutputStream
* @apiviz.uses org.jboss.netty.buffer.ChannelBuffer
*/

View File

@ -34,8 +34,6 @@ import java.io.OutputStream;
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*
* @see ChannelBufferInputStream
* @apiviz.uses org.jboss.netty.buffer.ChannelBuffer
*/

View File

@ -85,8 +85,6 @@ import org.jboss.netty.util.CharsetUtil;
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*
* @apiviz.landmark
* @apiviz.has org.jboss.netty.buffer.ChannelBuffer oneway - - creates
*/
@ -804,8 +802,7 @@ public class ChannelBuffers {
}
private static ChannelBuffer copiedBuffer(ByteOrder endianness, CharBuffer buffer, Charset charset) {
CharBuffer src = buffer;
ByteBuffer dst = ChannelBuffers.encodeString(src, charset);
ByteBuffer dst = ChannelBuffers.encodeString(buffer, charset);
ChannelBuffer result = wrappedBuffer(endianness, dst.array());
result.writerIndex(dst.remaining());
return result;

View File

@ -35,9 +35,6 @@ import java.util.List;
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
* @author Frederic Bregier (fredbregier@free.fr)
*
* @version $Rev$, $Date$
*
*/
public class CompositeChannelBuffer extends AbstractChannelBuffer {

View File

@ -32,7 +32,6 @@ import java.nio.ByteOrder;
*
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
* @version $Rev$, $Date$
*/
public class DirectChannelBufferFactory extends AbstractChannelBufferFactory {

View File

@ -31,9 +31,6 @@ import java.nio.channels.ScatteringByteChannel;
*
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*
*/
public class DuplicatedChannelBuffer extends AbstractChannelBuffer implements WrappedChannelBuffer {

View File

@ -31,9 +31,6 @@ import java.nio.channels.ScatteringByteChannel;
*
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*
*/
public class DynamicChannelBuffer extends AbstractChannelBuffer {

View File

@ -28,8 +28,6 @@ import java.nio.channels.ScatteringByteChannel;
*
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*/
public abstract class HeapChannelBuffer extends AbstractChannelBuffer {

View File

@ -26,7 +26,6 @@ import java.nio.ByteOrder;
*
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
* @version $Rev$, $Date$
*/
public class HeapChannelBufferFactory extends AbstractChannelBufferFactory {
@ -57,7 +56,6 @@ public class HeapChannelBufferFactory extends AbstractChannelBufferFactory {
* {@link ByteOrder#BIG_ENDIAN}.
*/
public HeapChannelBufferFactory() {
super();
}
/**

View File

@ -25,8 +25,6 @@ import java.nio.ByteOrder;
*
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*/
public class LittleEndianHeapChannelBuffer extends HeapChannelBuffer {

View File

@ -31,9 +31,6 @@ import java.nio.channels.ScatteringByteChannel;
*
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*
*/
public class ReadOnlyChannelBuffer extends AbstractChannelBuffer implements WrappedChannelBuffer {

View File

@ -32,9 +32,6 @@ import java.nio.channels.ScatteringByteChannel;
*
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*
*/
public class SlicedChannelBuffer extends AbstractChannelBuffer implements WrappedChannelBuffer {

View File

@ -32,9 +32,6 @@ import java.nio.channels.ScatteringByteChannel;
*
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*
*/
public class TruncatedChannelBuffer extends AbstractChannelBuffer implements WrappedChannelBuffer {

View File

@ -21,9 +21,6 @@ package org.jboss.netty.buffer;
*
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*
*/
public interface WrappedChannelBuffer extends ChannelBuffer {
/**

View File

@ -26,8 +26,6 @@ import org.jboss.netty.util.internal.ConcurrentHashMap;
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*
*/
public abstract class AbstractChannel implements Channel {

View File

@ -22,8 +22,6 @@ import static org.jboss.netty.channel.Channels.*;
*
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*/
public abstract class AbstractChannelSink implements ChannelSink {
@ -31,7 +29,6 @@ public abstract class AbstractChannelSink implements ChannelSink {
* Creates a new instance.
*/
protected AbstractChannelSink() {
super();
}
/**

View File

@ -32,9 +32,6 @@ import java.net.SocketAddress;
*
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*
*/
public abstract class AbstractServerChannel extends AbstractChannel implements ServerChannel {

View File

@ -30,9 +30,6 @@ import java.util.List;
*
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*
*/
public class AdaptiveReceiveBufferSizePredictor implements
ReceiveBufferSizePredictor {

View File

@ -22,8 +22,6 @@ package org.jboss.netty.channel;
*
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*/
public class AdaptiveReceiveBufferSizePredictorFactory implements
ReceiveBufferSizePredictorFactory {

View File

@ -103,8 +103,6 @@ import org.jboss.netty.channel.socket.nio.NioSocketChannelConfig;
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*
* @apiviz.landmark
* @apiviz.composedOf org.jboss.netty.channel.ChannelConfig
* @apiviz.composedOf org.jboss.netty.channel.ChannelPipeline
@ -117,25 +115,25 @@ public interface Channel extends Comparable<Channel> {
* The {@link #getInterestOps() interestOps} value which tells that only
* read operation has been suspended.
*/
static int OP_NONE = 0;
int OP_NONE = 0;
/**
* The {@link #getInterestOps() interestOps} value which tells that neither
* read nor write operation has been suspended.
*/
static int OP_READ = 1;
int OP_READ = 1;
/**
* The {@link #getInterestOps() interestOps} value which tells that both
* read and write operation has been suspended.
*/
static int OP_WRITE = 4;
int OP_WRITE = 4;
/**
* The {@link #getInterestOps() interestOps} value which tells that only
* write operation has been suspended.
*/
static int OP_READ_WRITE = OP_READ | OP_WRITE;
int OP_READ_WRITE = OP_READ | OP_WRITE;
/**
* Returns the unique integer ID of this channel.

View File

@ -63,8 +63,6 @@ import org.jboss.netty.channel.socket.nio.NioSocketChannelConfig;
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*
* @apiviz.has org.jboss.netty.channel.ChannelPipelineFactory
* @apiviz.composedOf org.jboss.netty.channel.ReceiveBufferSizePredictor
*

View File

@ -71,8 +71,6 @@ package org.jboss.netty.channel;
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*
* @apiviz.exclude ^org\.jboss\.netty\.handler\..*$
*/
public interface ChannelDownstreamHandler extends ChannelHandler {

View File

@ -181,8 +181,6 @@ import org.jboss.netty.channel.socket.ServerSocketChannel;
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*
* @apiviz.landmark
* @apiviz.composedOf org.jboss.netty.channel.ChannelFuture
*/

View File

@ -21,8 +21,6 @@ package org.jboss.netty.channel;
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*
* @apiviz.hidden
*/
public class ChannelException extends RuntimeException {
@ -33,7 +31,6 @@ public class ChannelException extends RuntimeException {
* Creates a new exception.
*/
public ChannelException() {
super();
}
/**

View File

@ -50,8 +50,6 @@ import org.jboss.netty.util.ExternalResourceReleasable;
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*
* @apiviz.landmark
* @apiviz.has org.jboss.netty.channel.Channel oneway - - creates
*

View File

@ -167,8 +167,6 @@ import org.jboss.netty.handler.execution.ExecutionHandler;
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*
* @apiviz.landmark
* @apiviz.owns org.jboss.netty.channel.ChannelFutureListener - - notifies
*/

View File

@ -14,13 +14,11 @@
* under the License.
*/
package org.jboss.netty.channel.socket.http;
package org.jboss.netty.channel;
import java.util.HashSet;
import java.util.Set;
import org.jboss.netty.channel.ChannelFuture;
import org.jboss.netty.channel.ChannelFutureListener;
/**
* Class which is used to consolidate multiple channel futures into one, by
@ -31,24 +29,28 @@ import org.jboss.netty.channel.ChannelFutureListener;
* @author Iain McGinniss (iain.mcginniss@onedrum.com)
* @author OneDrum Ltd.
*/
class ChannelFutureAggregator implements ChannelFutureListener {
public class ChannelFutureAggregator implements ChannelFutureListener {
private final ChannelFuture aggregateFuture;
private final Set<ChannelFuture> pendingFutures;
private Set<ChannelFuture> pendingFutures;
public ChannelFutureAggregator(ChannelFuture aggregateFuture) {
this.aggregateFuture = aggregateFuture;
pendingFutures = new HashSet<ChannelFuture>();
}
public void addFuture(ChannelFuture future) {
synchronized(this) {
if (pendingFutures == null) {
pendingFutures = new HashSet<ChannelFuture>();
}
pendingFutures.add(future);
}
future.addListener(this);
}
@Override
public synchronized void operationComplete(ChannelFuture future)
public void operationComplete(ChannelFuture future)
throws Exception {
if (future.isCancelled()) {
// TODO: what should the correct behaviour be when a fragment is cancelled?
@ -56,17 +58,24 @@ class ChannelFutureAggregator implements ChannelFutureListener {
return;
}
synchronized (this) {
if (pendingFutures == null) {
aggregateFuture.setSuccess();
} else {
pendingFutures.remove(future);
if (!future.isSuccess()) {
aggregateFuture.setFailure(future.getCause());
for (ChannelFuture pendingFuture: pendingFutures) {
pendingFuture.cancel();
}
return;
}
} else {
if (pendingFutures.isEmpty()) {
aggregateFuture.setSuccess();
}
}
}
}
}
}

View File

@ -32,8 +32,6 @@ import java.util.EventListener;
*
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*/
public interface ChannelFutureListener extends EventListener {
@ -41,7 +39,7 @@ public interface ChannelFutureListener extends EventListener {
* A {@link ChannelFutureListener} that closes the {@link Channel} which is
* associated with the specified {@link ChannelFuture}.
*/
static ChannelFutureListener CLOSE = new ChannelFutureListener() {
ChannelFutureListener CLOSE = new ChannelFutureListener() {
@Override
public void operationComplete(ChannelFuture future) {
future.getChannel().close();
@ -52,7 +50,7 @@ public interface ChannelFutureListener extends EventListener {
* A {@link ChannelFutureListener} that closes the {@link Channel} when the
* operation ended up with a failure or cancellation rather than a success.
*/
static ChannelFutureListener CLOSE_ON_FAILURE = new ChannelFutureListener() {
ChannelFutureListener CLOSE_ON_FAILURE = new ChannelFutureListener() {
@Override
public void operationComplete(ChannelFuture future) {
if (!future.isSuccess()) {

View File

@ -38,8 +38,6 @@ package org.jboss.netty.channel;
*
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev: 2080 $, $Date: 2010-01-26 18:04:19 +0900 (Tue, 26 Jan 2010) $
*/
public interface ChannelFutureProgressListener extends ChannelFutureListener {

View File

@ -206,8 +206,6 @@ import org.jboss.netty.channel.group.ChannelGroup;
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*
* @apiviz.landmark
* @apiviz.exclude ^org\.jboss\.netty\.handler\..*$
*/
@ -227,13 +225,12 @@ public interface ChannelHandler {
*
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
* @version $Rev$, $Date$
*/
@Inherited
@Documented
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface Sharable {
@interface Sharable {
// no value
}
}

View File

@ -120,8 +120,6 @@ package org.jboss.netty.channel;
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*
* @apiviz.owns org.jboss.netty.channel.ChannelHandler
*/
public interface ChannelHandlerContext {

View File

@ -23,8 +23,6 @@ package org.jboss.netty.channel;
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*
* @apiviz.hidden
*/
public class ChannelHandlerLifeCycleException extends RuntimeException {
@ -35,7 +33,6 @@ public class ChannelHandlerLifeCycleException extends RuntimeException {
* Creates a new exception.
*/
public ChannelHandlerLifeCycleException() {
super();
}
/**

View File

@ -31,7 +31,6 @@ import org.jboss.netty.util.internal.ConcurrentIdentityWeakKeyHashMap;
*
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
* @version $Rev$, $Date$
*
* @apiviz.stereotype utility
*/

View File

@ -204,8 +204,6 @@ import org.jboss.netty.handler.ssl.SslHandler;
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*
* @apiviz.landmark
* @apiviz.composedOf org.jboss.netty.channel.ChannelHandlerContext
* @apiviz.owns org.jboss.netty.channel.ChannelHandler

View File

@ -23,8 +23,6 @@ package org.jboss.netty.channel;
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*
* @apiviz.hidden
*/
public class ChannelPipelineException extends ChannelException {
@ -35,7 +33,6 @@ public class ChannelPipelineException extends ChannelException {
* Creates a new instance.
*/
public ChannelPipelineException() {
super();
}
/**

View File

@ -35,8 +35,6 @@ import org.jboss.netty.bootstrap.ConnectionlessBootstrap;
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*
* @apiviz.has org.jboss.netty.channel.ChannelPipeline oneway - - creates
*/
public interface ChannelPipelineFactory {

View File

@ -26,8 +26,6 @@ package org.jboss.netty.channel;
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*
* @apiviz.uses org.jboss.netty.channel.ChannelPipeline - - sends events upstream
*/
public interface ChannelSink {

View File

@ -76,8 +76,6 @@ import java.net.SocketAddress;
*
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*/
public enum ChannelState {
/**
@ -100,5 +98,5 @@ public enum ChannelState {
* Represents a {@link Channel}'s {@link Channel#getInterestOps() interestOps}
* property
*/
INTEREST_OPS;
INTEREST_OPS
}

View File

@ -27,8 +27,6 @@ package org.jboss.netty.channel;
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*
* @apiviz.has org.jboss.netty.channel.ChannelState
*/
public interface ChannelStateEvent extends ChannelEvent {

View File

@ -87,8 +87,6 @@ import org.jboss.netty.handler.execution.ExecutionHandler;
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*
* @apiviz.exclude ^org\.jboss\.netty\.handler\..*$
*/
public interface ChannelUpstreamHandler extends ChannelHandler {

View File

@ -50,8 +50,6 @@ import org.jboss.netty.util.internal.ConversionUtil;
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @apiviz.landmark
*
* @version $Rev$, $Date$
*/
public class Channels {

View File

@ -23,8 +23,6 @@ package org.jboss.netty.channel;
*
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*/
public interface ChildChannelStateEvent extends ChannelEvent {

View File

@ -26,8 +26,6 @@ import org.jboss.netty.logging.InternalLoggerFactory;
*
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*/
public abstract class CompleteChannelFuture implements ChannelFuture {

View File

@ -28,22 +28,12 @@ import org.jboss.netty.util.internal.ConversionUtil;
*
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*
*/
public class DefaultChannelConfig implements ChannelConfig {
private volatile ChannelBufferFactory bufferFactory = HeapChannelBufferFactory.getInstance();
private volatile int connectTimeoutMillis = 10000; // 10 seconds
/**
* Creates a new instance.
*/
public DefaultChannelConfig() {
super();
}
@Override
public void setOptions(Map<String, Object> options) {
for (Entry<String, Object> e: options.entrySet()) {

View File

@ -34,8 +34,6 @@ import org.jboss.netty.util.internal.DeadLockProofWorker;
*
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*/
public class DefaultChannelFuture implements ChannelFuture {

View File

@ -32,9 +32,6 @@ import org.jboss.netty.logging.InternalLoggerFactory;
*
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*
*/
public class DefaultChannelPipeline implements ChannelPipeline {
@ -48,13 +45,6 @@ public class DefaultChannelPipeline implements ChannelPipeline {
private final Map<String, DefaultChannelHandlerContext> name2ctx =
new HashMap<String, DefaultChannelHandlerContext>(4);
/**
* Creates a new empty pipeline.
*/
public DefaultChannelPipeline() {
super();
}
@Override
public Channel getChannel() {
return channel;
@ -692,7 +682,7 @@ public class DefaultChannelPipeline implements ChannelPipeline {
private void checkDuplicateName(String name) {
if (name2ctx.containsKey(name)) {
throw new IllegalArgumentException("Duplicate handler name.");
throw new IllegalArgumentException("Duplicate handler name: " + name);
}
}
@ -824,7 +814,6 @@ public class DefaultChannelPipeline implements ChannelPipeline {
private static final class DiscardingChannelSink implements ChannelSink {
DiscardingChannelSink() {
super();
}
@Override

View File

@ -22,9 +22,6 @@ import static org.jboss.netty.channel.Channels.*;
*
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*
*/
public class DefaultChildChannelStateEvent implements ChildChannelStateEvent {

View File

@ -24,9 +24,6 @@ import org.jboss.netty.util.internal.StackTraceSimplifier;
*
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*
*/
public class DefaultExceptionEvent implements ExceptionEvent {

View File

@ -27,21 +27,12 @@ import org.jboss.netty.channel.socket.ServerSocketChannelConfig;
*
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*/
public class DefaultServerChannelConfig implements ChannelConfig {
private volatile ChannelPipelineFactory pipelineFactory;
private volatile ChannelBufferFactory bufferFactory = HeapChannelBufferFactory.getInstance();
/**
* Creates a new instance.
*/
public DefaultServerChannelConfig() {
super();
}
@Override
public void setOptions(Map<String, Object> options) {
for (Entry<String, Object> e: options.entrySet()) {

View File

@ -22,8 +22,6 @@ import static org.jboss.netty.channel.Channels.*;
*
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*/
public class DefaultWriteCompletionEvent implements WriteCompletionEvent {

View File

@ -20,9 +20,6 @@ package org.jboss.netty.channel;
*
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*
*/
public class DownstreamChannelStateEvent implements ChannelStateEvent {

View File

@ -24,9 +24,6 @@ import org.jboss.netty.util.internal.StringUtil;
*
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*
*/
public class DownstreamMessageEvent implements MessageEvent {

View File

@ -24,8 +24,6 @@ package org.jboss.netty.channel;
*
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*/
public interface ExceptionEvent extends ChannelEvent {

View File

@ -22,8 +22,6 @@ package org.jboss.netty.channel;
*
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*/
public class FailedChannelFuture extends CompleteChannelFuture {

View File

@ -56,7 +56,6 @@ import org.jboss.netty.util.ExternalResourceReleasable;
*
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
* @version $Rev: 2080 $, $Date: 2010-01-26 18:04:19 +0900 (Tue, 26 Jan 2010) $
*/
public interface FileRegion extends ExternalResourceReleasable {

View File

@ -22,8 +22,6 @@ package org.jboss.netty.channel;
*
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*/
public class FixedReceiveBufferSizePredictor implements
ReceiveBufferSizePredictor {

View File

@ -22,8 +22,6 @@ package org.jboss.netty.channel;
*
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*/
public class FixedReceiveBufferSizePredictorFactory implements
ReceiveBufferSizePredictorFactory {

View File

@ -30,7 +30,6 @@ package org.jboss.netty.channel;
*
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
* @version $Rev$, $Date$
*/
public interface LifeCycleAwareChannelHandler extends ChannelHandler {
void beforeAdd(ChannelHandlerContext ctx) throws Exception;

View File

@ -27,8 +27,6 @@ import java.net.SocketAddress;
*
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*/
public interface MessageEvent extends ChannelEvent {

View File

@ -32,9 +32,6 @@ import org.jboss.netty.buffer.ChannelBuffer;
*
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*
*/
public interface ReceiveBufferSizePredictor {

View File

@ -21,8 +21,6 @@ package org.jboss.netty.channel;
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*
* @apiviz.has org.jboss.netty.channel.ReceiveBufferSizePredictor oneway - - creates
*/
public interface ReceiveBufferSizePredictorFactory {

View File

@ -24,7 +24,6 @@ import org.jboss.netty.channel.socket.ServerSocketChannel;
*
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
* @version $Rev$, $Date$
*/
public interface ServerChannel extends Channel {
// This is a tag interface.

View File

@ -21,8 +21,6 @@ package org.jboss.netty.channel;
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*
* @apiviz.has org.jboss.netty.channel.ServerChannel oneway - - creates
*/
public interface ServerChannelFactory extends ChannelFactory {

View File

@ -52,8 +52,6 @@ import java.net.SocketAddress;
*
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*/
public class SimpleChannelDownstreamHandler implements ChannelDownstreamHandler {
@ -61,7 +59,6 @@ public class SimpleChannelDownstreamHandler implements ChannelDownstreamHandler
* Creates a new instance.
*/
public SimpleChannelDownstreamHandler() {
super();
}
/**

View File

@ -73,8 +73,6 @@ import org.jboss.netty.logging.InternalLoggerFactory;
*
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*/
public class SimpleChannelHandler implements ChannelUpstreamHandler, ChannelDownstreamHandler {
@ -85,7 +83,6 @@ public class SimpleChannelHandler implements ChannelUpstreamHandler, ChannelDown
* Creates a new instance.
*/
public SimpleChannelHandler() {
super();
}
/**

View File

@ -53,8 +53,6 @@ import org.jboss.netty.logging.InternalLoggerFactory;
*
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*/
public class SimpleChannelUpstreamHandler implements ChannelUpstreamHandler {
@ -65,7 +63,6 @@ public class SimpleChannelUpstreamHandler implements ChannelUpstreamHandler {
* Creates a new instance.
*/
public SimpleChannelUpstreamHandler() {
super();
}
/**

View File

@ -33,9 +33,6 @@ import org.jboss.netty.util.internal.ConversionUtil;
*
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*
*/
public class StaticChannelPipeline implements ChannelPipeline {

View File

@ -22,8 +22,6 @@ package org.jboss.netty.channel;
*
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*/
public class SucceededChannelFuture extends CompleteChannelFuture {

View File

@ -22,9 +22,6 @@ import static org.jboss.netty.channel.Channels.*;
*
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*
*/
public class UpstreamChannelStateEvent implements ChannelStateEvent {

View File

@ -26,9 +26,6 @@ import org.jboss.netty.util.internal.StringUtil;
*
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*
*/
public class UpstreamMessageEvent implements MessageEvent {

View File

@ -24,8 +24,6 @@ package org.jboss.netty.channel;
*
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*/
public interface WriteCompletionEvent extends ChannelEvent {
/**

View File

@ -90,7 +90,6 @@ import org.jboss.netty.util.CharsetUtil;
*
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
* @version $Rev$, $Date$
*
* @apiviz.landmark
* @apiviz.has org.jboss.netty.channel.group.ChannelGroupFuture oneway - - returns

View File

@ -110,7 +110,6 @@ import org.jboss.netty.handler.execution.ExecutionHandler;
*
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
* @version $Rev$, $Date$
*
* @apiviz.owns org.jboss.netty.channel.group.ChannelGroupFutureListener - - notifies
*/

View File

@ -25,8 +25,6 @@ import java.util.EventListener;
*
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*/
public interface ChannelGroupFutureListener extends EventListener {

View File

@ -21,7 +21,6 @@ import java.util.NoSuchElementException;
/**
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
* @version $Rev$, $Date$
*/
final class CombinedIterator<E> implements Iterator<E> {
@ -59,8 +58,7 @@ final class CombinedIterator<E> implements Iterator<E> {
@Override
public E next() {
try {
E e = currentIterator.next();
return e;
return currentIterator.next();
} catch (NoSuchElementException e) {
if (currentIterator == i1) {
currentIterator = i2;

View File

@ -37,7 +37,6 @@ import org.jboss.netty.util.internal.ConcurrentHashMap;
*
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
* @version $Rev$, $Date$
*
* @apiviz.landmark
*/

View File

@ -38,8 +38,6 @@ import org.jboss.netty.util.internal.DeadLockProofWorker;
*
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
*
* @version $Rev$, $Date$
*/
public class DefaultChannelGroupFuture implements ChannelGroupFuture {

View File

@ -20,14 +20,20 @@ import java.io.OutputStream;
import java.net.SocketAddress;
/**
* A {@link java.net.SocketAddress} implementation holding an {@link java.io.InputStream} and an {@link java.io.OutputStream} instance used as
* "remote" address to connect to with a {@link IOStreamChannel}.
* A {@link java.net.SocketAddress} implementation holding an
* {@link java.io.InputStream} and an {@link java.io.OutputStream} instance used
* as "remote" address to connect to with a {@link IOStreamChannel}.
*
* @author Daniel Bimschas
* @author Dennis Pfisterer
*/
public class IOStreamAddress extends SocketAddress {
/**
*
*/
private static final long serialVersionUID = -4382415449059935960L;
private final InputStream inputStream;
private final OutputStream outputStream;

View File

@ -15,13 +15,13 @@
*/
package org.jboss.netty.channel.iostream;
import org.jboss.netty.channel.*;
import java.net.SocketAddress;
/**
* A channel to an {@link java.io.InputStream} and an {@link java.io.OutputStream}.
* A channel to an {@link java.io.InputStream} and an
* {@link java.io.OutputStream}.
*
* @author Daniel Bimschas
* @author Dennis Pfisterer

View File

@ -26,8 +26,8 @@ import java.util.concurrent.ExecutorService;
import static org.jboss.netty.channel.Channels.*;
/**
* A {@link org.jboss.netty.channel.ChannelSink} implementation which reads from an {@link java.io.InputStream} and
* writes to an {@link java.io.OutputStream}.
* A {@link org.jboss.netty.channel.ChannelSink} implementation which reads from
* an {@link java.io.InputStream} and writes to an {@link java.io.OutputStream}.
*
* @author Daniel Bimschas
* @author Dennis Pfisterer
@ -115,7 +115,7 @@ public class IOStreamChannelSink extends AbstractChannelSink {
private PushbackInputStream inputStream;
private ChannelConfig config = new DefaultChannelConfig();
private final ChannelConfig config = new DefaultChannelConfig();
@Override
public void eventSunk(final ChannelPipeline pipeline, final ChannelEvent e) throws Exception {
@ -168,10 +168,7 @@ public class IOStreamChannelSink extends AbstractChannelSink {
future.setSuccess();
} else {
throw new IllegalArgumentException(
"Only ChannelBuffer objects are supported to be written onto the IOStreamChannelSink! "
+ "Please check if the encoder pipeline is configured correctly."
);
throw new IllegalArgumentException("Only ChannelBuffer objects are supported to be written onto the IOStreamChannelSink! " + "Please check if the encoder pipeline is configured correctly.");
}
}
}

View File

@ -39,7 +39,6 @@ import org.jboss.netty.util.internal.ThreadLocalBoolean;
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author Andy Taylor (andy.taylor@jboss.org)
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
* @version $Rev$, $Date$
*/
final class DefaultLocalChannel extends AbstractChannel implements LocalChannel {
@ -59,7 +58,16 @@ final class DefaultLocalChannel extends AbstractChannel implements LocalChannel
volatile LocalAddress localAddress;
volatile LocalAddress remoteAddress;
DefaultLocalChannel(LocalServerChannel parent, ChannelFactory factory, ChannelPipeline pipeline, ChannelSink sink, DefaultLocalChannel pairedChannel) {
static DefaultLocalChannel create(LocalServerChannel parent,
ChannelFactory factory, ChannelPipeline pipeline, ChannelSink sink,
DefaultLocalChannel pairedChannel) {
DefaultLocalChannel instance = new DefaultLocalChannel(parent, factory, pipeline, sink,
pairedChannel);
fireChannelOpen(instance);
return instance;
}
private DefaultLocalChannel(LocalServerChannel parent, ChannelFactory factory, ChannelPipeline pipeline, ChannelSink sink, DefaultLocalChannel pairedChannel) {
super(parent, factory, pipeline, sink);
this.pairedChannel = pairedChannel;
config = new DefaultChannelConfig();
@ -73,7 +81,6 @@ final class DefaultLocalChannel extends AbstractChannel implements LocalChannel
}
});
fireChannelOpen(this);
}
@Override
@ -96,7 +103,7 @@ final class DefaultLocalChannel extends AbstractChannel implements LocalChannel
return state.get() == ST_CONNECTED;
}
final void setBound() throws ClosedChannelException {
void setBound() throws ClosedChannelException {
if (!state.compareAndSet(ST_OPEN, ST_BOUND)) {
switch (state.get()) {
case ST_CLOSED:
@ -107,7 +114,7 @@ final class DefaultLocalChannel extends AbstractChannel implements LocalChannel
}
}
final void setConnected() {
void setConnected() {
if (state.get() != ST_CLOSED) {
state.set(ST_CONNECTED);
}

View File

@ -24,7 +24,6 @@ import org.jboss.netty.channel.ChannelSink;
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author Andy Taylor (andy.taylor@jboss.org)
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
* @version $Rev$, $Date$
*
* @apiviz.landmark
*/
@ -41,7 +40,7 @@ public class DefaultLocalClientChannelFactory implements LocalClientChannelFacto
@Override
public LocalChannel newChannel(ChannelPipeline pipeline) {
return new DefaultLocalChannel(null, this, pipeline, sink, null);
return DefaultLocalChannel.create(null, this, pipeline, sink, null);
}
/**

View File

@ -30,19 +30,28 @@ import org.jboss.netty.channel.DefaultServerChannelConfig;
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author Andy Taylor (andy.taylor@jboss.org)
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
* @version $Rev$, $Date$
*/
final class DefaultLocalServerChannel extends AbstractServerChannel
implements LocalServerChannel {
final class DefaultLocalServerChannel extends AbstractServerChannel implements
LocalServerChannel {
final ChannelConfig channelConfig;
final AtomicBoolean bound = new AtomicBoolean();
volatile LocalAddress localAddress;
DefaultLocalServerChannel(ChannelFactory factory, ChannelPipeline pipeline, ChannelSink sink) {
static DefaultLocalServerChannel create(ChannelFactory factory,
ChannelPipeline pipeline, ChannelSink sink) {
DefaultLocalServerChannel instance =
new DefaultLocalServerChannel(factory, pipeline, sink);
fireChannelOpen(instance);
return instance;
}
private DefaultLocalServerChannel(ChannelFactory factory,
ChannelPipeline pipeline, ChannelSink sink) {
super(factory, pipeline, sink);
channelConfig = new DefaultServerChannelConfig();
fireChannelOpen(this);
}
@Override

View File

@ -24,7 +24,6 @@ import org.jboss.netty.channel.ChannelSink;
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author Andy Taylor (andy.taylor@jboss.org)
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
* @version $Rev$, $Date$
*
* @apiviz.landmark
*/
@ -32,16 +31,9 @@ public class DefaultLocalServerChannelFactory implements LocalServerChannelFacto
private final ChannelSink sink = new LocalServerChannelSink();
/**
* Creates a new instance.
*/
public DefaultLocalServerChannelFactory() {
super();
}
@Override
public LocalServerChannel newChannel(ChannelPipeline pipeline) {
return new DefaultLocalServerChannel(this, pipeline, sink);
return DefaultLocalServerChannel.create(this, pipeline, sink);
}
/**

View File

@ -31,7 +31,6 @@ import java.net.SocketAddress;
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author Andy Taylor (andy.taylor@jboss.org)
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
* @version $Rev$, $Date$
*
* @apiviz.landmark
*/
@ -115,7 +114,7 @@ public final class LocalAddress extends SocketAddress implements Comparable<Loca
}
int a = System.identityHashCode(this);
int b = System.identityHashCode(this);
int b = System.identityHashCode(o);
if (a < b) {
return -1;
} else if (a > b) {

View File

@ -23,7 +23,6 @@ import org.jboss.netty.channel.Channel;
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author Andy Taylor (andy.taylor@jboss.org)
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
* @version $Rev$, $Date$
*/
public interface LocalChannel extends Channel {
@Override

View File

@ -23,7 +23,6 @@ import org.jboss.netty.util.internal.ConcurrentHashMap;
/**
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
* @version $Rev$, $Date$
*/
final class LocalChannelRegistry {

Some files were not shown because too many files have changed in this diff Show More