diff --git a/pom.xml b/pom.xml index 3476f561d6..bc9aa0c1e8 100644 --- a/pom.xml +++ b/pom.xml @@ -295,7 +295,7 @@ - + diff --git a/src/main/java/org/jboss/netty/channel/FileRegion.java b/src/main/java/org/jboss/netty/channel/FileRegion.java index e72a6e2062..93c9c797f6 100644 --- a/src/main/java/org/jboss/netty/channel/FileRegion.java +++ b/src/main/java/org/jboss/netty/channel/FileRegion.java @@ -23,7 +23,7 @@ import org.jboss.netty.util.ExternalResourceReleasable; /** * A region of a file that is sent via a {@link Channel} which supports - * zero-copy file transfer. + * zero-copy file transfer. * *

Upgrade your JDK / JRE

* @@ -42,6 +42,12 @@ import org.jboss.netty.util.ExternalResourceReleasable; * - FileChannel.transferTo(2147483647, 1, channel) causes "Value too large" exception * * + *

Check your operating system and JDK / JRE

+ * + * If your operating system (or JDK / JRE) does not support zero-copy file + * transfer, sending a file with {@link FileRegion} might fail or yield worse + * performance. For example, sending a large file doesn't work well in Windows. + * * @author The Netty Project * @author Trustin Lee * @version $Rev: 2080 $, $Date: 2010-01-26 18:04:19 +0900 (Tue, 26 Jan 2010) $ diff --git a/src/main/java/org/jboss/netty/handler/codec/http/HttpHeaders.java b/src/main/java/org/jboss/netty/handler/codec/http/HttpHeaders.java index 7d9f34729c..11ed57fadd 100644 --- a/src/main/java/org/jboss/netty/handler/codec/http/HttpHeaders.java +++ b/src/main/java/org/jboss/netty/handler/codec/http/HttpHeaders.java @@ -30,6 +30,7 @@ import java.util.TreeSet; * @author Andy Taylor (andy.taylor@jboss.org) * @version $Rev$, $Date$ * + * @apiviz.landmark * @apiviz.stereotype static */ public class HttpHeaders { diff --git a/src/main/java/org/jboss/netty/handler/codec/http/websocket/WebSocketFrameDecoder.java b/src/main/java/org/jboss/netty/handler/codec/http/websocket/WebSocketFrameDecoder.java index ccd5d948ee..10370604d4 100644 --- a/src/main/java/org/jboss/netty/handler/codec/http/websocket/WebSocketFrameDecoder.java +++ b/src/main/java/org/jboss/netty/handler/codec/http/websocket/WebSocketFrameDecoder.java @@ -33,6 +33,9 @@ import org.jboss.netty.handler.codec.replay.VoidEnum; * @author Mike Heath (mheath@apache.org) * @author Trustin Lee * @version $Rev$, $Date$ + * + * @apiviz.landmark + * @apiviz.uses org.jboss.netty.handler.codec.http.websocket.WebSocketFrame */ public class WebSocketFrameDecoder extends ReplayingDecoder { diff --git a/src/main/java/org/jboss/netty/handler/codec/http/websocket/WebSocketFrameEncoder.java b/src/main/java/org/jboss/netty/handler/codec/http/websocket/WebSocketFrameEncoder.java index 90f83929b6..6d3834d405 100644 --- a/src/main/java/org/jboss/netty/handler/codec/http/websocket/WebSocketFrameEncoder.java +++ b/src/main/java/org/jboss/netty/handler/codec/http/websocket/WebSocketFrameEncoder.java @@ -32,6 +32,9 @@ import org.jboss.netty.handler.codec.oneone.OneToOneEncoder; * @author Mike Heath (mheath@apache.org) * @author Trustin Lee * @version $Rev$, $Date$ + * + * @apiviz.landmark + * @apiviz.uses org.jboss.netty.handler.codec.http.websocket.WebSocketFrame */ @Sharable public class WebSocketFrameEncoder extends OneToOneEncoder { diff --git a/src/main/java/org/jboss/netty/handler/codec/http/websocket/package-info.java b/src/main/java/org/jboss/netty/handler/codec/http/websocket/package-info.java index b7b28d8e2d..caebf4ee0b 100644 --- a/src/main/java/org/jboss/netty/handler/codec/http/websocket/package-info.java +++ b/src/main/java/org/jboss/netty/handler/codec/http/websocket/package-info.java @@ -24,5 +24,6 @@ * * * @apiviz.exclude OneToOne(Encoder|Decoder)$ * @apiviz.exclude \.codec\.replay\. + * @apiviz.exclude \.Default */ package org.jboss.netty.handler.codec.http.websocket; diff --git a/src/main/java/org/jboss/netty/handler/codec/protobuf/package-info.java b/src/main/java/org/jboss/netty/handler/codec/protobuf/package-info.java index 172e7bd68c..82b5c798a3 100644 --- a/src/main/java/org/jboss/netty/handler/codec/protobuf/package-info.java +++ b/src/main/java/org/jboss/netty/handler/codec/protobuf/package-info.java @@ -21,5 +21,6 @@ * and vice versa. * * @apiviz.exclude \.oneone\. + * @apiviz.exclude \.frame\. */ package org.jboss.netty.handler.codec.protobuf; diff --git a/src/main/java/org/jboss/netty/handler/codec/rtsp/RtspHeaders.java b/src/main/java/org/jboss/netty/handler/codec/rtsp/RtspHeaders.java index 0f1084e299..cb4e3c0c5f 100644 --- a/src/main/java/org/jboss/netty/handler/codec/rtsp/RtspHeaders.java +++ b/src/main/java/org/jboss/netty/handler/codec/rtsp/RtspHeaders.java @@ -25,6 +25,9 @@ import org.jboss.netty.handler.codec.http.HttpHeaders; * @author Amit Bhayani * @author Trustin Lee * @version $Rev$, $Date$ + * + * @apiviz.exclude + * @apiviz.stereotype static */ public final class RtspHeaders { @@ -220,7 +223,7 @@ public final class RtspHeaders { } /** - * Standard RTSP header names. + * Standard RTSP header values. * * @author The Netty Project * @author Trustin Lee diff --git a/src/main/java/org/jboss/netty/handler/codec/rtsp/RtspMessageDecoder.java b/src/main/java/org/jboss/netty/handler/codec/rtsp/RtspMessageDecoder.java index d5cce5b35f..5c1cca9ae2 100644 --- a/src/main/java/org/jboss/netty/handler/codec/rtsp/RtspMessageDecoder.java +++ b/src/main/java/org/jboss/netty/handler/codec/rtsp/RtspMessageDecoder.java @@ -56,6 +56,8 @@ import org.jboss.netty.handler.codec.http.HttpMessageDecoder; * @author Amit Bhayani * @author Trustin Lee * @version $Rev$, $Date$ + * + * @apiviz.landmark */ public abstract class RtspMessageDecoder extends HttpMessageDecoder { diff --git a/src/main/java/org/jboss/netty/handler/codec/rtsp/RtspMessageEncoder.java b/src/main/java/org/jboss/netty/handler/codec/rtsp/RtspMessageEncoder.java index 7ee2220df3..2ebee6f3d9 100644 --- a/src/main/java/org/jboss/netty/handler/codec/rtsp/RtspMessageEncoder.java +++ b/src/main/java/org/jboss/netty/handler/codec/rtsp/RtspMessageEncoder.java @@ -30,6 +30,8 @@ import org.jboss.netty.handler.codec.http.HttpMessageEncoder; * @author Amit Bhayani * @author Trustin Lee * @version $Rev$, $Date$ + * + * @apiviz.landmark */ @Sharable public abstract class RtspMessageEncoder extends HttpMessageEncoder { diff --git a/src/main/java/org/jboss/netty/handler/codec/rtsp/RtspMethods.java b/src/main/java/org/jboss/netty/handler/codec/rtsp/RtspMethods.java index 06401e02f6..8437167dc7 100644 --- a/src/main/java/org/jboss/netty/handler/codec/rtsp/RtspMethods.java +++ b/src/main/java/org/jboss/netty/handler/codec/rtsp/RtspMethods.java @@ -27,6 +27,8 @@ import org.jboss.netty.handler.codec.http.HttpMethod; * @author Amit Bhayani * @author Trustin Lee * @version $Rev$, $Date$ + * + * @apiviz.exclude */ public final class RtspMethods { diff --git a/src/main/java/org/jboss/netty/handler/codec/rtsp/RtspResponseStatuses.java b/src/main/java/org/jboss/netty/handler/codec/rtsp/RtspResponseStatuses.java index f36363d773..c8d39871fd 100644 --- a/src/main/java/org/jboss/netty/handler/codec/rtsp/RtspResponseStatuses.java +++ b/src/main/java/org/jboss/netty/handler/codec/rtsp/RtspResponseStatuses.java @@ -24,6 +24,8 @@ import org.jboss.netty.handler.codec.http.HttpResponseStatus; * @author Amit Bhayani * @author Trustin Lee * @version $Rev$, $Date$ + * + * @apiviz.exclude */ public final class RtspResponseStatuses { diff --git a/src/main/java/org/jboss/netty/handler/codec/rtsp/RtspVersions.java b/src/main/java/org/jboss/netty/handler/codec/rtsp/RtspVersions.java index 9523485352..48e1467cee 100644 --- a/src/main/java/org/jboss/netty/handler/codec/rtsp/RtspVersions.java +++ b/src/main/java/org/jboss/netty/handler/codec/rtsp/RtspVersions.java @@ -24,6 +24,8 @@ import org.jboss.netty.handler.codec.http.HttpVersion; * @author Amit Bhayani * @author Trustin Lee * @version $Rev$, $Date$ + * + * @apiviz.exclude */ public final class RtspVersions { diff --git a/src/main/java/org/jboss/netty/handler/codec/rtsp/package-info.java b/src/main/java/org/jboss/netty/handler/codec/rtsp/package-info.java index f00a025f82..1483a6a4c7 100644 --- a/src/main/java/org/jboss/netty/handler/codec/rtsp/package-info.java +++ b/src/main/java/org/jboss/netty/handler/codec/rtsp/package-info.java @@ -17,5 +17,7 @@ /** * An RTSP * extension based on the HTTP codec. + * + * @apiviz.exclude \.RtspHeaders\. */ package org.jboss.netty.handler.codec.rtsp; diff --git a/src/main/java/org/jboss/netty/handler/codec/serialization/package-info.java b/src/main/java/org/jboss/netty/handler/codec/serialization/package-info.java index e3e9ed8174..bb5cdcadd3 100644 --- a/src/main/java/org/jboss/netty/handler/codec/serialization/package-info.java +++ b/src/main/java/org/jboss/netty/handler/codec/serialization/package-info.java @@ -21,6 +21,5 @@ * * @apiviz.exclude ^java\.io\. * @apiviz.exclude \.codec\.(?!serialization)[a-z0-9]+\. - * @apiviz.exclude \.CompatibleObjectDecoder$ */ package org.jboss.netty.handler.codec.serialization; diff --git a/src/main/java/org/jboss/netty/handler/queue/BufferedWriteHandler.java b/src/main/java/org/jboss/netty/handler/queue/BufferedWriteHandler.java index 11504b89e3..105d235e2b 100644 --- a/src/main/java/org/jboss/netty/handler/queue/BufferedWriteHandler.java +++ b/src/main/java/org/jboss/netty/handler/queue/BufferedWriteHandler.java @@ -37,7 +37,7 @@ import org.jboss.netty.util.internal.LinkedTransferQueue; /** * Emulates buffered write operation. This handler stores all write requests - * into an unbounded {@link Queue} and flushed them to the downstream when + * into an unbounded {@link Queue} and flushes them to the downstream when * {@link #flush()} method is called. *

* Here is an example that demonstrates the usage: @@ -158,6 +158,8 @@ import org.jboss.netty.util.internal.LinkedTransferQueue; * @author The Netty Project * @author Trustin Lee * @version $Rev$, $Date$ + * + * @apiviz.landmark */ public class BufferedWriteHandler extends SimpleChannelHandler { diff --git a/src/main/java/org/jboss/netty/handler/queue/package-info.java b/src/main/java/org/jboss/netty/handler/queue/package-info.java index 09154c81e3..8c72869a88 100644 --- a/src/main/java/org/jboss/netty/handler/queue/package-info.java +++ b/src/main/java/org/jboss/netty/handler/queue/package-info.java @@ -17,5 +17,8 @@ /** * The special-purpose handlers that store an event into an internal queue * instead of propagating the event immediately. + * + * @apiviz.exclude \.channel\. + * @apiviz.exclude Exception$ */ package org.jboss.netty.handler.queue; diff --git a/src/main/java/org/jboss/netty/handler/stream/ChunkedFile.java b/src/main/java/org/jboss/netty/handler/stream/ChunkedFile.java index ba8d605f5b..45f9b9f358 100644 --- a/src/main/java/org/jboss/netty/handler/stream/ChunkedFile.java +++ b/src/main/java/org/jboss/netty/handler/stream/ChunkedFile.java @@ -21,8 +21,14 @@ import java.io.File; import java.io.IOException; import java.io.RandomAccessFile; +import org.jboss.netty.channel.FileRegion; + /** * A {@link ChunkedInput} that fetches data from a file chunk by chunk. + *

+ * If your operating system supports + * zero-copy file transfer + * such as {@code sendfile()}, you might want to use {@link FileRegion} instead. * * @author The Netty Project * @author Trustin Lee diff --git a/src/main/java/org/jboss/netty/handler/stream/ChunkedNioFile.java b/src/main/java/org/jboss/netty/handler/stream/ChunkedNioFile.java index 84a950716a..969516bcc8 100644 --- a/src/main/java/org/jboss/netty/handler/stream/ChunkedNioFile.java +++ b/src/main/java/org/jboss/netty/handler/stream/ChunkedNioFile.java @@ -23,9 +23,15 @@ import java.io.IOException; import java.nio.ByteBuffer; import java.nio.channels.FileChannel; +import org.jboss.netty.channel.FileRegion; + /** * A {@link ChunkedInput} that fetches data from a file chunk by chunk using * NIO {@link FileChannel}. + *

+ * If your operating system supports + * zero-copy file transfer + * such as {@code sendfile()}, you might want to use {@link FileRegion} instead. * * @author The Netty Project * @author Trustin Lee