Fix javadoc issues
Motivation: Invalid javadoc in project Modifications: Fix it Result: More correct javadoc
This commit is contained in:
parent
634a8afa53
commit
0623c6c533
@ -92,7 +92,7 @@ public class ByteBufInputStream extends InputStream implements DataInput {
|
||||
* Creates a new stream which reads data from the specified {@code buffer}
|
||||
* starting at the current {@code readerIndex} and ending at
|
||||
* {@code readerIndex + length}.
|
||||
* @param buffer The buffer which provides the content for this {@Link InputStream}.
|
||||
* @param buffer The buffer which provides the content for this {@link InputStream}.
|
||||
* @param length The length of the buffer to use for this {@link InputStream}.
|
||||
* @param releaseOnClose {@code true} means that when {@link #close()} is called then {@link ByteBuf#release()} will
|
||||
* be called on {@code buffer}.
|
||||
|
@ -32,8 +32,9 @@ import java.util.Queue;
|
||||
/**
|
||||
* Acts a Thread cache for allocations. This implementation is moduled after
|
||||
* <a href="http://people.freebsd.org/~jasone/jemalloc/bsdcan2006/jemalloc.pdf">jemalloc</a> and the descripted
|
||||
* technics of <a href="https://www.facebook.com/notes/facebook-engineering/scalable-memory-allocation-using-jemalloc/
|
||||
* 480222803919">Scalable memory allocation using jemalloc</a>.
|
||||
* technics of
|
||||
* <a href="https://www.facebook.com/notes/facebook-engineering/scalable-memory-allocation-using-jemalloc/480222803919">
|
||||
* Scalable memory allocation using jemalloc</a>.
|
||||
*/
|
||||
final class PoolThreadCache {
|
||||
|
||||
|
@ -15,6 +15,8 @@
|
||||
*/
|
||||
package io.netty.handler.codec.http;
|
||||
|
||||
import io.netty.handler.codec.http.cookie.ClientCookieDecoder;
|
||||
|
||||
/**
|
||||
* A <a href="http://tools.ietf.org/html/rfc6265">RFC6265</a> compliant cookie encoder to be used client side,
|
||||
* so only name=value pairs are sent.
|
||||
|
@ -564,7 +564,7 @@ public abstract class HttpHeaders implements Iterable<Map.Entry<String, String>>
|
||||
/**
|
||||
* @deprecated Use {@link #get(CharSequence, String)} instead.
|
||||
*
|
||||
* @see {@link #getHeader(HttpMessage, CharSequence, String)}
|
||||
* @see #getHeader(HttpMessage, CharSequence, String)
|
||||
*/
|
||||
@Deprecated
|
||||
public static String getHeader(HttpMessage message, String name, String defaultValue) {
|
||||
@ -589,7 +589,7 @@ public abstract class HttpHeaders implements Iterable<Map.Entry<String, String>>
|
||||
/**
|
||||
* @deprecated Use {@link #set(CharSequence, Object)} instead.
|
||||
*
|
||||
* @see {@link #setHeader(HttpMessage, CharSequence, Object)}
|
||||
* @see #setHeader(HttpMessage, CharSequence, Object)
|
||||
*/
|
||||
@Deprecated
|
||||
public static void setHeader(HttpMessage message, String name, Object value) {
|
||||
@ -614,7 +614,7 @@ public abstract class HttpHeaders implements Iterable<Map.Entry<String, String>>
|
||||
/**
|
||||
* @deprecated Use {@link #set(CharSequence, Iterable)} instead.
|
||||
*
|
||||
* @see {@link #setHeader(HttpMessage, CharSequence, Iterable)}
|
||||
* @see #setHeader(HttpMessage, CharSequence, Iterable)
|
||||
*/
|
||||
@Deprecated
|
||||
public static void setHeader(HttpMessage message, String name, Iterable<?> values) {
|
||||
@ -645,7 +645,7 @@ public abstract class HttpHeaders implements Iterable<Map.Entry<String, String>>
|
||||
/**
|
||||
* @deprecated Use {@link #add(CharSequence, Object)} instead.
|
||||
*
|
||||
* @see {@link #addHeader(HttpMessage, CharSequence, Object)}
|
||||
* @see #addHeader(HttpMessage, CharSequence, Object)
|
||||
*/
|
||||
@Deprecated
|
||||
public static void addHeader(HttpMessage message, String name, Object value) {
|
||||
@ -669,7 +669,7 @@ public abstract class HttpHeaders implements Iterable<Map.Entry<String, String>>
|
||||
/**
|
||||
* @deprecated Use {@link #remove(CharSequence)} instead.
|
||||
*
|
||||
* @see {@link #removeHeader(HttpMessage, CharSequence)}
|
||||
* @see #removeHeader(HttpMessage, CharSequence)
|
||||
*/
|
||||
@Deprecated
|
||||
public static void removeHeader(HttpMessage message, String name) {
|
||||
@ -699,7 +699,7 @@ public abstract class HttpHeaders implements Iterable<Map.Entry<String, String>>
|
||||
/**
|
||||
* @deprecated Use {@link #getInt(CharSequence)} instead.
|
||||
*
|
||||
* @see {@link #getIntHeader(HttpMessage, CharSequence)}
|
||||
* @see #getIntHeader(HttpMessage, CharSequence)
|
||||
*/
|
||||
@Deprecated
|
||||
public static int getIntHeader(HttpMessage message, String name) {
|
||||
@ -729,7 +729,7 @@ public abstract class HttpHeaders implements Iterable<Map.Entry<String, String>>
|
||||
/**
|
||||
* @deprecated Use {@link #getInt(CharSequence, int)} instead.
|
||||
*
|
||||
* @see {@link #getIntHeader(HttpMessage, CharSequence, int)}
|
||||
* @see #getIntHeader(HttpMessage, CharSequence, int)
|
||||
*/
|
||||
@Deprecated
|
||||
public static int getIntHeader(HttpMessage message, String name, int defaultValue) {
|
||||
@ -754,7 +754,7 @@ public abstract class HttpHeaders implements Iterable<Map.Entry<String, String>>
|
||||
/**
|
||||
* @deprecated Use {@link #setInt(CharSequence, int)} instead.
|
||||
*
|
||||
* @see {@link #setIntHeader(HttpMessage, CharSequence, int)}
|
||||
* @see #setIntHeader(HttpMessage, CharSequence, int)
|
||||
*/
|
||||
@Deprecated
|
||||
public static void setIntHeader(HttpMessage message, String name, int value) {
|
||||
@ -775,7 +775,7 @@ public abstract class HttpHeaders implements Iterable<Map.Entry<String, String>>
|
||||
/**
|
||||
* @deprecated Use {@link #set(CharSequence, Iterable)} instead.
|
||||
*
|
||||
* @see {@link #setIntHeader(HttpMessage, CharSequence, Iterable)}
|
||||
* @see #setIntHeader(HttpMessage, CharSequence, Iterable)
|
||||
*/
|
||||
@Deprecated
|
||||
public static void setIntHeader(HttpMessage message, String name, Iterable<Integer> values) {
|
||||
@ -796,7 +796,7 @@ public abstract class HttpHeaders implements Iterable<Map.Entry<String, String>>
|
||||
/**
|
||||
* @deprecated Use {@link #add(CharSequence, Iterable)} instead.
|
||||
*
|
||||
* @see {@link #addIntHeader(HttpMessage, CharSequence, int)}
|
||||
* @see #addIntHeader(HttpMessage, CharSequence, int)
|
||||
*/
|
||||
@Deprecated
|
||||
public static void addIntHeader(HttpMessage message, String name, int value) {
|
||||
@ -816,7 +816,7 @@ public abstract class HttpHeaders implements Iterable<Map.Entry<String, String>>
|
||||
/**
|
||||
* @deprecated Use {@link #getTimeMillis(CharSequence)} instead.
|
||||
*
|
||||
* @see {@link #getDateHeader(HttpMessage, CharSequence)}
|
||||
* @see #getDateHeader(HttpMessage, CharSequence)
|
||||
*/
|
||||
@Deprecated
|
||||
public static Date getDateHeader(HttpMessage message, String name) throws ParseException {
|
||||
@ -850,7 +850,7 @@ public abstract class HttpHeaders implements Iterable<Map.Entry<String, String>>
|
||||
/**
|
||||
* @deprecated Use {@link #getTimeMillis(CharSequence, long)} instead.
|
||||
*
|
||||
* @see {@link #getDateHeader(HttpMessage, CharSequence, Date)}
|
||||
* @see #getDateHeader(HttpMessage, CharSequence, Date)
|
||||
*/
|
||||
@Deprecated
|
||||
public static Date getDateHeader(HttpMessage message, String name, Date defaultValue) {
|
||||
@ -877,7 +877,7 @@ public abstract class HttpHeaders implements Iterable<Map.Entry<String, String>>
|
||||
/**
|
||||
* @deprecated Use {@link #set(CharSequence, Object)} instead.
|
||||
*
|
||||
* @see {@link #setDateHeader(HttpMessage, CharSequence, Date)}
|
||||
* @see #setDateHeader(HttpMessage, CharSequence, Date)
|
||||
*/
|
||||
@Deprecated
|
||||
public static void setDateHeader(HttpMessage message, String name, Date value) {
|
||||
@ -904,7 +904,7 @@ public abstract class HttpHeaders implements Iterable<Map.Entry<String, String>>
|
||||
/**
|
||||
* @deprecated Use {@link #set(CharSequence, Iterable)} instead.
|
||||
*
|
||||
* @see {@link #setDateHeader(HttpMessage, CharSequence, Iterable)}
|
||||
* @see #setDateHeader(HttpMessage, CharSequence, Iterable)
|
||||
*/
|
||||
@Deprecated
|
||||
public static void setDateHeader(HttpMessage message, String name, Iterable<Date> values) {
|
||||
@ -927,7 +927,7 @@ public abstract class HttpHeaders implements Iterable<Map.Entry<String, String>>
|
||||
/**
|
||||
* @deprecated Use {@link #add(CharSequence, Object)} instead.
|
||||
*
|
||||
* @see {@link #addDateHeader(HttpMessage, CharSequence, Date)}
|
||||
* @see #addDateHeader(HttpMessage, CharSequence, Date)
|
||||
*/
|
||||
@Deprecated
|
||||
public static void addDateHeader(HttpMessage message, String name, Date value) {
|
||||
@ -1014,7 +1014,7 @@ public abstract class HttpHeaders implements Iterable<Map.Entry<String, String>>
|
||||
/**
|
||||
* @deprecated Use {@link #set(CharSequence, Object)} instead.
|
||||
*
|
||||
* @see {@link #setHost(HttpMessage, CharSequence)}
|
||||
* @see #setHost(HttpMessage, CharSequence)
|
||||
*/
|
||||
@Deprecated
|
||||
public static void setHost(HttpMessage message, String value) {
|
||||
@ -1298,7 +1298,7 @@ public abstract class HttpHeaders implements Iterable<Map.Entry<String, String>>
|
||||
public abstract List<Map.Entry<String, String>> entries();
|
||||
|
||||
/**
|
||||
* @see {@link #contains(CharSequence)}
|
||||
* @see #contains(CharSequence)
|
||||
*/
|
||||
public abstract boolean contains(String name);
|
||||
|
||||
|
@ -473,10 +473,10 @@ public class HttpResponseStatus implements Comparable<HttpResponseStatus> {
|
||||
private final AsciiString string;
|
||||
private int i;
|
||||
/**
|
||||
* 0 = New or havn't seen {@link ASCII_SPACE}.
|
||||
* 1 = Last byte was {@link ASCII_SPACE}.
|
||||
* 2 = Terminal State. Processed the byte after {@link ASCII_SPACE}, and parsed the status line.
|
||||
* 3 = Terminal State. There was no byte after {@link ASCII_SPACE} but status has been parsed with what we saw.
|
||||
* 0 = New or havn't seen {@link #ASCII_SPACE}.
|
||||
* 1 = Last byte was {@link #ASCII_SPACE}.
|
||||
* 2 = Terminal State. Processed the byte after {@link #ASCII_SPACE}, and parsed the status line.
|
||||
* 3 = Terminal State. There was no byte after {@link #ASCII_SPACE} but status has been parsed with what we saw.
|
||||
*/
|
||||
private int state;
|
||||
private HttpResponseStatus status;
|
||||
|
@ -15,6 +15,8 @@
|
||||
*/
|
||||
package io.netty.handler.codec.http;
|
||||
|
||||
import io.netty.handler.codec.http.cookie.ServerCookieDecoder;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -52,7 +52,7 @@ public interface HttpData extends InterfaceHttpData, ByteBufHolder {
|
||||
*
|
||||
* @param buffer
|
||||
* must be not null
|
||||
* @exception IOException
|
||||
* @throws IOException
|
||||
*/
|
||||
void setContent(ByteBuf buffer) throws IOException;
|
||||
|
||||
@ -63,7 +63,7 @@ public interface HttpData extends InterfaceHttpData, ByteBufHolder {
|
||||
* must be not null except if last is set to False
|
||||
* @param last
|
||||
* True of the buffer is the last one
|
||||
* @exception IOException
|
||||
* @throws IOException
|
||||
*/
|
||||
void addContent(ByteBuf buffer, boolean last) throws IOException;
|
||||
|
||||
@ -72,7 +72,7 @@ public interface HttpData extends InterfaceHttpData, ByteBufHolder {
|
||||
*
|
||||
* @param file
|
||||
* must be not null
|
||||
* @exception IOException
|
||||
* @throws IOException
|
||||
*/
|
||||
void setContent(File file) throws IOException;
|
||||
|
||||
@ -81,7 +81,7 @@ public interface HttpData extends InterfaceHttpData, ByteBufHolder {
|
||||
*
|
||||
* @param inputStream
|
||||
* must be not null
|
||||
* @exception IOException
|
||||
* @throws IOException
|
||||
*/
|
||||
void setContent(InputStream inputStream) throws IOException;
|
||||
|
||||
@ -124,7 +124,7 @@ public interface HttpData extends InterfaceHttpData, ByteBufHolder {
|
||||
* Returns the contents of the file item as an array of bytes.
|
||||
*
|
||||
* @return the contents of the file item as an array of bytes.
|
||||
* @exception IOException
|
||||
* @throws IOException
|
||||
*/
|
||||
byte[] get() throws IOException;
|
||||
|
||||
@ -153,7 +153,7 @@ public interface HttpData extends InterfaceHttpData, ByteBufHolder {
|
||||
*
|
||||
* @return the contents of the file item as a String, using the default
|
||||
* character encoding.
|
||||
* @exception IOException
|
||||
* @throws IOException
|
||||
*/
|
||||
String getString() throws IOException;
|
||||
|
||||
@ -165,7 +165,7 @@ public interface HttpData extends InterfaceHttpData, ByteBufHolder {
|
||||
* the charset to use
|
||||
* @return the contents of the file item as a String, using the specified
|
||||
* charset.
|
||||
* @exception IOException
|
||||
* @throws IOException
|
||||
*/
|
||||
String getString(Charset encoding) throws IOException;
|
||||
|
||||
@ -193,7 +193,7 @@ public interface HttpData extends InterfaceHttpData, ByteBufHolder {
|
||||
* @param dest
|
||||
* destination file - must be not null
|
||||
* @return True if the write is successful
|
||||
* @exception IOException
|
||||
* @throws IOException
|
||||
*/
|
||||
boolean renameTo(File dest) throws IOException;
|
||||
|
||||
|
@ -223,12 +223,12 @@ abstract class AbstractHttp2StreamChannel extends AbstractChannel {
|
||||
protected abstract void doWrite(Object msg) throws Exception;
|
||||
|
||||
/**
|
||||
* Process end of batch of {@link #doWrite()}s. May be called from any thread.
|
||||
* Process end of batch of {@link #doWrite(ChannelOutboundBuffer)}s. May be called from any thread.
|
||||
*/
|
||||
protected abstract void doWriteComplete();
|
||||
|
||||
/**
|
||||
* The ideal thread for events like {@link #doWrite()} to be processed on. May be used for
|
||||
* The ideal thread for events like {@link #doWrite(ChannelOutboundBuffer)} to be processed on. May be used for
|
||||
* efficient batching, but not required.
|
||||
*/
|
||||
protected abstract EventExecutor preferredEventExecutor();
|
||||
|
@ -83,7 +83,7 @@ public class DefaultHttp2FrameReader implements Http2FrameReader, Http2FrameSize
|
||||
/**
|
||||
* Create a new instance.
|
||||
* @param validateHeaders {@code true} to validate headers. {@code false} to not validate headers.
|
||||
* @see {@link DefaultHttp2HeadersDecoder(boolean)}
|
||||
* @see DefaultHttp2HeadersDecoder(boolean)
|
||||
*/
|
||||
public DefaultHttp2FrameReader(boolean validateHeaders) {
|
||||
this(new DefaultHttp2HeadersDecoder(validateHeaders));
|
||||
|
@ -664,7 +664,6 @@ public class Http2ConnectionHandler extends ByteToMessageDecoder implements Http
|
||||
*
|
||||
* @param ctx the channel context
|
||||
* @param stream the Http2Stream on which the header was received
|
||||
* @throws Http2Exception if an exception occurs while processing the decode error.
|
||||
*/
|
||||
protected void handleServerHeaderDecodeSizeError(ChannelHandlerContext ctx, Http2Stream stream) {
|
||||
encoder().writeHeaders(ctx, stream.id(), HEADERS_TOO_LARGE_HEADERS, 0, true, ctx.newPromise());
|
||||
|
@ -127,7 +127,7 @@ public class InboundHttp2ToHttpAdapter extends Http2EventAdapter {
|
||||
*
|
||||
* @param ctx The context to fire the event on
|
||||
* @param msg The message to send
|
||||
* @param release {@code true} to release if present in {@link #messageMap}. {@code false} otherwise.
|
||||
* @param release {@code true} to call release on the value if it is present. {@code false} to not call release.
|
||||
* @param stream the stream of the message which is being fired
|
||||
*/
|
||||
protected void fireChannelRead(ChannelHandlerContext ctx, FullHttpMessage msg, boolean release,
|
||||
|
@ -38,7 +38,7 @@ public interface StreamByteDistributor {
|
||||
* Get the amount of bytes this stream has pending to send. The actual amount written must not exceed
|
||||
* {@link #windowSize()}!
|
||||
* @return The amount of bytes this stream has pending to send.
|
||||
* @see {@link io.netty.handler.codec.http2.Http2CodecUtil#streamableBytes(StreamState)}
|
||||
* @see Http2CodecUtil#streamableBytes(StreamState)
|
||||
*/
|
||||
int pendingBytes();
|
||||
|
||||
@ -54,7 +54,7 @@ public interface StreamByteDistributor {
|
||||
* an stream has been given a chance to write an empty frame, and also enables optimizations like not writing
|
||||
* empty frames in some situations (don't write headers until data can also be written).
|
||||
* @return the size of the stream's flow control window.
|
||||
* @see {@link io.netty.handler.codec.http2.Http2CodecUtil#streamableBytes(StreamState)}
|
||||
* @see Http2CodecUtil#streamableBytes(StreamState)
|
||||
*/
|
||||
int windowSize();
|
||||
}
|
||||
|
@ -48,8 +48,7 @@ import static java.lang.Math.min;
|
||||
* bytes.
|
||||
* <p>
|
||||
* Inspiration for this distributor was taken from Linux's
|
||||
* <a href="https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/tree/Documentation/scheduler
|
||||
* /sched-design-CFS.txt">Completely Fair Scheduler</a>
|
||||
* <a href="https://www.kernel.org/doc/Documentation/scheduler/sched-design-CFS.txt">Completely Fair Scheduler</a>
|
||||
* to model the distribution of bytes to simulate an "ideal multi-tasking CPU", but in this case we are simulating
|
||||
* an "ideal multi-tasking NIC".
|
||||
* <p>
|
||||
|
@ -38,8 +38,6 @@ import io.netty.util.ByteProcessor;
|
||||
import io.netty.util.internal.ObjectUtil;
|
||||
import io.netty.util.internal.ThrowableUtil;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import static io.netty.handler.codec.http2.Http2Error.COMPRESSION_ERROR;
|
||||
import static io.netty.handler.codec.http2.Http2Exception.connectionError;
|
||||
import static io.netty.handler.codec.http2.internal.hpack.HpackUtil.HUFFMAN_CODES;
|
||||
@ -65,8 +63,7 @@ final class HuffmanDecoder {
|
||||
*
|
||||
* @param buf the string literal to be decoded
|
||||
* @return the output stream for the compressed data
|
||||
* @throws IOException if an I/O error occurs. In particular, an <code>IOException</code> may be
|
||||
* thrown if the output stream has been closed.
|
||||
* @throws Http2Exception EOS Decoded
|
||||
*/
|
||||
public AsciiString decode(ByteBuf buf, int length) throws Http2Exception {
|
||||
processor.reset();
|
||||
|
@ -116,7 +116,7 @@ final class HuffmanEncoder {
|
||||
* Returns the number of bytes required to Huffman encode the input string literal.
|
||||
*
|
||||
* @param data the string literal to be Huffman encoded
|
||||
* @return the number of bytes required to Huffman encode <code>data</code>
|
||||
* @return the number of bytes required to Huffman encode {@code data}
|
||||
*/
|
||||
int getEncodedLength(CharSequence data) {
|
||||
if (data instanceof AsciiString) {
|
||||
|
@ -49,14 +49,14 @@ public abstract class ByteToMessageCodec<I> extends ChannelDuplexHandler {
|
||||
};
|
||||
|
||||
/**
|
||||
* @see {@link #ByteToMessageCodec(boolean)} with {@code true} as boolean parameter.
|
||||
* see {@link #ByteToMessageCodec(boolean)} with {@code true} as boolean parameter.
|
||||
*/
|
||||
protected ByteToMessageCodec() {
|
||||
this(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link #ByteToMessageCodec(Class, boolean)} with {@code true} as boolean value.
|
||||
* see {@link #ByteToMessageCodec(Class, boolean)} with {@code true} as boolean value.
|
||||
*/
|
||||
protected ByteToMessageCodec(Class<? extends I> outboundMessageType) {
|
||||
this(outboundMessageType, true);
|
||||
|
@ -88,8 +88,8 @@ public final class DateFormatter {
|
||||
/**
|
||||
* Parse some text into a {@link Date}, according to RFC6265
|
||||
* @param txt text to parse
|
||||
* @param start the start index inside <code>txt</code>
|
||||
* @param end the end index inside <code>txt</code>
|
||||
* @param start the start index inside {@code txt}
|
||||
* @param end the end index inside {@code txt}
|
||||
* @return a {@link Date}, or null if text couldn't be parsed
|
||||
*/
|
||||
public static Date parseHttpDate(CharSequence txt, int start, int end) {
|
||||
|
@ -971,9 +971,9 @@ public interface Headers<K, V, T extends Headers<K, V, T>> extends Iterable<Entr
|
||||
T set(Headers<? extends K, ? extends V, ?> headers);
|
||||
|
||||
/**
|
||||
* Retains all current headers but calls {@link #set(T, T)} for each entry in {@code headers}.
|
||||
* Retains all current headers but calls {@link #set(K, V)} for each entry in {@code headers}.
|
||||
*
|
||||
* @param headers The headers used to {@link #set(T, T)} values in this instance
|
||||
* @param headers The headers used to {@link #set(K, V)} values in this instance
|
||||
* @return {@code this}
|
||||
*/
|
||||
T setAll(Headers<? extends K, ? extends V, ?> headers);
|
||||
|
@ -49,14 +49,14 @@ public abstract class MessageToByteEncoder<I> extends ChannelOutboundHandlerAdap
|
||||
private final boolean preferDirect;
|
||||
|
||||
/**
|
||||
* @see {@link #MessageToByteEncoder(boolean)} with {@code true} as boolean parameter.
|
||||
* see {@link #MessageToByteEncoder(boolean)} with {@code true} as boolean parameter.
|
||||
*/
|
||||
protected MessageToByteEncoder() {
|
||||
this(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link #MessageToByteEncoder(Class, boolean)} with {@code true} as boolean value.
|
||||
* see {@link #MessageToByteEncoder(Class, boolean)} with {@code true} as boolean value.
|
||||
*/
|
||||
protected MessageToByteEncoder(Class<? extends I> outboundMessageType) {
|
||||
this(outboundMessageType, true);
|
||||
|
@ -76,7 +76,7 @@ abstract class ByteBufChecksum implements Checksum {
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link #update(byte[], int, int)}.
|
||||
* @see #update(byte[], int, int)
|
||||
*/
|
||||
public void update(ByteBuf b, int off, int len) {
|
||||
if (b.hasArray()) {
|
||||
|
@ -21,7 +21,7 @@ import io.netty.buffer.ByteBuf;
|
||||
* Uncompresses an input {@link ByteBuf} encoded with Snappy compression into an
|
||||
* output {@link ByteBuf}.
|
||||
*
|
||||
* See <a href="http://code.google.com/p/snappy/source/browse/trunk/format_description.txt">snappy format</a>.
|
||||
* See <a href="https://github.com/google/snappy/blob/master/format_description.txt">snappy format</a>.
|
||||
*/
|
||||
public final class Snappy {
|
||||
|
||||
|
@ -18,6 +18,6 @@
|
||||
* Encoder and decoder which compresses and decompresses {@link io.netty.buffer.ByteBuf}s
|
||||
* in a compression format such as <a href="http://en.wikipedia.org/wiki/Zlib">zlib</a>,
|
||||
* <a href="http://en.wikipedia.org/wiki/Gzip">gzip</a>, and
|
||||
* <a href="http://code.google.com/p/snappy/">Snappy</a>.
|
||||
* <a href="https://github.com/google/snappy">Snappy</a>.
|
||||
*/
|
||||
package io.netty.handler.codec.compression;
|
||||
|
@ -37,7 +37,8 @@ import java.util.List;
|
||||
* +--------+---------------+ +---------------+
|
||||
* </pre>
|
||||
*
|
||||
* @see {@link CodedInputStream} or {@link CodedInputByteBufferNano}
|
||||
* @see CodedInputStream
|
||||
* @see CodedInputByteBufferNano
|
||||
*/
|
||||
public class ProtobufVarint32FrameDecoder extends ByteToMessageDecoder {
|
||||
|
||||
|
@ -15,8 +15,8 @@
|
||||
*/
|
||||
package io.netty.handler.codec.protobuf;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import com.google.protobuf.CodedOutputStream;
|
||||
import com.google.protobuf.nano.CodedOutputByteBufferNano;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import io.netty.channel.ChannelHandler.Sharable;
|
||||
import io.netty.channel.ChannelHandlerContext;
|
||||
@ -24,7 +24,7 @@ import io.netty.handler.codec.MessageToByteEncoder;
|
||||
|
||||
/**
|
||||
* An encoder that prepends the the Google Protocol Buffers
|
||||
* <a href="http://code.google.com/apis/protocolbuffers/docs/encoding.html#varints">Base
|
||||
* <a href="https://developers.google.com/protocol-buffers/docs/encoding?csw=1#varints">Base
|
||||
* 128 Varints</a> integer length field. For example:
|
||||
* <pre>
|
||||
* BEFORE ENCODE (300 bytes) AFTER ENCODE (302 bytes)
|
||||
@ -34,7 +34,8 @@ import io.netty.handler.codec.MessageToByteEncoder;
|
||||
* +---------------+ +--------+---------------+
|
||||
* </pre> *
|
||||
*
|
||||
* @see {@link CodedOutputStream} or (@link CodedOutputByteBufferNano)
|
||||
* @see CodedOutputStream
|
||||
* @see CodedOutputByteBufferNano
|
||||
*/
|
||||
@Sharable
|
||||
public class ProtobufVarint32LengthFieldPrepender extends MessageToByteEncoder<ByteBuf> {
|
||||
@ -53,9 +54,8 @@ public class ProtobufVarint32LengthFieldPrepender extends MessageToByteEncoder<B
|
||||
* Writes protobuf varint32 to (@link ByteBuf).
|
||||
* @param out to be written to
|
||||
* @param value to be written
|
||||
* @throws IOException
|
||||
*/
|
||||
static void writeRawVarint32(ByteBuf out, int value) throws IOException {
|
||||
static void writeRawVarint32(ByteBuf out, int value) {
|
||||
while (true) {
|
||||
if ((value & ~0x7F) == 0) {
|
||||
out.writeByte(value);
|
||||
|
@ -37,7 +37,7 @@ import static io.netty.util.internal.ObjectUtil.checkNotNull;
|
||||
* A string which has been encoded into a character encoding whose character always takes a single byte, similarly to
|
||||
* ASCII. It internally keeps its content in a byte array unlike {@link String}, which uses a character array, for
|
||||
* reduced memory footprint and faster data transfer from/to byte-based data structures such as a byte array and
|
||||
* {@link ByteBuffer}. It is often used in conjunction with {@link Headers} that require a {@link CharSequence}.
|
||||
* {@link ByteBuffer}. It is often used in conjunction with {@code Headers} that require a {@link CharSequence}.
|
||||
* <p>
|
||||
* This class was designed to provide an immutable array of bytes, and caches some internal state based upon the value
|
||||
* of this array. However underlying access to this byte array is provided via not copying the array on construction or
|
||||
@ -1144,7 +1144,7 @@ public final class AsciiString implements CharSequence, Comparable<CharSequence>
|
||||
|
||||
/**
|
||||
* Translates the entire byte string to a {@link String}.
|
||||
* @see {@link #toString(int)}
|
||||
* @see #toString(int)
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
@ -1157,7 +1157,7 @@ public final class AsciiString implements CharSequence, Comparable<CharSequence>
|
||||
|
||||
/**
|
||||
* Translates the entire byte string to a {@link String} using the {@code charset} encoding.
|
||||
* @see {@link #toString(int, int)}
|
||||
* @see #toString(int, int)
|
||||
*/
|
||||
public String toString(int start) {
|
||||
return toString(start, length());
|
||||
|
@ -81,7 +81,7 @@ public final class CharsetUtil {
|
||||
* @param charset The specified charset
|
||||
* @param malformedInputAction The encoder's action for malformed-input errors
|
||||
* @param unmappableCharacterAction The encoder's action for unmappable-character errors
|
||||
* @return The encoder for the specified <code>charset</code>
|
||||
* @return The encoder for the specified {@code charset}
|
||||
*/
|
||||
public static CharsetEncoder encoder(Charset charset, CodingErrorAction malformedInputAction,
|
||||
CodingErrorAction unmappableCharacterAction) {
|
||||
@ -96,7 +96,7 @@ public final class CharsetUtil {
|
||||
*
|
||||
* @param charset The specified charset
|
||||
* @param codingErrorAction The encoder's action for malformed-input and unmappable-character errors
|
||||
* @return The encoder for the specified <code>charset</code>
|
||||
* @return The encoder for the specified {@code charset}
|
||||
*/
|
||||
public static CharsetEncoder encoder(Charset charset, CodingErrorAction codingErrorAction) {
|
||||
return encoder(charset, codingErrorAction, codingErrorAction);
|
||||
@ -106,7 +106,7 @@ public final class CharsetUtil {
|
||||
* Returns a cached thread-local {@link CharsetEncoder} for the specified {@link Charset}.
|
||||
*
|
||||
* @param charset The specified charset
|
||||
* @return The encoder for the specified <code>charset</code>
|
||||
* @return The encoder for the specified {@code charset}
|
||||
*/
|
||||
public static CharsetEncoder encoder(Charset charset) {
|
||||
checkNotNull(charset, "charset");
|
||||
@ -137,7 +137,7 @@ public final class CharsetUtil {
|
||||
* @param charset The specified charset
|
||||
* @param malformedInputAction The decoder's action for malformed-input errors
|
||||
* @param unmappableCharacterAction The decoder's action for unmappable-character errors
|
||||
* @return The decoder for the specified <code>charset</code>
|
||||
* @return The decoder for the specified {@code charset}
|
||||
*/
|
||||
public static CharsetDecoder decoder(Charset charset, CodingErrorAction malformedInputAction,
|
||||
CodingErrorAction unmappableCharacterAction) {
|
||||
@ -152,7 +152,7 @@ public final class CharsetUtil {
|
||||
*
|
||||
* @param charset The specified charset
|
||||
* @param codingErrorAction The decoder's action for malformed-input and unmappable-character errors
|
||||
* @return The decoder for the specified <code>charset</code>
|
||||
* @return The decoder for the specified {@code charset}
|
||||
*/
|
||||
public static CharsetDecoder decoder(Charset charset, CodingErrorAction codingErrorAction) {
|
||||
return decoder(charset, codingErrorAction, codingErrorAction);
|
||||
@ -162,7 +162,7 @@ public final class CharsetUtil {
|
||||
* Returns a cached thread-local {@link CharsetDecoder} for the specified {@link Charset}.
|
||||
*
|
||||
* @param charset The specified charset
|
||||
* @return The decoder for the specified <code>charset</code>
|
||||
* @return The decoder for the specified {@code charset}
|
||||
*/
|
||||
public static CharsetDecoder decoder(Charset charset) {
|
||||
checkNotNull(charset, "charset");
|
||||
|
@ -75,7 +75,7 @@ public abstract class AbstractScheduledEventExecutor extends AbstractEventExecut
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link #pollScheduledTask(long)}
|
||||
* @see #pollScheduledTask(long)
|
||||
*/
|
||||
protected final Runnable pollScheduledTask() {
|
||||
return pollScheduledTask(nanoTime());
|
||||
|
@ -24,7 +24,7 @@ import java.util.concurrent.ThreadFactory;
|
||||
*/
|
||||
public class DefaultEventExecutorGroup extends MultithreadEventExecutorGroup {
|
||||
/**
|
||||
* @see {@link #DefaultEventExecutorGroup(int, ThreadFactory)}
|
||||
* @see #DefaultEventExecutorGroup(int, ThreadFactory)
|
||||
*/
|
||||
public DefaultEventExecutorGroup(int nThreads) {
|
||||
this(nThreads, null);
|
||||
|
@ -196,7 +196,7 @@ public abstract class SingleThreadEventExecutor extends AbstractScheduledEventEx
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link Queue#poll()}
|
||||
* @see Queue#poll()
|
||||
*/
|
||||
protected Runnable pollTask() {
|
||||
assert inEventLoop();
|
||||
@ -284,7 +284,7 @@ public abstract class SingleThreadEventExecutor extends AbstractScheduledEventEx
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link Queue#peek()}
|
||||
* @see Queue#peek()
|
||||
*/
|
||||
protected Runnable peekTask() {
|
||||
assert inEventLoop();
|
||||
@ -292,7 +292,7 @@ public abstract class SingleThreadEventExecutor extends AbstractScheduledEventEx
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link Queue#isEmpty()}
|
||||
* @see Queue#isEmpty()
|
||||
*/
|
||||
protected boolean hasTasks() {
|
||||
assert inEventLoop();
|
||||
@ -330,7 +330,7 @@ public abstract class SingleThreadEventExecutor extends AbstractScheduledEventEx
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link Queue#remove(Object)}
|
||||
* @see Queue#remove(Object)
|
||||
*/
|
||||
protected boolean removeTask(Runnable task) {
|
||||
if (task == null) {
|
||||
|
@ -20,42 +20,42 @@ package io.netty.util.concurrent;
|
||||
*/
|
||||
public interface ThreadProperties {
|
||||
/**
|
||||
* @see {@link Thread#getState()}.
|
||||
* @see Thread#getState()
|
||||
*/
|
||||
Thread.State state();
|
||||
|
||||
/**
|
||||
* @see {@link Thread#getPriority()}.
|
||||
* @see Thread#getPriority()
|
||||
*/
|
||||
int priority();
|
||||
|
||||
/**
|
||||
* @see {@link Thread#isInterrupted()}.
|
||||
* @see Thread#isInterrupted()
|
||||
*/
|
||||
boolean isInterrupted();
|
||||
|
||||
/**
|
||||
* @see {@link Thread#isDaemon()} ()}.
|
||||
* @see Thread#isDaemon()
|
||||
*/
|
||||
boolean isDaemon();
|
||||
|
||||
/**
|
||||
* @see {@link Thread#getName()} ()}.
|
||||
* @see Thread#getName()
|
||||
*/
|
||||
String name();
|
||||
|
||||
/**
|
||||
* @see {@link Thread#getId()}.
|
||||
* @see Thread#getId()
|
||||
*/
|
||||
long id();
|
||||
|
||||
/**
|
||||
* @see {@link Thread#getStackTrace()}.
|
||||
* @see Thread#getStackTrace()
|
||||
*/
|
||||
StackTraceElement[] stackTrace();
|
||||
|
||||
/**
|
||||
* @see {@link Thread#isAlive()}.
|
||||
* @see Thread#isAlive()
|
||||
*/
|
||||
boolean isAlive();
|
||||
}
|
||||
|
@ -22,8 +22,6 @@ import io.netty.channel.ChannelConfig;
|
||||
import io.netty.channel.ChannelDuplexHandler;
|
||||
import io.netty.channel.ChannelHandler;
|
||||
import io.netty.channel.ChannelHandlerContext;
|
||||
import io.netty.channel.ChannelInboundHandlerAdapter;
|
||||
import io.netty.channel.ChannelPipeline;
|
||||
import io.netty.handler.codec.ByteToMessageDecoder;
|
||||
import io.netty.handler.codec.MessageToByteEncoder;
|
||||
import io.netty.util.Recycler;
|
||||
@ -42,17 +40,17 @@ import io.netty.util.internal.logging.InternalLoggerFactory;
|
||||
* {@code HttpObjectDecoder} that will very often fire a {@code HttpRequest} that is immediately followed
|
||||
* by a {@code LastHttpContent} event.
|
||||
*
|
||||
* <pre>
|
||||
* {@link ChannelPipeline} pipeline = ...;
|
||||
* <pre>{@code
|
||||
* ChannelPipeline pipeline = ...;
|
||||
*
|
||||
* pipeline.addLast(new HttpServerCodec());
|
||||
* pipeline.addLast(new {@link FlowControlHandler}());
|
||||
* pipeline.addLast(new FlowControlHandler());
|
||||
*
|
||||
* pipeline.addLast(new MyExampleHandler());
|
||||
*
|
||||
* class MyExampleHandler extends {@link ChannelInboundHandlerAdapter} {
|
||||
* class MyExampleHandler extends ChannelInboundHandlerAdapter {
|
||||
* @Override
|
||||
* public void channelRead({@link ChannelHandlerContext} ctx, Object msg) {
|
||||
* public void channelRead(ChannelHandlerContext ctx, Object msg) {
|
||||
* if (msg instanceof HttpRequest) {
|
||||
* ctx.channel().config().setAutoRead(false);
|
||||
*
|
||||
@ -62,7 +60,7 @@ import io.netty.util.internal.logging.InternalLoggerFactory;
|
||||
* }
|
||||
* }
|
||||
* }
|
||||
* </pre>
|
||||
* }</pre>
|
||||
*
|
||||
* @see ChannelConfig#setAutoRead(boolean)
|
||||
*/
|
||||
|
@ -88,9 +88,6 @@ public final class JdkSslClientContext extends JdkSslContext {
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use the constructors that accept {@link ApplicationProtocolConfig} or
|
||||
* {@link ApplicationProtocolNegotiator} instead.
|
||||
*
|
||||
* Creates a new instance.
|
||||
*
|
||||
* @param certChainFile an X.509 certificate chain file in PEM format.
|
||||
|
@ -21,7 +21,7 @@ import io.netty.internal.tcnative.SSLContext;
|
||||
/**
|
||||
* Stats exposed by an OpenSSL session context.
|
||||
*
|
||||
* @see <a href="https://www.openssl.org/docs/ssl/SSL_CTX_sess_number.html"><code>SSL_CTX_sess_number</code></a>
|
||||
* @see <a href="https://www.openssl.org/docs/manmaster/man3/SSL_CTX_sess_number.html">SSL_CTX_sess_number</a>
|
||||
*/
|
||||
public final class OpenSslSessionStats {
|
||||
|
||||
|
@ -31,6 +31,6 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* Benchmarks for {@link io.netty.handler.codec.http2.hpack}.
|
||||
* Benchmarks for {@link io.netty.handler.codec.http2.internal.hpack}.
|
||||
*/
|
||||
package io.netty.microbench.http2.internal.hpack;
|
||||
|
@ -22,8 +22,8 @@ import io.netty.channel.udt.nio.NioUdtProvider;
|
||||
|
||||
/**
|
||||
* The message container that is used for {@link TypeUDT#DATAGRAM} messages.
|
||||
* @see {@link NioUdtProvider#MESSAGE_CONNECTOR}
|
||||
* @see {@link NioUdtProvider#MESSAGE_RENDEZVOUS}
|
||||
* @see NioUdtProvider#MESSAGE_CONNECTOR
|
||||
* @see NioUdtProvider#MESSAGE_RENDEZVOUS
|
||||
*/
|
||||
public final class UdtMessage extends DefaultByteBufHolder {
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
/**
|
||||
* UDT Transport for NIO Channels.
|
||||
* <p>
|
||||
* @see /netty/example/src/main/java/io/netty/example/udt
|
||||
* @see io.netty.example.udt
|
||||
*/
|
||||
package io.netty.channel.udt.nio;
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
/**
|
||||
* UDT Transport.
|
||||
* <p>
|
||||
* @see /netty/example/src/main/java/io/netty/example/udt
|
||||
* @see io.netty.example.udt
|
||||
*/
|
||||
package io.netty.channel.udt;
|
||||
|
||||
|
@ -141,21 +141,21 @@ public abstract class AbstractBootstrap<B extends AbstractBootstrap<B, C>, C ext
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link #localAddress(SocketAddress)}
|
||||
* @see #localAddress(SocketAddress)
|
||||
*/
|
||||
public B localAddress(int inetPort) {
|
||||
return localAddress(new InetSocketAddress(inetPort));
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link #localAddress(SocketAddress)}
|
||||
* @see #localAddress(SocketAddress)
|
||||
*/
|
||||
public B localAddress(String inetHost, int inetPort) {
|
||||
return localAddress(SocketUtils.socketAddress(inetHost, inetPort));
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link #localAddress(SocketAddress)}
|
||||
* @see #localAddress(SocketAddress)
|
||||
*/
|
||||
public B localAddress(InetAddress inetHost, int inetPort) {
|
||||
return localAddress(new InetSocketAddress(inetHost, inetPort));
|
||||
|
@ -91,7 +91,7 @@ public class Bootstrap extends AbstractBootstrap<Bootstrap, Channel> {
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link #remoteAddress(SocketAddress)}
|
||||
* @see #remoteAddress(SocketAddress)
|
||||
*/
|
||||
public Bootstrap remoteAddress(String inetHost, int inetPort) {
|
||||
remoteAddress = InetSocketAddress.createUnresolved(inetHost, inetPort);
|
||||
@ -99,7 +99,7 @@ public class Bootstrap extends AbstractBootstrap<Bootstrap, Channel> {
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link #remoteAddress(SocketAddress)}
|
||||
* @see #remoteAddress(SocketAddress)
|
||||
*/
|
||||
public Bootstrap remoteAddress(InetAddress inetHost, int inetPort) {
|
||||
remoteAddress = new InetSocketAddress(inetHost, inetPort);
|
||||
@ -157,7 +157,7 @@ public class Bootstrap extends AbstractBootstrap<Bootstrap, Channel> {
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link #connect()}
|
||||
* @see #connect()
|
||||
*/
|
||||
private ChannelFuture doResolveAndConnect(final SocketAddress remoteAddress, final SocketAddress localAddress) {
|
||||
final ChannelFuture regFuture = initAndRegister();
|
||||
|
@ -45,22 +45,22 @@ public abstract class MultithreadEventLoopGroup extends MultithreadEventExecutor
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link MultithreadEventExecutorGroup#MultithreadEventExecutorGroup(int, Executor, Object...)}
|
||||
* @see MultithreadEventExecutorGroup#MultithreadEventExecutorGroup(int, Executor, Object...)
|
||||
*/
|
||||
protected MultithreadEventLoopGroup(int nThreads, Executor executor, Object... args) {
|
||||
super(nThreads == 0 ? DEFAULT_EVENT_LOOP_THREADS : nThreads, executor, args);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link MultithreadEventExecutorGroup#MultithreadEventExecutorGroup(int, ThreadFactory, Object...)}
|
||||
* @see MultithreadEventExecutorGroup#MultithreadEventExecutorGroup(int, ThreadFactory, Object...)
|
||||
*/
|
||||
protected MultithreadEventLoopGroup(int nThreads, ThreadFactory threadFactory, Object... args) {
|
||||
super(nThreads == 0 ? DEFAULT_EVENT_LOOP_THREADS : nThreads, threadFactory, args);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link MultithreadEventExecutorGroup#MultithreadEventExecutorGroup(int, Executor,
|
||||
* EventExecutorChooserFactory, Object...)}
|
||||
* @see MultithreadEventExecutorGroup#MultithreadEventExecutorGroup(int, Executor,
|
||||
* EventExecutorChooserFactory, Object...)
|
||||
*/
|
||||
protected MultithreadEventLoopGroup(int nThreads, Executor executor, EventExecutorChooserFactory chooserFactory,
|
||||
Object... args) {
|
||||
|
@ -34,7 +34,7 @@ public interface RecvByteBufAllocator {
|
||||
Handle newHandle();
|
||||
|
||||
/**
|
||||
* @Deprecated Use {@link ExtendedHandle}.
|
||||
* @deprecated Use {@link ExtendedHandle}.
|
||||
*/
|
||||
@Deprecated
|
||||
interface Handle {
|
||||
|
@ -51,7 +51,7 @@ public abstract class SimpleChannelInboundHandler<I> extends ChannelInboundHandl
|
||||
private final boolean autoRelease;
|
||||
|
||||
/**
|
||||
* @see {@link #SimpleChannelInboundHandler(boolean)} with {@code true} as boolean parameter.
|
||||
* see {@link #SimpleChannelInboundHandler(boolean)} with {@code true} as boolean parameter.
|
||||
*/
|
||||
protected SimpleChannelInboundHandler() {
|
||||
this(true);
|
||||
@ -69,7 +69,7 @@ public abstract class SimpleChannelInboundHandler<I> extends ChannelInboundHandl
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link #SimpleChannelInboundHandler(Class, boolean)} with {@code true} as boolean value.
|
||||
* see {@link #SimpleChannelInboundHandler(Class, boolean)} with {@code true} as boolean value.
|
||||
*/
|
||||
protected SimpleChannelInboundHandler(Class<? extends I> inboundMessageType) {
|
||||
this(inboundMessageType, true);
|
||||
|
@ -36,7 +36,7 @@ public abstract class AbstractNioMessageChannel extends AbstractNioChannel {
|
||||
boolean inputShutdown;
|
||||
|
||||
/**
|
||||
* @see {@link AbstractNioChannel#AbstractNioChannel(Channel, SelectableChannel, int)}
|
||||
* @see AbstractNioChannel#AbstractNioChannel(Channel, SelectableChannel, int)
|
||||
*/
|
||||
protected AbstractNioMessageChannel(Channel parent, SelectableChannel ch, int readInterestOp) {
|
||||
super(parent, ch, readInterestOp);
|
||||
|
Loading…
Reference in New Issue
Block a user