Merge remote branch 'upstream/master'
This commit is contained in:
commit
78c949f282
1
.gitignore
vendored
1
.gitignore
vendored
@ -7,3 +7,4 @@
|
|||||||
/*.iml
|
/*.iml
|
||||||
/*.ipr
|
/*.ipr
|
||||||
/*.iws
|
/*.iws
|
||||||
|
/*.geany
|
||||||
|
56
pom.xml
56
pom.xml
@ -73,7 +73,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google.protobuf</groupId>
|
<groupId>com.google.protobuf</groupId>
|
||||||
<artifactId>protobuf-java</artifactId>
|
<artifactId>protobuf-java</artifactId>
|
||||||
<version>2.3.0</version>
|
<version>2.4.1</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
<optional>true</optional>
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
@ -128,7 +128,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.slf4j</groupId>
|
<groupId>org.slf4j</groupId>
|
||||||
<artifactId>slf4j-api</artifactId>
|
<artifactId>slf4j-api</artifactId>
|
||||||
<version>1.6.1</version>
|
<version>1.6.4</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
<optional>true</optional>
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
@ -176,19 +176,19 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>junit</groupId>
|
<groupId>junit</groupId>
|
||||||
<artifactId>junit</artifactId>
|
<artifactId>junit</artifactId>
|
||||||
<version>4.8.2</version>
|
<version>4.10</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.easymock</groupId>
|
<groupId>org.easymock</groupId>
|
||||||
<artifactId>easymock</artifactId>
|
<artifactId>easymock</artifactId>
|
||||||
<version>2.5.2</version>
|
<version>3.1</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.easymock</groupId>
|
<groupId>org.easymock</groupId>
|
||||||
<artifactId>easymockclassextension</artifactId>
|
<artifactId>easymockclassextension</artifactId>
|
||||||
<version>2.5.2</version>
|
<version>3.1</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -200,7 +200,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.slf4j</groupId>
|
<groupId>org.slf4j</groupId>
|
||||||
<artifactId>slf4j-simple</artifactId>
|
<artifactId>slf4j-simple</artifactId>
|
||||||
<version>1.6.1</version>
|
<version>1.6.4</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
@ -225,7 +225,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<!-- See org.jboss:jboss-parent -->
|
<!-- See org.jboss:jboss-parent -->
|
||||||
<artifactId>maven-enforcer-plugin</artifactId>
|
<artifactId>maven-enforcer-plugin</artifactId>
|
||||||
<version>1.0</version>
|
<version>1.0.1</version>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
@ -241,7 +241,7 @@
|
|||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-resources-plugin</artifactId>
|
<artifactId>maven-resources-plugin</artifactId>
|
||||||
<version>2.4.3</version>
|
<version>2.5</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<encoding>UTF-8</encoding>
|
<encoding>UTF-8</encoding>
|
||||||
</configuration>
|
</configuration>
|
||||||
@ -272,7 +272,7 @@
|
|||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
<version>2.7.2</version>
|
<version>2.10</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<forkMode>once</forkMode>
|
<forkMode>once</forkMode>
|
||||||
<excludes>
|
<excludes>
|
||||||
@ -329,7 +329,7 @@
|
|||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-antrun-plugin</artifactId>
|
<artifactId>maven-antrun-plugin</artifactId>
|
||||||
<version>1.6</version>
|
<version>1.7</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>write-version</id>
|
<id>write-version</id>
|
||||||
@ -434,7 +434,7 @@
|
|||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-javadoc-plugin</artifactId>
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||||||
<version>2.7</version>
|
<version>2.8</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>generate-javadoc</id>
|
<id>generate-javadoc</id>
|
||||||
@ -529,6 +529,36 @@
|
|||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
<dependencies>
|
<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>
|
<dependency>
|
||||||
<groupId>org.jboss</groupId>
|
<groupId>org.jboss</groupId>
|
||||||
<artifactId>jbossorg-docbook-xslt</artifactId>
|
<artifactId>jbossorg-docbook-xslt</artifactId>
|
||||||
@ -615,7 +645,7 @@
|
|||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-assembly-plugin</artifactId>
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
<version>2.2</version>
|
<version>2.2.1</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>generate-distribution</id>
|
<id>generate-distribution</id>
|
||||||
@ -636,7 +666,7 @@
|
|||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-release-plugin</artifactId>
|
<artifactId>maven-release-plugin</artifactId>
|
||||||
<version>2.1</version>
|
<version>2.2.1</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<!-- We don't want to use the default release profile because it
|
<!-- We don't want to use the default release profile because it
|
||||||
causes the JavaDoc and source jars to be deployed twice. -->
|
causes the JavaDoc and source jars to be deployed twice. -->
|
||||||
|
@ -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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
*
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*
|
|
||||||
* @apiviz.uses org.jboss.netty.channel.ChannelFactory
|
* @apiviz.uses org.jboss.netty.channel.ChannelFactory
|
||||||
*/
|
*/
|
||||||
public class Bootstrap implements ExternalResourceReleasable {
|
public class Bootstrap implements ExternalResourceReleasable {
|
||||||
@ -60,7 +58,6 @@ public class Bootstrap implements ExternalResourceReleasable {
|
|||||||
* I/O operation is requested.
|
* I/O operation is requested.
|
||||||
*/
|
*/
|
||||||
protected Bootstrap() {
|
protected Bootstrap() {
|
||||||
super();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
*
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*
|
|
||||||
* @apiviz.landmark
|
* @apiviz.landmark
|
||||||
*/
|
*/
|
||||||
public class ClientBootstrap extends Bootstrap {
|
public class ClientBootstrap extends Bootstrap {
|
||||||
@ -118,7 +116,6 @@ public class ClientBootstrap extends Bootstrap {
|
|||||||
* operation is requested.
|
* operation is requested.
|
||||||
*/
|
*/
|
||||||
public ClientBootstrap() {
|
public ClientBootstrap() {
|
||||||
super();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
*
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*
|
|
||||||
* @apiviz.landmark
|
* @apiviz.landmark
|
||||||
*/
|
*/
|
||||||
public class ConnectionlessBootstrap extends Bootstrap {
|
public class ConnectionlessBootstrap extends Bootstrap {
|
||||||
@ -127,7 +125,6 @@ public class ConnectionlessBootstrap extends Bootstrap {
|
|||||||
* operation is requested.
|
* operation is requested.
|
||||||
*/
|
*/
|
||||||
public ConnectionlessBootstrap() {
|
public ConnectionlessBootstrap() {
|
||||||
super();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
*
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*
|
|
||||||
* @apiviz.landmark
|
* @apiviz.landmark
|
||||||
*/
|
*/
|
||||||
public class ServerBootstrap extends Bootstrap {
|
public class ServerBootstrap extends Bootstrap {
|
||||||
@ -170,7 +168,6 @@ public class ServerBootstrap extends Bootstrap {
|
|||||||
* operation is requested.
|
* operation is requested.
|
||||||
*/
|
*/
|
||||||
public ServerBootstrap() {
|
public ServerBootstrap() {
|
||||||
super();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*/
|
*/
|
||||||
public abstract class AbstractChannelBuffer implements ChannelBuffer {
|
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
|
@Override
|
||||||
public short getUnsignedByte(int index) {
|
public short getUnsignedByte(int index) {
|
||||||
return (short) (getByte(index) & 0xFF);
|
return (short) (getByte(index) & 0xFF);
|
||||||
@ -196,6 +199,11 @@ public abstract class AbstractChannelBuffer implements ChannelBuffer {
|
|||||||
dst.writerIndex(dst.writerIndex() + length);
|
dst.writerIndex(dst.writerIndex() + length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setBoolean(int index, boolean value) {
|
||||||
|
setByte(index, value ? 1 : 0);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setChar(int index, int value) {
|
public void setChar(int index, int value) {
|
||||||
setShort(index, value);
|
setShort(index, value);
|
||||||
@ -271,6 +279,11 @@ public abstract class AbstractChannelBuffer implements ChannelBuffer {
|
|||||||
return getByte(readerIndex ++);
|
return getByte(readerIndex ++);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean readBoolean() {
|
||||||
|
return (readByte() == 1);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public short readUnsignedByte() {
|
public short readUnsignedByte() {
|
||||||
return (short) (readByte() & 0xFF);
|
return (short) (readByte() & 0xFF);
|
||||||
@ -427,6 +440,11 @@ public abstract class AbstractChannelBuffer implements ChannelBuffer {
|
|||||||
readerIndex = newReaderIndex;
|
readerIndex = newReaderIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void writeBoolean(boolean value) {
|
||||||
|
writeByte(value ? 1 : 0);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void writeByte(int value) {
|
public void writeByte(int value) {
|
||||||
setByte(writerIndex ++, value);
|
setByte(writerIndex ++, value);
|
||||||
|
@ -22,8 +22,6 @@ import java.nio.ByteOrder;
|
|||||||
*
|
*
|
||||||
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
|
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*/
|
*/
|
||||||
public abstract class AbstractChannelBufferFactory implements ChannelBufferFactory {
|
public abstract class AbstractChannelBufferFactory implements ChannelBufferFactory {
|
||||||
|
|
||||||
|
@ -25,8 +25,6 @@ import java.nio.ByteOrder;
|
|||||||
*
|
*
|
||||||
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
|
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*/
|
*/
|
||||||
public class BigEndianHeapChannelBuffer extends HeapChannelBuffer {
|
public class BigEndianHeapChannelBuffer extends HeapChannelBuffer {
|
||||||
|
|
||||||
|
@ -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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public class ByteBufferBackedChannelBuffer extends AbstractChannelBuffer {
|
public class ByteBufferBackedChannelBuffer extends AbstractChannelBuffer {
|
||||||
|
|
||||||
|
@ -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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
*
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*
|
|
||||||
* @apiviz.landmark
|
* @apiviz.landmark
|
||||||
*/
|
*/
|
||||||
public interface ChannelBuffer extends Comparable<ChannelBuffer> {
|
public interface ChannelBuffer extends Comparable<ChannelBuffer> {
|
||||||
@ -449,6 +447,17 @@ public interface ChannelBuffer extends Comparable<ChannelBuffer> {
|
|||||||
*/
|
*/
|
||||||
void ensureWritableBytes(int writableBytes);
|
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.
|
* Gets a byte at the specified absolute {@code index} in this buffer.
|
||||||
* This method does not modify {@code readerIndex} or {@code writerIndex} of
|
* 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;
|
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
|
* Sets the specified byte at the specified absolute {@code index} in this
|
||||||
* buffer. The 24 high-order bits of the specified value are ignored.
|
* 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);
|
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
|
* Gets a byte at the current {@code readerIndex} and increases
|
||||||
* the {@code readerIndex} by {@code 1} in this buffer.
|
* the {@code readerIndex} by {@code 1} in this buffer.
|
||||||
@ -1229,6 +1259,15 @@ public interface ChannelBuffer extends Comparable<ChannelBuffer> {
|
|||||||
*/
|
*/
|
||||||
void skipBytes(int length);
|
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}
|
* Sets the specified byte at the current {@code writerIndex}
|
||||||
* and increases the {@code writerIndex} by {@code 1} in this buffer.
|
* and increases the {@code writerIndex} by {@code 1} in this buffer.
|
||||||
|
@ -23,7 +23,6 @@ import java.nio.ByteOrder;
|
|||||||
*
|
*
|
||||||
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
|
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*/
|
*/
|
||||||
public interface ChannelBufferFactory {
|
public interface ChannelBufferFactory {
|
||||||
|
|
||||||
|
@ -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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
*
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*
|
|
||||||
* @apiviz.uses org.jboss.netty.buffer.ChannelBuffer
|
* @apiviz.uses org.jboss.netty.buffer.ChannelBuffer
|
||||||
*/
|
*/
|
||||||
public interface ChannelBufferIndexFinder {
|
public interface ChannelBufferIndexFinder {
|
||||||
@ -47,7 +45,7 @@ public interface ChannelBufferIndexFinder {
|
|||||||
/**
|
/**
|
||||||
* Index finder which locates a {@code NUL (0x00)} byte.
|
* Index finder which locates a {@code NUL (0x00)} byte.
|
||||||
*/
|
*/
|
||||||
static ChannelBufferIndexFinder NUL = new ChannelBufferIndexFinder() {
|
ChannelBufferIndexFinder NUL = new ChannelBufferIndexFinder() {
|
||||||
@Override
|
@Override
|
||||||
public boolean find(ChannelBuffer buffer, int guessedIndex) {
|
public boolean find(ChannelBuffer buffer, int guessedIndex) {
|
||||||
return buffer.getByte(guessedIndex) == 0;
|
return buffer.getByte(guessedIndex) == 0;
|
||||||
@ -57,7 +55,7 @@ public interface ChannelBufferIndexFinder {
|
|||||||
/**
|
/**
|
||||||
* Index finder which locates a non-{@code NUL (0x00)} byte.
|
* Index finder which locates a non-{@code NUL (0x00)} byte.
|
||||||
*/
|
*/
|
||||||
static ChannelBufferIndexFinder NOT_NUL = new ChannelBufferIndexFinder() {
|
ChannelBufferIndexFinder NOT_NUL = new ChannelBufferIndexFinder() {
|
||||||
@Override
|
@Override
|
||||||
public boolean find(ChannelBuffer buffer, int guessedIndex) {
|
public boolean find(ChannelBuffer buffer, int guessedIndex) {
|
||||||
return buffer.getByte(guessedIndex) != 0;
|
return buffer.getByte(guessedIndex) != 0;
|
||||||
@ -67,7 +65,7 @@ public interface ChannelBufferIndexFinder {
|
|||||||
/**
|
/**
|
||||||
* Index finder which locates a {@code CR ('\r')} byte.
|
* Index finder which locates a {@code CR ('\r')} byte.
|
||||||
*/
|
*/
|
||||||
static ChannelBufferIndexFinder CR = new ChannelBufferIndexFinder() {
|
ChannelBufferIndexFinder CR = new ChannelBufferIndexFinder() {
|
||||||
@Override
|
@Override
|
||||||
public boolean find(ChannelBuffer buffer, int guessedIndex) {
|
public boolean find(ChannelBuffer buffer, int guessedIndex) {
|
||||||
return buffer.getByte(guessedIndex) == '\r';
|
return buffer.getByte(guessedIndex) == '\r';
|
||||||
@ -77,7 +75,7 @@ public interface ChannelBufferIndexFinder {
|
|||||||
/**
|
/**
|
||||||
* Index finder which locates a non-{@code CR ('\r')} byte.
|
* Index finder which locates a non-{@code CR ('\r')} byte.
|
||||||
*/
|
*/
|
||||||
static ChannelBufferIndexFinder NOT_CR = new ChannelBufferIndexFinder() {
|
ChannelBufferIndexFinder NOT_CR = new ChannelBufferIndexFinder() {
|
||||||
@Override
|
@Override
|
||||||
public boolean find(ChannelBuffer buffer, int guessedIndex) {
|
public boolean find(ChannelBuffer buffer, int guessedIndex) {
|
||||||
return buffer.getByte(guessedIndex) != '\r';
|
return buffer.getByte(guessedIndex) != '\r';
|
||||||
@ -87,7 +85,7 @@ public interface ChannelBufferIndexFinder {
|
|||||||
/**
|
/**
|
||||||
* Index finder which locates a {@code LF ('\n')} byte.
|
* Index finder which locates a {@code LF ('\n')} byte.
|
||||||
*/
|
*/
|
||||||
static ChannelBufferIndexFinder LF = new ChannelBufferIndexFinder() {
|
ChannelBufferIndexFinder LF = new ChannelBufferIndexFinder() {
|
||||||
@Override
|
@Override
|
||||||
public boolean find(ChannelBuffer buffer, int guessedIndex) {
|
public boolean find(ChannelBuffer buffer, int guessedIndex) {
|
||||||
return buffer.getByte(guessedIndex) == '\n';
|
return buffer.getByte(guessedIndex) == '\n';
|
||||||
@ -97,7 +95,7 @@ public interface ChannelBufferIndexFinder {
|
|||||||
/**
|
/**
|
||||||
* Index finder which locates a non-{@code LF ('\n')} byte.
|
* Index finder which locates a non-{@code LF ('\n')} byte.
|
||||||
*/
|
*/
|
||||||
static ChannelBufferIndexFinder NOT_LF = new ChannelBufferIndexFinder() {
|
ChannelBufferIndexFinder NOT_LF = new ChannelBufferIndexFinder() {
|
||||||
@Override
|
@Override
|
||||||
public boolean find(ChannelBuffer buffer, int guessedIndex) {
|
public boolean find(ChannelBuffer buffer, int guessedIndex) {
|
||||||
return buffer.getByte(guessedIndex) != '\n';
|
return buffer.getByte(guessedIndex) != '\n';
|
||||||
@ -107,7 +105,7 @@ public interface ChannelBufferIndexFinder {
|
|||||||
/**
|
/**
|
||||||
* Index finder which locates a {@code CR ('\r')} or {@code LF ('\n')}.
|
* Index finder which locates a {@code CR ('\r')} or {@code LF ('\n')}.
|
||||||
*/
|
*/
|
||||||
static ChannelBufferIndexFinder CRLF = new ChannelBufferIndexFinder() {
|
ChannelBufferIndexFinder CRLF = new ChannelBufferIndexFinder() {
|
||||||
@Override
|
@Override
|
||||||
public boolean find(ChannelBuffer buffer, int guessedIndex) {
|
public boolean find(ChannelBuffer buffer, int guessedIndex) {
|
||||||
byte b = buffer.getByte(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')}
|
* Index finder which locates a byte which is neither a {@code CR ('\r')}
|
||||||
* nor a {@code LF ('\n')}.
|
* nor a {@code LF ('\n')}.
|
||||||
*/
|
*/
|
||||||
static ChannelBufferIndexFinder NOT_CRLF = new ChannelBufferIndexFinder() {
|
ChannelBufferIndexFinder NOT_CRLF = new ChannelBufferIndexFinder() {
|
||||||
@Override
|
@Override
|
||||||
public boolean find(ChannelBuffer buffer, int guessedIndex) {
|
public boolean find(ChannelBuffer buffer, int guessedIndex) {
|
||||||
byte b = buffer.getByte(guessedIndex);
|
byte b = buffer.getByte(guessedIndex);
|
||||||
@ -131,7 +129,7 @@ public interface ChannelBufferIndexFinder {
|
|||||||
* Index finder which locates a linear whitespace
|
* Index finder which locates a linear whitespace
|
||||||
* ({@code ' '} and {@code '\t'}).
|
* ({@code ' '} and {@code '\t'}).
|
||||||
*/
|
*/
|
||||||
static ChannelBufferIndexFinder LINEAR_WHITESPACE = new ChannelBufferIndexFinder() {
|
ChannelBufferIndexFinder LINEAR_WHITESPACE = new ChannelBufferIndexFinder() {
|
||||||
@Override
|
@Override
|
||||||
public boolean find(ChannelBuffer buffer, int guessedIndex) {
|
public boolean find(ChannelBuffer buffer, int guessedIndex) {
|
||||||
byte b = buffer.getByte(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
|
* Index finder which locates a byte which is not a linear whitespace
|
||||||
* (neither {@code ' '} nor {@code '\t'}).
|
* (neither {@code ' '} nor {@code '\t'}).
|
||||||
*/
|
*/
|
||||||
static ChannelBufferIndexFinder NOT_LINEAR_WHITESPACE = new ChannelBufferIndexFinder() {
|
ChannelBufferIndexFinder NOT_LINEAR_WHITESPACE = new ChannelBufferIndexFinder() {
|
||||||
@Override
|
@Override
|
||||||
public boolean find(ChannelBuffer buffer, int guessedIndex) {
|
public boolean find(ChannelBuffer buffer, int guessedIndex) {
|
||||||
byte b = buffer.getByte(guessedIndex);
|
byte b = buffer.getByte(guessedIndex);
|
||||||
|
@ -35,8 +35,6 @@ import java.io.InputStream;
|
|||||||
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
|
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
*
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*
|
|
||||||
* @see ChannelBufferOutputStream
|
* @see ChannelBufferOutputStream
|
||||||
* @apiviz.uses org.jboss.netty.buffer.ChannelBuffer
|
* @apiviz.uses org.jboss.netty.buffer.ChannelBuffer
|
||||||
*/
|
*/
|
||||||
|
@ -34,8 +34,6 @@ import java.io.OutputStream;
|
|||||||
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
|
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
*
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*
|
|
||||||
* @see ChannelBufferInputStream
|
* @see ChannelBufferInputStream
|
||||||
* @apiviz.uses org.jboss.netty.buffer.ChannelBuffer
|
* @apiviz.uses org.jboss.netty.buffer.ChannelBuffer
|
||||||
*/
|
*/
|
||||||
|
@ -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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
*
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*
|
|
||||||
* @apiviz.landmark
|
* @apiviz.landmark
|
||||||
* @apiviz.has org.jboss.netty.buffer.ChannelBuffer oneway - - creates
|
* @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) {
|
private static ChannelBuffer copiedBuffer(ByteOrder endianness, CharBuffer buffer, Charset charset) {
|
||||||
CharBuffer src = buffer;
|
ByteBuffer dst = ChannelBuffers.encodeString(buffer, charset);
|
||||||
ByteBuffer dst = ChannelBuffers.encodeString(src, charset);
|
|
||||||
ChannelBuffer result = wrappedBuffer(endianness, dst.array());
|
ChannelBuffer result = wrappedBuffer(endianness, dst.array());
|
||||||
result.writerIndex(dst.remaining());
|
result.writerIndex(dst.remaining());
|
||||||
return result;
|
return result;
|
||||||
|
@ -35,9 +35,6 @@ import java.util.List;
|
|||||||
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
|
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
* @author Frederic Bregier (fredbregier@free.fr)
|
* @author Frederic Bregier (fredbregier@free.fr)
|
||||||
*
|
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public class CompositeChannelBuffer extends AbstractChannelBuffer {
|
public class CompositeChannelBuffer extends AbstractChannelBuffer {
|
||||||
|
|
||||||
|
@ -32,7 +32,6 @@ import java.nio.ByteOrder;
|
|||||||
*
|
*
|
||||||
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
|
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*/
|
*/
|
||||||
public class DirectChannelBufferFactory extends AbstractChannelBufferFactory {
|
public class DirectChannelBufferFactory extends AbstractChannelBufferFactory {
|
||||||
|
|
||||||
|
@ -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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public class DuplicatedChannelBuffer extends AbstractChannelBuffer implements WrappedChannelBuffer {
|
public class DuplicatedChannelBuffer extends AbstractChannelBuffer implements WrappedChannelBuffer {
|
||||||
|
|
||||||
|
@ -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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public class DynamicChannelBuffer extends AbstractChannelBuffer {
|
public class DynamicChannelBuffer extends AbstractChannelBuffer {
|
||||||
|
|
||||||
|
@ -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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*/
|
*/
|
||||||
public abstract class HeapChannelBuffer extends AbstractChannelBuffer {
|
public abstract class HeapChannelBuffer extends AbstractChannelBuffer {
|
||||||
|
|
||||||
|
@ -26,7 +26,6 @@ import java.nio.ByteOrder;
|
|||||||
*
|
*
|
||||||
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
|
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*/
|
*/
|
||||||
public class HeapChannelBufferFactory extends AbstractChannelBufferFactory {
|
public class HeapChannelBufferFactory extends AbstractChannelBufferFactory {
|
||||||
|
|
||||||
@ -57,7 +56,6 @@ public class HeapChannelBufferFactory extends AbstractChannelBufferFactory {
|
|||||||
* {@link ByteOrder#BIG_ENDIAN}.
|
* {@link ByteOrder#BIG_ENDIAN}.
|
||||||
*/
|
*/
|
||||||
public HeapChannelBufferFactory() {
|
public HeapChannelBufferFactory() {
|
||||||
super();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -25,8 +25,6 @@ import java.nio.ByteOrder;
|
|||||||
*
|
*
|
||||||
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
|
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*/
|
*/
|
||||||
public class LittleEndianHeapChannelBuffer extends HeapChannelBuffer {
|
public class LittleEndianHeapChannelBuffer extends HeapChannelBuffer {
|
||||||
|
|
||||||
|
@ -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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public class ReadOnlyChannelBuffer extends AbstractChannelBuffer implements WrappedChannelBuffer {
|
public class ReadOnlyChannelBuffer extends AbstractChannelBuffer implements WrappedChannelBuffer {
|
||||||
|
|
||||||
|
@ -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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public class SlicedChannelBuffer extends AbstractChannelBuffer implements WrappedChannelBuffer {
|
public class SlicedChannelBuffer extends AbstractChannelBuffer implements WrappedChannelBuffer {
|
||||||
|
|
||||||
|
@ -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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public class TruncatedChannelBuffer extends AbstractChannelBuffer implements WrappedChannelBuffer {
|
public class TruncatedChannelBuffer extends AbstractChannelBuffer implements WrappedChannelBuffer {
|
||||||
|
|
||||||
|
@ -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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public interface WrappedChannelBuffer extends ChannelBuffer {
|
public interface WrappedChannelBuffer extends ChannelBuffer {
|
||||||
/**
|
/**
|
||||||
|
@ -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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
*
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public abstract class AbstractChannel implements Channel {
|
public abstract class AbstractChannel implements Channel {
|
||||||
|
|
||||||
|
@ -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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*/
|
*/
|
||||||
public abstract class AbstractChannelSink implements ChannelSink {
|
public abstract class AbstractChannelSink implements ChannelSink {
|
||||||
|
|
||||||
@ -31,7 +29,6 @@ public abstract class AbstractChannelSink implements ChannelSink {
|
|||||||
* Creates a new instance.
|
* Creates a new instance.
|
||||||
*/
|
*/
|
||||||
protected AbstractChannelSink() {
|
protected AbstractChannelSink() {
|
||||||
super();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -32,9 +32,6 @@ import java.net.SocketAddress;
|
|||||||
*
|
*
|
||||||
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
|
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public abstract class AbstractServerChannel extends AbstractChannel implements ServerChannel {
|
public abstract class AbstractServerChannel extends AbstractChannel implements ServerChannel {
|
||||||
|
|
||||||
|
@ -30,9 +30,6 @@ import java.util.List;
|
|||||||
*
|
*
|
||||||
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
|
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public class AdaptiveReceiveBufferSizePredictor implements
|
public class AdaptiveReceiveBufferSizePredictor implements
|
||||||
ReceiveBufferSizePredictor {
|
ReceiveBufferSizePredictor {
|
||||||
|
@ -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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*/
|
*/
|
||||||
public class AdaptiveReceiveBufferSizePredictorFactory implements
|
public class AdaptiveReceiveBufferSizePredictorFactory implements
|
||||||
ReceiveBufferSizePredictorFactory {
|
ReceiveBufferSizePredictorFactory {
|
||||||
|
@ -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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
*
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*
|
|
||||||
* @apiviz.landmark
|
* @apiviz.landmark
|
||||||
* @apiviz.composedOf org.jboss.netty.channel.ChannelConfig
|
* @apiviz.composedOf org.jboss.netty.channel.ChannelConfig
|
||||||
* @apiviz.composedOf org.jboss.netty.channel.ChannelPipeline
|
* @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
|
* The {@link #getInterestOps() interestOps} value which tells that only
|
||||||
* read operation has been suspended.
|
* read operation has been suspended.
|
||||||
*/
|
*/
|
||||||
static int OP_NONE = 0;
|
int OP_NONE = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The {@link #getInterestOps() interestOps} value which tells that neither
|
* The {@link #getInterestOps() interestOps} value which tells that neither
|
||||||
* read nor write operation has been suspended.
|
* 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
|
* The {@link #getInterestOps() interestOps} value which tells that both
|
||||||
* read and write operation has been suspended.
|
* 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
|
* The {@link #getInterestOps() interestOps} value which tells that only
|
||||||
* write operation has been suspended.
|
* 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.
|
* Returns the unique integer ID of this channel.
|
||||||
|
@ -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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
*
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*
|
|
||||||
* @apiviz.has org.jboss.netty.channel.ChannelPipelineFactory
|
* @apiviz.has org.jboss.netty.channel.ChannelPipelineFactory
|
||||||
* @apiviz.composedOf org.jboss.netty.channel.ReceiveBufferSizePredictor
|
* @apiviz.composedOf org.jboss.netty.channel.ReceiveBufferSizePredictor
|
||||||
*
|
*
|
||||||
|
@ -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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
*
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*
|
|
||||||
* @apiviz.exclude ^org\.jboss\.netty\.handler\..*$
|
* @apiviz.exclude ^org\.jboss\.netty\.handler\..*$
|
||||||
*/
|
*/
|
||||||
public interface ChannelDownstreamHandler extends ChannelHandler {
|
public interface ChannelDownstreamHandler extends ChannelHandler {
|
||||||
|
@ -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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
*
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*
|
|
||||||
* @apiviz.landmark
|
* @apiviz.landmark
|
||||||
* @apiviz.composedOf org.jboss.netty.channel.ChannelFuture
|
* @apiviz.composedOf org.jboss.netty.channel.ChannelFuture
|
||||||
*/
|
*/
|
||||||
|
@ -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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
*
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*
|
|
||||||
* @apiviz.hidden
|
* @apiviz.hidden
|
||||||
*/
|
*/
|
||||||
public class ChannelException extends RuntimeException {
|
public class ChannelException extends RuntimeException {
|
||||||
@ -33,7 +31,6 @@ public class ChannelException extends RuntimeException {
|
|||||||
* Creates a new exception.
|
* Creates a new exception.
|
||||||
*/
|
*/
|
||||||
public ChannelException() {
|
public ChannelException() {
|
||||||
super();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
*
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*
|
|
||||||
* @apiviz.landmark
|
* @apiviz.landmark
|
||||||
* @apiviz.has org.jboss.netty.channel.Channel oneway - - creates
|
* @apiviz.has org.jboss.netty.channel.Channel oneway - - creates
|
||||||
*
|
*
|
||||||
|
@ -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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
*
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*
|
|
||||||
* @apiviz.landmark
|
* @apiviz.landmark
|
||||||
* @apiviz.owns org.jboss.netty.channel.ChannelFutureListener - - notifies
|
* @apiviz.owns org.jboss.netty.channel.ChannelFutureListener - - notifies
|
||||||
*/
|
*/
|
||||||
|
@ -14,13 +14,11 @@
|
|||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jboss.netty.channel.socket.http;
|
package org.jboss.netty.channel;
|
||||||
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Set;
|
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
|
* 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 Iain McGinniss (iain.mcginniss@onedrum.com)
|
||||||
* @author OneDrum Ltd.
|
* @author OneDrum Ltd.
|
||||||
*/
|
*/
|
||||||
class ChannelFutureAggregator implements ChannelFutureListener {
|
public class ChannelFutureAggregator implements ChannelFutureListener {
|
||||||
|
|
||||||
private final ChannelFuture aggregateFuture;
|
private final ChannelFuture aggregateFuture;
|
||||||
|
|
||||||
private final Set<ChannelFuture> pendingFutures;
|
private Set<ChannelFuture> pendingFutures;
|
||||||
|
|
||||||
public ChannelFutureAggregator(ChannelFuture aggregateFuture) {
|
public ChannelFutureAggregator(ChannelFuture aggregateFuture) {
|
||||||
this.aggregateFuture = aggregateFuture;
|
this.aggregateFuture = aggregateFuture;
|
||||||
pendingFutures = new HashSet<ChannelFuture>();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addFuture(ChannelFuture future) {
|
public void addFuture(ChannelFuture future) {
|
||||||
|
synchronized(this) {
|
||||||
|
if (pendingFutures == null) {
|
||||||
|
pendingFutures = new HashSet<ChannelFuture>();
|
||||||
|
}
|
||||||
pendingFutures.add(future);
|
pendingFutures.add(future);
|
||||||
|
}
|
||||||
future.addListener(this);
|
future.addListener(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public synchronized void operationComplete(ChannelFuture future)
|
public void operationComplete(ChannelFuture future)
|
||||||
throws Exception {
|
throws Exception {
|
||||||
if (future.isCancelled()) {
|
if (future.isCancelled()) {
|
||||||
// TODO: what should the correct behaviour be when a fragment is cancelled?
|
// TODO: what should the correct behaviour be when a fragment is cancelled?
|
||||||
@ -56,17 +58,24 @@ class ChannelFutureAggregator implements ChannelFutureListener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
synchronized (this) {
|
||||||
|
if (pendingFutures == null) {
|
||||||
|
aggregateFuture.setSuccess();
|
||||||
|
} else {
|
||||||
pendingFutures.remove(future);
|
pendingFutures.remove(future);
|
||||||
if (!future.isSuccess()) {
|
if (!future.isSuccess()) {
|
||||||
aggregateFuture.setFailure(future.getCause());
|
aggregateFuture.setFailure(future.getCause());
|
||||||
for (ChannelFuture pendingFuture: pendingFutures) {
|
for (ChannelFuture pendingFuture: pendingFutures) {
|
||||||
pendingFuture.cancel();
|
pendingFuture.cancel();
|
||||||
}
|
}
|
||||||
return;
|
} else {
|
||||||
}
|
|
||||||
|
|
||||||
if (pendingFutures.isEmpty()) {
|
if (pendingFutures.isEmpty()) {
|
||||||
aggregateFuture.setSuccess();
|
aggregateFuture.setSuccess();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -32,8 +32,6 @@ import java.util.EventListener;
|
|||||||
*
|
*
|
||||||
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
|
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*/
|
*/
|
||||||
public interface ChannelFutureListener extends EventListener {
|
public interface ChannelFutureListener extends EventListener {
|
||||||
|
|
||||||
@ -41,7 +39,7 @@ public interface ChannelFutureListener extends EventListener {
|
|||||||
* A {@link ChannelFutureListener} that closes the {@link Channel} which is
|
* A {@link ChannelFutureListener} that closes the {@link Channel} which is
|
||||||
* associated with the specified {@link ChannelFuture}.
|
* associated with the specified {@link ChannelFuture}.
|
||||||
*/
|
*/
|
||||||
static ChannelFutureListener CLOSE = new ChannelFutureListener() {
|
ChannelFutureListener CLOSE = new ChannelFutureListener() {
|
||||||
@Override
|
@Override
|
||||||
public void operationComplete(ChannelFuture future) {
|
public void operationComplete(ChannelFuture future) {
|
||||||
future.getChannel().close();
|
future.getChannel().close();
|
||||||
@ -52,7 +50,7 @@ public interface ChannelFutureListener extends EventListener {
|
|||||||
* A {@link ChannelFutureListener} that closes the {@link Channel} when the
|
* A {@link ChannelFutureListener} that closes the {@link Channel} when the
|
||||||
* operation ended up with a failure or cancellation rather than a success.
|
* 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
|
@Override
|
||||||
public void operationComplete(ChannelFuture future) {
|
public void operationComplete(ChannelFuture future) {
|
||||||
if (!future.isSuccess()) {
|
if (!future.isSuccess()) {
|
||||||
|
@ -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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</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 {
|
public interface ChannelFutureProgressListener extends ChannelFutureListener {
|
||||||
|
|
||||||
|
@ -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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
*
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*
|
|
||||||
* @apiviz.landmark
|
* @apiviz.landmark
|
||||||
* @apiviz.exclude ^org\.jboss\.netty\.handler\..*$
|
* @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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*/
|
*/
|
||||||
@Inherited
|
@Inherited
|
||||||
@Documented
|
@Documented
|
||||||
@Target(ElementType.TYPE)
|
@Target(ElementType.TYPE)
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
public @interface Sharable {
|
@interface Sharable {
|
||||||
// no value
|
// no value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
*
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*
|
|
||||||
* @apiviz.owns org.jboss.netty.channel.ChannelHandler
|
* @apiviz.owns org.jboss.netty.channel.ChannelHandler
|
||||||
*/
|
*/
|
||||||
public interface ChannelHandlerContext {
|
public interface ChannelHandlerContext {
|
||||||
|
@ -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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
*
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*
|
|
||||||
* @apiviz.hidden
|
* @apiviz.hidden
|
||||||
*/
|
*/
|
||||||
public class ChannelHandlerLifeCycleException extends RuntimeException {
|
public class ChannelHandlerLifeCycleException extends RuntimeException {
|
||||||
@ -35,7 +33,6 @@ public class ChannelHandlerLifeCycleException extends RuntimeException {
|
|||||||
* Creates a new exception.
|
* Creates a new exception.
|
||||||
*/
|
*/
|
||||||
public ChannelHandlerLifeCycleException() {
|
public ChannelHandlerLifeCycleException() {
|
||||||
super();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*
|
*
|
||||||
* @apiviz.stereotype utility
|
* @apiviz.stereotype utility
|
||||||
*/
|
*/
|
||||||
|
@ -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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
*
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*
|
|
||||||
* @apiviz.landmark
|
* @apiviz.landmark
|
||||||
* @apiviz.composedOf org.jboss.netty.channel.ChannelHandlerContext
|
* @apiviz.composedOf org.jboss.netty.channel.ChannelHandlerContext
|
||||||
* @apiviz.owns org.jboss.netty.channel.ChannelHandler
|
* @apiviz.owns org.jboss.netty.channel.ChannelHandler
|
||||||
|
@ -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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
*
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*
|
|
||||||
* @apiviz.hidden
|
* @apiviz.hidden
|
||||||
*/
|
*/
|
||||||
public class ChannelPipelineException extends ChannelException {
|
public class ChannelPipelineException extends ChannelException {
|
||||||
@ -35,7 +33,6 @@ public class ChannelPipelineException extends ChannelException {
|
|||||||
* Creates a new instance.
|
* Creates a new instance.
|
||||||
*/
|
*/
|
||||||
public ChannelPipelineException() {
|
public ChannelPipelineException() {
|
||||||
super();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
*
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*
|
|
||||||
* @apiviz.has org.jboss.netty.channel.ChannelPipeline oneway - - creates
|
* @apiviz.has org.jboss.netty.channel.ChannelPipeline oneway - - creates
|
||||||
*/
|
*/
|
||||||
public interface ChannelPipelineFactory {
|
public interface ChannelPipelineFactory {
|
||||||
|
@ -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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
*
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*
|
|
||||||
* @apiviz.uses org.jboss.netty.channel.ChannelPipeline - - sends events upstream
|
* @apiviz.uses org.jboss.netty.channel.ChannelPipeline - - sends events upstream
|
||||||
*/
|
*/
|
||||||
public interface ChannelSink {
|
public interface ChannelSink {
|
||||||
|
@ -76,8 +76,6 @@ import java.net.SocketAddress;
|
|||||||
*
|
*
|
||||||
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
|
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*/
|
*/
|
||||||
public enum ChannelState {
|
public enum ChannelState {
|
||||||
/**
|
/**
|
||||||
@ -100,5 +98,5 @@ public enum ChannelState {
|
|||||||
* Represents a {@link Channel}'s {@link Channel#getInterestOps() interestOps}
|
* Represents a {@link Channel}'s {@link Channel#getInterestOps() interestOps}
|
||||||
* property
|
* property
|
||||||
*/
|
*/
|
||||||
INTEREST_OPS;
|
INTEREST_OPS
|
||||||
}
|
}
|
||||||
|
@ -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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
*
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*
|
|
||||||
* @apiviz.has org.jboss.netty.channel.ChannelState
|
* @apiviz.has org.jboss.netty.channel.ChannelState
|
||||||
*/
|
*/
|
||||||
public interface ChannelStateEvent extends ChannelEvent {
|
public interface ChannelStateEvent extends ChannelEvent {
|
||||||
|
@ -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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
*
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*
|
|
||||||
* @apiviz.exclude ^org\.jboss\.netty\.handler\..*$
|
* @apiviz.exclude ^org\.jboss\.netty\.handler\..*$
|
||||||
*/
|
*/
|
||||||
public interface ChannelUpstreamHandler extends ChannelHandler {
|
public interface ChannelUpstreamHandler extends ChannelHandler {
|
||||||
|
@ -50,8 +50,6 @@ import org.jboss.netty.util.internal.ConversionUtil;
|
|||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
*
|
||||||
* @apiviz.landmark
|
* @apiviz.landmark
|
||||||
*
|
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*/
|
*/
|
||||||
public class Channels {
|
public class Channels {
|
||||||
|
|
||||||
|
@ -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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*/
|
*/
|
||||||
public interface ChildChannelStateEvent extends ChannelEvent {
|
public interface ChildChannelStateEvent extends ChannelEvent {
|
||||||
|
|
||||||
|
@ -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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*/
|
*/
|
||||||
public abstract class CompleteChannelFuture implements ChannelFuture {
|
public abstract class CompleteChannelFuture implements ChannelFuture {
|
||||||
|
|
||||||
|
@ -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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public class DefaultChannelConfig implements ChannelConfig {
|
public class DefaultChannelConfig implements ChannelConfig {
|
||||||
|
|
||||||
private volatile ChannelBufferFactory bufferFactory = HeapChannelBufferFactory.getInstance();
|
private volatile ChannelBufferFactory bufferFactory = HeapChannelBufferFactory.getInstance();
|
||||||
private volatile int connectTimeoutMillis = 10000; // 10 seconds
|
private volatile int connectTimeoutMillis = 10000; // 10 seconds
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates a new instance.
|
|
||||||
*/
|
|
||||||
public DefaultChannelConfig() {
|
|
||||||
super();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setOptions(Map<String, Object> options) {
|
public void setOptions(Map<String, Object> options) {
|
||||||
for (Entry<String, Object> e: options.entrySet()) {
|
for (Entry<String, Object> e: options.entrySet()) {
|
||||||
|
@ -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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*/
|
*/
|
||||||
public class DefaultChannelFuture implements ChannelFuture {
|
public class DefaultChannelFuture implements ChannelFuture {
|
||||||
|
|
||||||
|
@ -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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public class DefaultChannelPipeline implements ChannelPipeline {
|
public class DefaultChannelPipeline implements ChannelPipeline {
|
||||||
|
|
||||||
@ -48,13 +45,6 @@ public class DefaultChannelPipeline implements ChannelPipeline {
|
|||||||
private final Map<String, DefaultChannelHandlerContext> name2ctx =
|
private final Map<String, DefaultChannelHandlerContext> name2ctx =
|
||||||
new HashMap<String, DefaultChannelHandlerContext>(4);
|
new HashMap<String, DefaultChannelHandlerContext>(4);
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates a new empty pipeline.
|
|
||||||
*/
|
|
||||||
public DefaultChannelPipeline() {
|
|
||||||
super();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Channel getChannel() {
|
public Channel getChannel() {
|
||||||
return channel;
|
return channel;
|
||||||
@ -692,7 +682,7 @@ public class DefaultChannelPipeline implements ChannelPipeline {
|
|||||||
|
|
||||||
private void checkDuplicateName(String name) {
|
private void checkDuplicateName(String name) {
|
||||||
if (name2ctx.containsKey(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 {
|
private static final class DiscardingChannelSink implements ChannelSink {
|
||||||
DiscardingChannelSink() {
|
DiscardingChannelSink() {
|
||||||
super();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public class DefaultChildChannelStateEvent implements ChildChannelStateEvent {
|
public class DefaultChildChannelStateEvent implements ChildChannelStateEvent {
|
||||||
|
|
||||||
|
@ -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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public class DefaultExceptionEvent implements ExceptionEvent {
|
public class DefaultExceptionEvent implements ExceptionEvent {
|
||||||
|
|
||||||
|
@ -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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*/
|
*/
|
||||||
public class DefaultServerChannelConfig implements ChannelConfig {
|
public class DefaultServerChannelConfig implements ChannelConfig {
|
||||||
|
|
||||||
private volatile ChannelPipelineFactory pipelineFactory;
|
private volatile ChannelPipelineFactory pipelineFactory;
|
||||||
private volatile ChannelBufferFactory bufferFactory = HeapChannelBufferFactory.getInstance();
|
private volatile ChannelBufferFactory bufferFactory = HeapChannelBufferFactory.getInstance();
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates a new instance.
|
|
||||||
*/
|
|
||||||
public DefaultServerChannelConfig() {
|
|
||||||
super();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setOptions(Map<String, Object> options) {
|
public void setOptions(Map<String, Object> options) {
|
||||||
for (Entry<String, Object> e: options.entrySet()) {
|
for (Entry<String, Object> e: options.entrySet()) {
|
||||||
|
@ -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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*/
|
*/
|
||||||
public class DefaultWriteCompletionEvent implements WriteCompletionEvent {
|
public class DefaultWriteCompletionEvent implements WriteCompletionEvent {
|
||||||
|
|
||||||
|
@ -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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public class DownstreamChannelStateEvent implements ChannelStateEvent {
|
public class DownstreamChannelStateEvent implements ChannelStateEvent {
|
||||||
|
|
||||||
|
@ -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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public class DownstreamMessageEvent implements MessageEvent {
|
public class DownstreamMessageEvent implements MessageEvent {
|
||||||
|
|
||||||
|
@ -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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*/
|
*/
|
||||||
public interface ExceptionEvent extends ChannelEvent {
|
public interface ExceptionEvent extends ChannelEvent {
|
||||||
|
|
||||||
|
@ -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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*/
|
*/
|
||||||
public class FailedChannelFuture extends CompleteChannelFuture {
|
public class FailedChannelFuture extends CompleteChannelFuture {
|
||||||
|
|
||||||
|
@ -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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</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 {
|
public interface FileRegion extends ExternalResourceReleasable {
|
||||||
|
|
||||||
|
@ -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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*/
|
*/
|
||||||
public class FixedReceiveBufferSizePredictor implements
|
public class FixedReceiveBufferSizePredictor implements
|
||||||
ReceiveBufferSizePredictor {
|
ReceiveBufferSizePredictor {
|
||||||
|
@ -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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*/
|
*/
|
||||||
public class FixedReceiveBufferSizePredictorFactory implements
|
public class FixedReceiveBufferSizePredictorFactory implements
|
||||||
ReceiveBufferSizePredictorFactory {
|
ReceiveBufferSizePredictorFactory {
|
||||||
|
@ -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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*/
|
*/
|
||||||
public interface LifeCycleAwareChannelHandler extends ChannelHandler {
|
public interface LifeCycleAwareChannelHandler extends ChannelHandler {
|
||||||
void beforeAdd(ChannelHandlerContext ctx) throws Exception;
|
void beforeAdd(ChannelHandlerContext ctx) throws Exception;
|
||||||
|
@ -27,8 +27,6 @@ import java.net.SocketAddress;
|
|||||||
*
|
*
|
||||||
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
|
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*/
|
*/
|
||||||
public interface MessageEvent extends ChannelEvent {
|
public interface MessageEvent extends ChannelEvent {
|
||||||
|
|
||||||
|
@ -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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public interface ReceiveBufferSizePredictor {
|
public interface ReceiveBufferSizePredictor {
|
||||||
|
|
||||||
|
@ -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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
*
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*
|
|
||||||
* @apiviz.has org.jboss.netty.channel.ReceiveBufferSizePredictor oneway - - creates
|
* @apiviz.has org.jboss.netty.channel.ReceiveBufferSizePredictor oneway - - creates
|
||||||
*/
|
*/
|
||||||
public interface ReceiveBufferSizePredictorFactory {
|
public interface ReceiveBufferSizePredictorFactory {
|
||||||
|
@ -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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*/
|
*/
|
||||||
public interface ServerChannel extends Channel {
|
public interface ServerChannel extends Channel {
|
||||||
// This is a tag interface.
|
// This is a tag interface.
|
||||||
|
@ -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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
*
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*
|
|
||||||
* @apiviz.has org.jboss.netty.channel.ServerChannel oneway - - creates
|
* @apiviz.has org.jboss.netty.channel.ServerChannel oneway - - creates
|
||||||
*/
|
*/
|
||||||
public interface ServerChannelFactory extends ChannelFactory {
|
public interface ServerChannelFactory extends ChannelFactory {
|
||||||
|
@ -52,8 +52,6 @@ import java.net.SocketAddress;
|
|||||||
*
|
*
|
||||||
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
|
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*/
|
*/
|
||||||
public class SimpleChannelDownstreamHandler implements ChannelDownstreamHandler {
|
public class SimpleChannelDownstreamHandler implements ChannelDownstreamHandler {
|
||||||
|
|
||||||
@ -61,7 +59,6 @@ public class SimpleChannelDownstreamHandler implements ChannelDownstreamHandler
|
|||||||
* Creates a new instance.
|
* Creates a new instance.
|
||||||
*/
|
*/
|
||||||
public SimpleChannelDownstreamHandler() {
|
public SimpleChannelDownstreamHandler() {
|
||||||
super();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*/
|
*/
|
||||||
public class SimpleChannelHandler implements ChannelUpstreamHandler, ChannelDownstreamHandler {
|
public class SimpleChannelHandler implements ChannelUpstreamHandler, ChannelDownstreamHandler {
|
||||||
|
|
||||||
@ -85,7 +83,6 @@ public class SimpleChannelHandler implements ChannelUpstreamHandler, ChannelDown
|
|||||||
* Creates a new instance.
|
* Creates a new instance.
|
||||||
*/
|
*/
|
||||||
public SimpleChannelHandler() {
|
public SimpleChannelHandler() {
|
||||||
super();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*/
|
*/
|
||||||
public class SimpleChannelUpstreamHandler implements ChannelUpstreamHandler {
|
public class SimpleChannelUpstreamHandler implements ChannelUpstreamHandler {
|
||||||
|
|
||||||
@ -65,7 +63,6 @@ public class SimpleChannelUpstreamHandler implements ChannelUpstreamHandler {
|
|||||||
* Creates a new instance.
|
* Creates a new instance.
|
||||||
*/
|
*/
|
||||||
public SimpleChannelUpstreamHandler() {
|
public SimpleChannelUpstreamHandler() {
|
||||||
super();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public class StaticChannelPipeline implements ChannelPipeline {
|
public class StaticChannelPipeline implements ChannelPipeline {
|
||||||
|
|
||||||
|
@ -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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*/
|
*/
|
||||||
public class SucceededChannelFuture extends CompleteChannelFuture {
|
public class SucceededChannelFuture extends CompleteChannelFuture {
|
||||||
|
|
||||||
|
@ -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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public class UpstreamChannelStateEvent implements ChannelStateEvent {
|
public class UpstreamChannelStateEvent implements ChannelStateEvent {
|
||||||
|
|
||||||
|
@ -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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public class UpstreamMessageEvent implements MessageEvent {
|
public class UpstreamMessageEvent implements MessageEvent {
|
||||||
|
|
||||||
|
@ -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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*/
|
*/
|
||||||
public interface WriteCompletionEvent extends ChannelEvent {
|
public interface WriteCompletionEvent extends ChannelEvent {
|
||||||
/**
|
/**
|
||||||
|
@ -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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*
|
*
|
||||||
* @apiviz.landmark
|
* @apiviz.landmark
|
||||||
* @apiviz.has org.jboss.netty.channel.group.ChannelGroupFuture oneway - - returns
|
* @apiviz.has org.jboss.netty.channel.group.ChannelGroupFuture oneway - - returns
|
||||||
|
@ -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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*
|
*
|
||||||
* @apiviz.owns org.jboss.netty.channel.group.ChannelGroupFutureListener - - notifies
|
* @apiviz.owns org.jboss.netty.channel.group.ChannelGroupFutureListener - - notifies
|
||||||
*/
|
*/
|
||||||
|
@ -25,8 +25,6 @@ import java.util.EventListener;
|
|||||||
*
|
*
|
||||||
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
|
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*/
|
*/
|
||||||
public interface ChannelGroupFutureListener extends EventListener {
|
public interface ChannelGroupFutureListener extends EventListener {
|
||||||
|
|
||||||
|
@ -21,7 +21,6 @@ import java.util.NoSuchElementException;
|
|||||||
/**
|
/**
|
||||||
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
|
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*/
|
*/
|
||||||
final class CombinedIterator<E> implements Iterator<E> {
|
final class CombinedIterator<E> implements Iterator<E> {
|
||||||
|
|
||||||
@ -59,8 +58,7 @@ final class CombinedIterator<E> implements Iterator<E> {
|
|||||||
@Override
|
@Override
|
||||||
public E next() {
|
public E next() {
|
||||||
try {
|
try {
|
||||||
E e = currentIterator.next();
|
return currentIterator.next();
|
||||||
return e;
|
|
||||||
} catch (NoSuchElementException e) {
|
} catch (NoSuchElementException e) {
|
||||||
if (currentIterator == i1) {
|
if (currentIterator == i1) {
|
||||||
currentIterator = i2;
|
currentIterator = i2;
|
||||||
|
@ -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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*
|
*
|
||||||
* @apiviz.landmark
|
* @apiviz.landmark
|
||||||
*/
|
*/
|
||||||
|
@ -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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*
|
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*/
|
*/
|
||||||
public class DefaultChannelGroupFuture implements ChannelGroupFuture {
|
public class DefaultChannelGroupFuture implements ChannelGroupFuture {
|
||||||
|
|
||||||
|
@ -20,14 +20,20 @@ import java.io.OutputStream;
|
|||||||
import java.net.SocketAddress;
|
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
|
* A {@link java.net.SocketAddress} implementation holding an
|
||||||
* "remote" address to connect to with a {@link IOStreamChannel}.
|
* {@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 Daniel Bimschas
|
||||||
* @author Dennis Pfisterer
|
* @author Dennis Pfisterer
|
||||||
*/
|
*/
|
||||||
public class IOStreamAddress extends SocketAddress {
|
public class IOStreamAddress extends SocketAddress {
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = -4382415449059935960L;
|
||||||
|
|
||||||
private final InputStream inputStream;
|
private final InputStream inputStream;
|
||||||
|
|
||||||
private final OutputStream outputStream;
|
private final OutputStream outputStream;
|
||||||
|
@ -15,13 +15,13 @@
|
|||||||
*/
|
*/
|
||||||
package org.jboss.netty.channel.iostream;
|
package org.jboss.netty.channel.iostream;
|
||||||
|
|
||||||
|
|
||||||
import org.jboss.netty.channel.*;
|
import org.jboss.netty.channel.*;
|
||||||
|
|
||||||
import java.net.SocketAddress;
|
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 Daniel Bimschas
|
||||||
* @author Dennis Pfisterer
|
* @author Dennis Pfisterer
|
||||||
|
@ -26,8 +26,8 @@ import java.util.concurrent.ExecutorService;
|
|||||||
import static org.jboss.netty.channel.Channels.*;
|
import static org.jboss.netty.channel.Channels.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A {@link org.jboss.netty.channel.ChannelSink} implementation which reads from an {@link java.io.InputStream} and
|
* A {@link org.jboss.netty.channel.ChannelSink} implementation which reads from
|
||||||
* writes to an {@link java.io.OutputStream}.
|
* an {@link java.io.InputStream} and writes to an {@link java.io.OutputStream}.
|
||||||
*
|
*
|
||||||
* @author Daniel Bimschas
|
* @author Daniel Bimschas
|
||||||
* @author Dennis Pfisterer
|
* @author Dennis Pfisterer
|
||||||
@ -115,7 +115,7 @@ public class IOStreamChannelSink extends AbstractChannelSink {
|
|||||||
|
|
||||||
private PushbackInputStream inputStream;
|
private PushbackInputStream inputStream;
|
||||||
|
|
||||||
private ChannelConfig config = new DefaultChannelConfig();
|
private final ChannelConfig config = new DefaultChannelConfig();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void eventSunk(final ChannelPipeline pipeline, final ChannelEvent e) throws Exception {
|
public void eventSunk(final ChannelPipeline pipeline, final ChannelEvent e) throws Exception {
|
||||||
@ -168,10 +168,7 @@ public class IOStreamChannelSink extends AbstractChannelSink {
|
|||||||
future.setSuccess();
|
future.setSuccess();
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
throw new IllegalArgumentException(
|
throw new IllegalArgumentException("Only ChannelBuffer objects are supported to be written onto the IOStreamChannelSink! " + "Please check if the encoder pipeline is configured correctly.");
|
||||||
"Only ChannelBuffer objects are supported to be written onto the IOStreamChannelSink! "
|
|
||||||
+ "Please check if the encoder pipeline is configured correctly."
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -39,7 +39,6 @@ import org.jboss.netty.util.internal.ThreadLocalBoolean;
|
|||||||
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
|
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author Andy Taylor (andy.taylor@jboss.org)
|
* @author Andy Taylor (andy.taylor@jboss.org)
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*/
|
*/
|
||||||
final class DefaultLocalChannel extends AbstractChannel implements LocalChannel {
|
final class DefaultLocalChannel extends AbstractChannel implements LocalChannel {
|
||||||
|
|
||||||
@ -59,7 +58,16 @@ final class DefaultLocalChannel extends AbstractChannel implements LocalChannel
|
|||||||
volatile LocalAddress localAddress;
|
volatile LocalAddress localAddress;
|
||||||
volatile LocalAddress remoteAddress;
|
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);
|
super(parent, factory, pipeline, sink);
|
||||||
this.pairedChannel = pairedChannel;
|
this.pairedChannel = pairedChannel;
|
||||||
config = new DefaultChannelConfig();
|
config = new DefaultChannelConfig();
|
||||||
@ -73,7 +81,6 @@ final class DefaultLocalChannel extends AbstractChannel implements LocalChannel
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
fireChannelOpen(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -96,7 +103,7 @@ final class DefaultLocalChannel extends AbstractChannel implements LocalChannel
|
|||||||
return state.get() == ST_CONNECTED;
|
return state.get() == ST_CONNECTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
final void setBound() throws ClosedChannelException {
|
void setBound() throws ClosedChannelException {
|
||||||
if (!state.compareAndSet(ST_OPEN, ST_BOUND)) {
|
if (!state.compareAndSet(ST_OPEN, ST_BOUND)) {
|
||||||
switch (state.get()) {
|
switch (state.get()) {
|
||||||
case ST_CLOSED:
|
case ST_CLOSED:
|
||||||
@ -107,7 +114,7 @@ final class DefaultLocalChannel extends AbstractChannel implements LocalChannel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final void setConnected() {
|
void setConnected() {
|
||||||
if (state.get() != ST_CLOSED) {
|
if (state.get() != ST_CLOSED) {
|
||||||
state.set(ST_CONNECTED);
|
state.set(ST_CONNECTED);
|
||||||
}
|
}
|
||||||
|
@ -24,7 +24,6 @@ import org.jboss.netty.channel.ChannelSink;
|
|||||||
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
|
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author Andy Taylor (andy.taylor@jboss.org)
|
* @author Andy Taylor (andy.taylor@jboss.org)
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*
|
*
|
||||||
* @apiviz.landmark
|
* @apiviz.landmark
|
||||||
*/
|
*/
|
||||||
@ -41,7 +40,7 @@ public class DefaultLocalClientChannelFactory implements LocalClientChannelFacto
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public LocalChannel newChannel(ChannelPipeline pipeline) {
|
public LocalChannel newChannel(ChannelPipeline pipeline) {
|
||||||
return new DefaultLocalChannel(null, this, pipeline, sink, null);
|
return DefaultLocalChannel.create(null, this, pipeline, sink, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -30,19 +30,28 @@ import org.jboss.netty.channel.DefaultServerChannelConfig;
|
|||||||
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
|
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author Andy Taylor (andy.taylor@jboss.org)
|
* @author Andy Taylor (andy.taylor@jboss.org)
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*/
|
*/
|
||||||
final class DefaultLocalServerChannel extends AbstractServerChannel
|
final class DefaultLocalServerChannel extends AbstractServerChannel implements
|
||||||
implements LocalServerChannel {
|
LocalServerChannel {
|
||||||
|
|
||||||
final ChannelConfig channelConfig;
|
final ChannelConfig channelConfig;
|
||||||
|
|
||||||
final AtomicBoolean bound = new AtomicBoolean();
|
final AtomicBoolean bound = new AtomicBoolean();
|
||||||
|
|
||||||
volatile LocalAddress localAddress;
|
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);
|
super(factory, pipeline, sink);
|
||||||
channelConfig = new DefaultServerChannelConfig();
|
channelConfig = new DefaultServerChannelConfig();
|
||||||
fireChannelOpen(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -24,7 +24,6 @@ import org.jboss.netty.channel.ChannelSink;
|
|||||||
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
|
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author Andy Taylor (andy.taylor@jboss.org)
|
* @author Andy Taylor (andy.taylor@jboss.org)
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*
|
*
|
||||||
* @apiviz.landmark
|
* @apiviz.landmark
|
||||||
*/
|
*/
|
||||||
@ -32,16 +31,9 @@ public class DefaultLocalServerChannelFactory implements LocalServerChannelFacto
|
|||||||
|
|
||||||
private final ChannelSink sink = new LocalServerChannelSink();
|
private final ChannelSink sink = new LocalServerChannelSink();
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates a new instance.
|
|
||||||
*/
|
|
||||||
public DefaultLocalServerChannelFactory() {
|
|
||||||
super();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public LocalServerChannel newChannel(ChannelPipeline pipeline) {
|
public LocalServerChannel newChannel(ChannelPipeline pipeline) {
|
||||||
return new DefaultLocalServerChannel(this, pipeline, sink);
|
return DefaultLocalServerChannel.create(this, pipeline, sink);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -31,7 +31,6 @@ import java.net.SocketAddress;
|
|||||||
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
|
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author Andy Taylor (andy.taylor@jboss.org)
|
* @author Andy Taylor (andy.taylor@jboss.org)
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*
|
*
|
||||||
* @apiviz.landmark
|
* @apiviz.landmark
|
||||||
*/
|
*/
|
||||||
@ -115,7 +114,7 @@ public final class LocalAddress extends SocketAddress implements Comparable<Loca
|
|||||||
}
|
}
|
||||||
|
|
||||||
int a = System.identityHashCode(this);
|
int a = System.identityHashCode(this);
|
||||||
int b = System.identityHashCode(this);
|
int b = System.identityHashCode(o);
|
||||||
if (a < b) {
|
if (a < b) {
|
||||||
return -1;
|
return -1;
|
||||||
} else if (a > b) {
|
} else if (a > b) {
|
||||||
|
@ -23,7 +23,6 @@ import org.jboss.netty.channel.Channel;
|
|||||||
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
|
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author Andy Taylor (andy.taylor@jboss.org)
|
* @author Andy Taylor (andy.taylor@jboss.org)
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*/
|
*/
|
||||||
public interface LocalChannel extends Channel {
|
public interface LocalChannel extends Channel {
|
||||||
@Override
|
@Override
|
||||||
|
@ -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://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
* @version $Rev$, $Date$
|
|
||||||
*/
|
*/
|
||||||
final class LocalChannelRegistry {
|
final class LocalChannelRegistry {
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user