Fix various Javadoc issues / Do not use argN parameter names
This commit is contained in:
parent
ea4a0e3535
commit
aedf8790c3
@ -336,7 +336,7 @@ public interface ByteBuf extends ChannelBuf, Comparable<ByteBuf> {
|
|||||||
* buf.readerIndex(2);
|
* buf.readerIndex(2);
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* By contrast, {@link #setIndex(int, int)} guarantees that it never
|
* By contrast, this method guarantees that it never
|
||||||
* throws an {@link IndexOutOfBoundsException} as long as the specified
|
* throws an {@link IndexOutOfBoundsException} as long as the specified
|
||||||
* indexes meet basic constraints, regardless what the current index
|
* indexes meet basic constraints, regardless what the current index
|
||||||
* values of the buffer are:
|
* values of the buffer are:
|
||||||
|
@ -80,7 +80,7 @@ public interface HttpMessage extends HttpObject {
|
|||||||
/**
|
/**
|
||||||
* Returns the protocol version of this {@link HttpMessage}
|
* Returns the protocol version of this {@link HttpMessage}
|
||||||
*
|
*
|
||||||
* @returns The protocol version
|
* @return The protocol version
|
||||||
*/
|
*/
|
||||||
HttpVersion getProtocolVersion();
|
HttpVersion getProtocolVersion();
|
||||||
|
|
||||||
|
@ -69,9 +69,7 @@ public abstract class AbstractDiskHttpData extends AbstractHttpData {
|
|||||||
protected abstract boolean deleteOnExit();
|
protected abstract boolean deleteOnExit();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @return a new Temp File from getDiskFilename(), default prefix, postfix and baseDirectory
|
* @return a new Temp File from getDiskFilename(), default prefix, postfix and baseDirectory
|
||||||
* @throws IOException
|
|
||||||
*/
|
*/
|
||||||
private File tempFile() throws IOException {
|
private File tempFile() throws IOException {
|
||||||
String newpostfix = null;
|
String newpostfix = null;
|
||||||
@ -330,9 +328,7 @@ public abstract class AbstractDiskHttpData extends AbstractHttpData {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Utility function
|
* Utility function
|
||||||
* @param src
|
|
||||||
* @return the array of bytes
|
* @return the array of bytes
|
||||||
* @throws IOException
|
|
||||||
*/
|
*/
|
||||||
private static byte[] readFrom(File src) throws IOException {
|
private static byte[] readFrom(File src) throws IOException {
|
||||||
long srcsize = src.length();
|
long srcsize = src.length();
|
||||||
|
@ -28,7 +28,6 @@ public interface Attribute extends HttpData {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the value of this HttpData.
|
* Sets the value of this HttpData.
|
||||||
* @param value
|
|
||||||
*/
|
*/
|
||||||
void setValue(String value) throws IOException;
|
void setValue(String value) throws IOException;
|
||||||
}
|
}
|
||||||
|
@ -60,7 +60,6 @@ public class DefaultHttpDataFactory implements HttpDataFactory {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* HttpData will be always on Disk if useDisk is True, else always in Memory if False
|
* HttpData will be always on Disk if useDisk is True, else always in Memory if False
|
||||||
* @param useDisk
|
|
||||||
*/
|
*/
|
||||||
public DefaultHttpDataFactory(boolean useDisk) {
|
public DefaultHttpDataFactory(boolean useDisk) {
|
||||||
this.useDisk = useDisk;
|
this.useDisk = useDisk;
|
||||||
@ -70,7 +69,6 @@ public class DefaultHttpDataFactory implements HttpDataFactory {
|
|||||||
/**
|
/**
|
||||||
* HttpData will be on Disk if the size of the file is greater than minSize, else it
|
* HttpData will be on Disk if the size of the file is greater than minSize, else it
|
||||||
* will be in memory. The type will be Mixed.
|
* will be in memory. The type will be Mixed.
|
||||||
* @param minSize
|
|
||||||
*/
|
*/
|
||||||
public DefaultHttpDataFactory(long minSize) {
|
public DefaultHttpDataFactory(long minSize) {
|
||||||
useDisk = false;
|
useDisk = false;
|
||||||
@ -79,8 +77,6 @@ public class DefaultHttpDataFactory implements HttpDataFactory {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @param request
|
|
||||||
* @return the associated list of Files for the request
|
* @return the associated list of Files for the request
|
||||||
*/
|
*/
|
||||||
private List<HttpData> getList(HttpRequest request) {
|
private List<HttpData> getList(HttpRequest request) {
|
||||||
|
@ -36,19 +36,11 @@ public class DiskAttribute extends AbstractDiskHttpData implements Attribute {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor used for huge Attribute
|
* Constructor used for huge Attribute
|
||||||
* @param name
|
|
||||||
*/
|
*/
|
||||||
public DiskAttribute(String name) {
|
public DiskAttribute(String name) {
|
||||||
super(name, HttpConstants.DEFAULT_CHARSET, 0);
|
super(name, HttpConstants.DEFAULT_CHARSET, 0);
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @param name
|
|
||||||
* @param value
|
|
||||||
* @throws NullPointerException
|
|
||||||
* @throws IllegalArgumentException
|
|
||||||
* @throws IOException
|
|
||||||
*/
|
|
||||||
public DiskAttribute(String name, String value) throws IOException {
|
public DiskAttribute(String name, String value) throws IOException {
|
||||||
super(name, HttpConstants.DEFAULT_CHARSET, 0); // Attribute have no default size
|
super(name, HttpConstants.DEFAULT_CHARSET, 0); // Attribute have no default size
|
||||||
setValue(value);
|
setValue(value);
|
||||||
|
@ -30,7 +30,6 @@ public interface FileUpload extends HttpData {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the original filename
|
* Set the original filename
|
||||||
* @param filename
|
|
||||||
*/
|
*/
|
||||||
void setFilename(String filename);
|
void setFilename(String filename);
|
||||||
|
|
||||||
@ -48,7 +47,6 @@ public interface FileUpload extends HttpData {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the Content-Transfer-Encoding type from String as 7bit, 8bit or binary
|
* Set the Content-Transfer-Encoding type from String as 7bit, 8bit or binary
|
||||||
* @param contentTransferEncoding
|
|
||||||
*/
|
*/
|
||||||
void setContentTransferEncoding(String contentTransferEncoding);
|
void setContentTransferEncoding(String contentTransferEncoding);
|
||||||
|
|
||||||
|
@ -105,10 +105,8 @@ public interface HttpData extends InterfaceHttpData {
|
|||||||
* read. Once it arrives at the end, it returns an EMPTY_BUFFER and it
|
* read. Once it arrives at the end, it returns an EMPTY_BUFFER and it
|
||||||
* resets the current position to 0.
|
* resets the current position to 0.
|
||||||
*
|
*
|
||||||
* @param length
|
|
||||||
* @return a ChannelBuffer for the content from the current position or an
|
* @return a ChannelBuffer for the content from the current position or an
|
||||||
* EMPTY_BUFFER if there is no more data to return
|
* EMPTY_BUFFER if there is no more data to return
|
||||||
* @throws IOException
|
|
||||||
*/
|
*/
|
||||||
ByteBuf getChunk(int length) throws IOException;
|
ByteBuf getChunk(int length) throws IOException;
|
||||||
|
|
||||||
|
@ -15,10 +15,10 @@
|
|||||||
*/
|
*/
|
||||||
package io.netty.handler.codec.http.multipart;
|
package io.netty.handler.codec.http.multipart;
|
||||||
|
|
||||||
import java.nio.charset.Charset;
|
|
||||||
|
|
||||||
import io.netty.handler.codec.http.HttpRequest;
|
import io.netty.handler.codec.http.HttpRequest;
|
||||||
|
|
||||||
|
import java.nio.charset.Charset;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Interface to enable creation of InterfaceHttpData objects
|
* Interface to enable creation of InterfaceHttpData objects
|
||||||
*/
|
*/
|
||||||
@ -26,31 +26,18 @@ public interface HttpDataFactory {
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param request associated request
|
* @param request associated request
|
||||||
* @param name
|
|
||||||
* @return a new Attribute with no value
|
* @return a new Attribute with no value
|
||||||
* @throws NullPointerException
|
|
||||||
* @throws IllegalArgumentException
|
|
||||||
*/
|
*/
|
||||||
Attribute createAttribute(HttpRequest request, String name);
|
Attribute createAttribute(HttpRequest request, String name);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @param request associated request
|
* @param request associated request
|
||||||
* @param name
|
|
||||||
* @param value
|
|
||||||
* @return a new Attribute
|
* @return a new Attribute
|
||||||
* @throws NullPointerException
|
|
||||||
* @throws IllegalArgumentException
|
|
||||||
*/
|
*/
|
||||||
Attribute createAttribute(HttpRequest request, String name, String value);
|
Attribute createAttribute(HttpRequest request, String name, String value);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @param request associated request
|
* @param request associated request
|
||||||
* @param name
|
|
||||||
* @param filename
|
|
||||||
* @param contentType
|
|
||||||
* @param charset
|
|
||||||
* @param size the size of the Uploaded file
|
* @param size the size of the Uploaded file
|
||||||
* @return a new FileUpload
|
* @return a new FileUpload
|
||||||
*/
|
*/
|
||||||
@ -62,7 +49,6 @@ public interface HttpDataFactory {
|
|||||||
* Remove the given InterfaceHttpData from clean list (will not delete the file, except if the file
|
* Remove the given InterfaceHttpData from clean list (will not delete the file, except if the file
|
||||||
* is still a temporary one as setup at construction)
|
* is still a temporary one as setup at construction)
|
||||||
* @param request associated request
|
* @param request associated request
|
||||||
* @param data
|
|
||||||
*/
|
*/
|
||||||
void removeHttpDataFromClean(HttpRequest request, InterfaceHttpData data);
|
void removeHttpDataFromClean(HttpRequest request, InterfaceHttpData data);
|
||||||
|
|
||||||
|
@ -140,9 +140,6 @@ final class HttpPostBodyUtil {
|
|||||||
int limit;
|
int limit;
|
||||||
ByteBuf buffer;
|
ByteBuf buffer;
|
||||||
|
|
||||||
/**
|
|
||||||
* @param buffer
|
|
||||||
*/
|
|
||||||
SeekAheadOptimize(ByteBuf buffer) throws SeekAheadNoBackArrayException {
|
SeekAheadOptimize(ByteBuf buffer) throws SeekAheadNoBackArrayException {
|
||||||
if (!buffer.hasArray()) {
|
if (!buffer.hasArray()) {
|
||||||
throw new SeekAheadNoBackArrayException();
|
throw new SeekAheadNoBackArrayException();
|
||||||
@ -185,8 +182,6 @@ final class HttpPostBodyUtil {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Find the first non whitespace
|
* Find the first non whitespace
|
||||||
* @param sb
|
|
||||||
* @param offset
|
|
||||||
* @return the rank of the first non whitespace
|
* @return the rank of the first non whitespace
|
||||||
*/
|
*/
|
||||||
static int findNonWhitespace(String sb, int offset) {
|
static int findNonWhitespace(String sb, int offset) {
|
||||||
@ -201,8 +196,6 @@ final class HttpPostBodyUtil {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Find the first whitespace
|
* Find the first whitespace
|
||||||
* @param sb
|
|
||||||
* @param offset
|
|
||||||
* @return the rank of the first whitespace
|
* @return the rank of the first whitespace
|
||||||
*/
|
*/
|
||||||
static int findWhitespace(String sb, int offset) {
|
static int findWhitespace(String sb, int offset) {
|
||||||
@ -217,7 +210,6 @@ final class HttpPostBodyUtil {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Find the end of String
|
* Find the end of String
|
||||||
* @param sb
|
|
||||||
* @return the rank of the end of string
|
* @return the rank of the end of string
|
||||||
*/
|
*/
|
||||||
static int findEndOfString(String sb) {
|
static int findEndOfString(String sb) {
|
||||||
|
@ -247,9 +247,6 @@ public class HttpPostRequestDecoder {
|
|||||||
/**
|
/**
|
||||||
* Check from the request ContentType if this request is a Multipart
|
* Check from the request ContentType if this request is a Multipart
|
||||||
* request.
|
* request.
|
||||||
*
|
|
||||||
* @param contentType
|
|
||||||
* @throws ErrorDataDecoderException
|
|
||||||
*/
|
*/
|
||||||
private void checkMultipart(String contentType) throws ErrorDataDecoderException {
|
private void checkMultipart(String contentType) throws ErrorDataDecoderException {
|
||||||
// Check if Post using "multipart/form-data; boundary=--89421926422648"
|
// Check if Post using "multipart/form-data; boundary=--89421926422648"
|
||||||
@ -301,7 +298,6 @@ public class HttpPostRequestDecoder {
|
|||||||
* If chunked, all chunks must have been offered using offer() method. If
|
* If chunked, all chunks must have been offered using offer() method. If
|
||||||
* not, NotEnoughDataDecoderException will be raised.
|
* not, NotEnoughDataDecoderException will be raised.
|
||||||
*
|
*
|
||||||
* @param name
|
|
||||||
* @return All Body HttpDatas with the given name (ignore case)
|
* @return All Body HttpDatas with the given name (ignore case)
|
||||||
* @throws NotEnoughDataDecoderException
|
* @throws NotEnoughDataDecoderException
|
||||||
* need more chunks
|
* need more chunks
|
||||||
@ -320,7 +316,6 @@ public class HttpPostRequestDecoder {
|
|||||||
* If chunked, all chunks must have been offered using offer() method. If
|
* If chunked, all chunks must have been offered using offer() method. If
|
||||||
* not, NotEnoughDataDecoderException will be raised.
|
* not, NotEnoughDataDecoderException will be raised.
|
||||||
*
|
*
|
||||||
* @param name
|
|
||||||
* @return The first Body InterfaceHttpData with the given name (ignore
|
* @return The first Body InterfaceHttpData with the given name (ignore
|
||||||
* case)
|
* case)
|
||||||
* @throws NotEnoughDataDecoderException
|
* @throws NotEnoughDataDecoderException
|
||||||
@ -421,8 +416,6 @@ public class HttpPostRequestDecoder {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Utility function to add a new decoded data
|
* Utility function to add a new decoded data
|
||||||
*
|
|
||||||
* @param data
|
|
||||||
*/
|
*/
|
||||||
private void addHttpData(InterfaceHttpData data) {
|
private void addHttpData(InterfaceHttpData data) {
|
||||||
if (data == null) {
|
if (data == null) {
|
||||||
@ -692,10 +685,7 @@ public class HttpPostRequestDecoder {
|
|||||||
/**
|
/**
|
||||||
* Decode component
|
* Decode component
|
||||||
*
|
*
|
||||||
* @param s
|
|
||||||
* @param charset
|
|
||||||
* @return the decoded component
|
* @return the decoded component
|
||||||
* @throws ErrorDataDecoderException
|
|
||||||
*/
|
*/
|
||||||
private static String decodeAttribute(String s, Charset charset) throws ErrorDataDecoderException {
|
private static String decodeAttribute(String s, Charset charset) throws ErrorDataDecoderException {
|
||||||
if (s == null) {
|
if (s == null) {
|
||||||
@ -744,7 +734,6 @@ public class HttpPostRequestDecoder {
|
|||||||
*
|
*
|
||||||
* Inspired from HttpMessageDecoder
|
* Inspired from HttpMessageDecoder
|
||||||
*
|
*
|
||||||
* @param state
|
|
||||||
* @return the next decoded InterfaceHttpData or null if none until now.
|
* @return the next decoded InterfaceHttpData or null if none until now.
|
||||||
* @throws ErrorDataDecoderException
|
* @throws ErrorDataDecoderException
|
||||||
* if an error occurs
|
* if an error occurs
|
||||||
@ -1480,7 +1469,6 @@ public class HttpPostRequestDecoder {
|
|||||||
* Read a FileUpload data as Byte (Binary) and add the bytes directly to the
|
* Read a FileUpload data as Byte (Binary) and add the bytes directly to the
|
||||||
* FileUpload. If the delimiter is found, the FileUpload is completed.
|
* FileUpload. If the delimiter is found, the FileUpload is completed.
|
||||||
*
|
*
|
||||||
* @param delimiter
|
|
||||||
* @throws NotEnoughDataDecoderException
|
* @throws NotEnoughDataDecoderException
|
||||||
* Need more chunks but do not reset the readerInder since some
|
* Need more chunks but do not reset the readerInder since some
|
||||||
* values will be already added to the FileOutput
|
* values will be already added to the FileOutput
|
||||||
@ -1577,7 +1565,6 @@ public class HttpPostRequestDecoder {
|
|||||||
* Read a FileUpload data as Byte (Binary) and add the bytes directly to the
|
* Read a FileUpload data as Byte (Binary) and add the bytes directly to the
|
||||||
* FileUpload. If the delimiter is found, the FileUpload is completed.
|
* FileUpload. If the delimiter is found, the FileUpload is completed.
|
||||||
*
|
*
|
||||||
* @param delimiter
|
|
||||||
* @throws NotEnoughDataDecoderException
|
* @throws NotEnoughDataDecoderException
|
||||||
* Need more chunks but do not reset the readerInder since some
|
* Need more chunks but do not reset the readerInder since some
|
||||||
* values will be already added to the FileOutput
|
* values will be already added to the FileOutput
|
||||||
@ -1938,7 +1925,6 @@ public class HttpPostRequestDecoder {
|
|||||||
/**
|
/**
|
||||||
* Split the very first line (Content-Type value) in 2 Strings
|
* Split the very first line (Content-Type value) in 2 Strings
|
||||||
*
|
*
|
||||||
* @param sb
|
|
||||||
* @return the array of 2 Strings
|
* @return the array of 2 Strings
|
||||||
*/
|
*/
|
||||||
private static String[] splitHeaderContentType(String sb) {
|
private static String[] splitHeaderContentType(String sb) {
|
||||||
@ -1963,7 +1949,6 @@ public class HttpPostRequestDecoder {
|
|||||||
/**
|
/**
|
||||||
* Split one header in Multipart
|
* Split one header in Multipart
|
||||||
*
|
*
|
||||||
* @param sb
|
|
||||||
* @return an array of String where rank 0 is the name of the header,
|
* @return an array of String where rank 0 is the name of the header,
|
||||||
* follows by several values that were separated by ';' or ','
|
* follows by several values that were separated by ';' or ','
|
||||||
*/
|
*/
|
||||||
@ -2012,35 +1997,21 @@ public class HttpPostRequestDecoder {
|
|||||||
* enough data are available (need more chunks)
|
* enough data are available (need more chunks)
|
||||||
*/
|
*/
|
||||||
public static class NotEnoughDataDecoderException extends Exception {
|
public static class NotEnoughDataDecoderException extends Exception {
|
||||||
/**
|
|
||||||
*/
|
|
||||||
private static final long serialVersionUID = -7846841864603865638L;
|
private static final long serialVersionUID = -7846841864603865638L;
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
public NotEnoughDataDecoderException() {
|
public NotEnoughDataDecoderException() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public NotEnoughDataDecoderException(String msg) {
|
||||||
* @param arg0
|
super(msg);
|
||||||
*/
|
|
||||||
public NotEnoughDataDecoderException(String arg0) {
|
|
||||||
super(arg0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public NotEnoughDataDecoderException(Throwable cause) {
|
||||||
* @param arg0
|
super(cause);
|
||||||
*/
|
|
||||||
public NotEnoughDataDecoderException(Throwable arg0) {
|
|
||||||
super(arg0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public NotEnoughDataDecoderException(String msg, Throwable cause) {
|
||||||
* @param arg0
|
super(msg, cause);
|
||||||
* @param arg1
|
|
||||||
*/
|
|
||||||
public NotEnoughDataDecoderException(String arg0, Throwable arg1) {
|
|
||||||
super(arg0, arg1);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2058,33 +2029,19 @@ public class HttpPostRequestDecoder {
|
|||||||
* Exception when an error occurs while decoding
|
* Exception when an error occurs while decoding
|
||||||
*/
|
*/
|
||||||
public static class ErrorDataDecoderException extends Exception {
|
public static class ErrorDataDecoderException extends Exception {
|
||||||
/**
|
|
||||||
*/
|
|
||||||
private static final long serialVersionUID = 5020247425493164465L;
|
private static final long serialVersionUID = 5020247425493164465L;
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
public ErrorDataDecoderException() {
|
public ErrorDataDecoderException() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param arg0
|
|
||||||
*/
|
|
||||||
public ErrorDataDecoderException(String arg0) {
|
public ErrorDataDecoderException(String arg0) {
|
||||||
super(arg0);
|
super(arg0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param arg0
|
|
||||||
*/
|
|
||||||
public ErrorDataDecoderException(Throwable arg0) {
|
public ErrorDataDecoderException(Throwable arg0) {
|
||||||
super(arg0);
|
super(arg0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param arg0
|
|
||||||
* @param arg1
|
|
||||||
*/
|
|
||||||
public ErrorDataDecoderException(String arg0, Throwable arg1) {
|
public ErrorDataDecoderException(String arg0, Throwable arg1) {
|
||||||
super(arg0, arg1);
|
super(arg0, arg1);
|
||||||
}
|
}
|
||||||
@ -2094,35 +2051,21 @@ public class HttpPostRequestDecoder {
|
|||||||
* Exception when an unappropriated method was called on a request
|
* Exception when an unappropriated method was called on a request
|
||||||
*/
|
*/
|
||||||
public static class IncompatibleDataDecoderException extends Exception {
|
public static class IncompatibleDataDecoderException extends Exception {
|
||||||
/**
|
|
||||||
*/
|
|
||||||
private static final long serialVersionUID = -953268047926250267L;
|
private static final long serialVersionUID = -953268047926250267L;
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
public IncompatibleDataDecoderException() {
|
public IncompatibleDataDecoderException() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public IncompatibleDataDecoderException(String msg) {
|
||||||
* @param arg0
|
super(msg);
|
||||||
*/
|
|
||||||
public IncompatibleDataDecoderException(String arg0) {
|
|
||||||
super(arg0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public IncompatibleDataDecoderException(Throwable cause) {
|
||||||
* @param arg0
|
super(cause);
|
||||||
*/
|
|
||||||
public IncompatibleDataDecoderException(Throwable arg0) {
|
|
||||||
super(arg0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public IncompatibleDataDecoderException(String msg, Throwable cause) {
|
||||||
* @param arg0
|
super(msg, cause);
|
||||||
* @param arg1
|
|
||||||
*/
|
|
||||||
public IncompatibleDataDecoderException(String arg0, Throwable arg1) {
|
|
||||||
super(arg0, arg1);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -242,7 +242,6 @@ public class HttpPostRequestEncoder implements ChunkedMessageInput<HttpChunk> {
|
|||||||
/**
|
/**
|
||||||
* Set the Body HttpDatas list
|
* Set the Body HttpDatas list
|
||||||
*
|
*
|
||||||
* @param datas
|
|
||||||
* @throws NullPointerException
|
* @throws NullPointerException
|
||||||
* for datas
|
* for datas
|
||||||
* @throws ErrorDataEncoderException
|
* @throws ErrorDataEncoderException
|
||||||
@ -361,7 +360,6 @@ public class HttpPostRequestEncoder implements ChunkedMessageInput<HttpChunk> {
|
|||||||
/**
|
/**
|
||||||
* Add the InterfaceHttpData to the Body list
|
* Add the InterfaceHttpData to the Body list
|
||||||
*
|
*
|
||||||
* @param data
|
|
||||||
* @throws NullPointerException
|
* @throws NullPointerException
|
||||||
* for data
|
* for data
|
||||||
* @throws ErrorDataEncoderException
|
* @throws ErrorDataEncoderException
|
||||||
@ -685,8 +683,6 @@ public class HttpPostRequestEncoder implements ChunkedMessageInput<HttpChunk> {
|
|||||||
/**
|
/**
|
||||||
* Encode one attribute
|
* Encode one attribute
|
||||||
*
|
*
|
||||||
* @param s
|
|
||||||
* @param charset
|
|
||||||
* @return the encoded attribute
|
* @return the encoded attribute
|
||||||
* @throws ErrorDataEncoderException
|
* @throws ErrorDataEncoderException
|
||||||
* if the encoding is in error
|
* if the encoding is in error
|
||||||
@ -1000,26 +996,16 @@ public class HttpPostRequestEncoder implements ChunkedMessageInput<HttpChunk> {
|
|||||||
public ErrorDataEncoderException() {
|
public ErrorDataEncoderException() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public ErrorDataEncoderException(String msg) {
|
||||||
* @param arg0
|
super(msg);
|
||||||
*/
|
|
||||||
public ErrorDataEncoderException(String arg0) {
|
|
||||||
super(arg0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public ErrorDataEncoderException(Throwable cause) {
|
||||||
* @param arg0
|
super(cause);
|
||||||
*/
|
|
||||||
public ErrorDataEncoderException(Throwable arg0) {
|
|
||||||
super(arg0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public ErrorDataEncoderException(String msg, Throwable cause) {
|
||||||
* @param arg0
|
super(msg, cause);
|
||||||
* @param arg1
|
|
||||||
*/
|
|
||||||
public ErrorDataEncoderException(String arg0, Throwable arg1) {
|
|
||||||
super(arg0, arg1);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,10 +15,11 @@
|
|||||||
*/
|
*/
|
||||||
package io.netty.handler.codec.http.multipart;
|
package io.netty.handler.codec.http.multipart;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
import io.netty.handler.codec.http.HttpConstants;
|
import io.netty.handler.codec.http.HttpConstants;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
import static io.netty.buffer.Unpooled.*;
|
import static io.netty.buffer.Unpooled.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -29,14 +30,7 @@ public class MemoryAttribute extends AbstractMemoryHttpData implements Attribute
|
|||||||
public MemoryAttribute(String name) {
|
public MemoryAttribute(String name) {
|
||||||
super(name, HttpConstants.DEFAULT_CHARSET, 0);
|
super(name, HttpConstants.DEFAULT_CHARSET, 0);
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @param name
|
|
||||||
* @param value
|
|
||||||
* @throws NullPointerException
|
|
||||||
* @throws IllegalArgumentException
|
|
||||||
* @throws IOException
|
|
||||||
*/
|
|
||||||
public MemoryAttribute(String name, String value) throws IOException {
|
public MemoryAttribute(String name, String value) throws IOException {
|
||||||
super(name, HttpConstants.DEFAULT_CHARSET, 0); // Attribute have no default size
|
super(name, HttpConstants.DEFAULT_CHARSET, 0); // Attribute have no default size
|
||||||
setValue(value);
|
setValue(value);
|
||||||
@ -89,12 +83,12 @@ public class MemoryAttribute extends AbstractMemoryHttpData implements Attribute
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int compareTo(InterfaceHttpData arg0) {
|
public int compareTo(InterfaceHttpData other) {
|
||||||
if (!(arg0 instanceof Attribute)) {
|
if (!(other instanceof Attribute)) {
|
||||||
throw new ClassCastException("Cannot compare " + getHttpDataType() +
|
throw new ClassCastException("Cannot compare " + getHttpDataType() +
|
||||||
" with " + arg0.getHttpDataType());
|
" with " + other.getHttpDataType());
|
||||||
}
|
}
|
||||||
return compareTo((Attribute) arg0);
|
return compareTo((Attribute) other);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int compareTo(Attribute o) {
|
public int compareTo(Attribute o) {
|
||||||
|
@ -18,7 +18,7 @@ package io.netty.handler.codec;
|
|||||||
/**
|
/**
|
||||||
* An {@link Exception} which is thrown by a codec.
|
* An {@link Exception} which is thrown by a codec.
|
||||||
*
|
*
|
||||||
* @apiviz.hidden
|
* @apiviz.exclude
|
||||||
*/
|
*/
|
||||||
public class CodecException extends RuntimeException {
|
public class CodecException extends RuntimeException {
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ package io.netty.handler.codec;
|
|||||||
* An {@link Exception} which is thrown when the received frame data could not be decoded by
|
* An {@link Exception} which is thrown when the received frame data could not be decoded by
|
||||||
* an inbound handler.
|
* an inbound handler.
|
||||||
*
|
*
|
||||||
* @apiviz.hidden
|
* @apiviz.exclude
|
||||||
*/
|
*/
|
||||||
public class CorruptedFrameException extends DecoderException {
|
public class CorruptedFrameException extends DecoderException {
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ package io.netty.handler.codec;
|
|||||||
/**
|
/**
|
||||||
* An {@link Exception} which is thrown by an encoder.
|
* An {@link Exception} which is thrown by an encoder.
|
||||||
*
|
*
|
||||||
* @apiviz.hidden
|
* @apiviz.exclude
|
||||||
*/
|
*/
|
||||||
public class DecoderException extends CodecException {
|
public class DecoderException extends CodecException {
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ package io.netty.handler.codec;
|
|||||||
/**
|
/**
|
||||||
* An {@link Exception} which is thrown by an encoder.
|
* An {@link Exception} which is thrown by an encoder.
|
||||||
*
|
*
|
||||||
* @apiviz.hidden
|
* @apiviz.exclude
|
||||||
*/
|
*/
|
||||||
public class EncoderException extends CodecException {
|
public class EncoderException extends CodecException {
|
||||||
|
|
||||||
|
@ -18,7 +18,8 @@ package io.netty.handler.codec;
|
|||||||
/**
|
/**
|
||||||
* An {@link Exception} which is thrown when the length of the frame
|
* An {@link Exception} which is thrown when the length of the frame
|
||||||
* decoded by {@link DelimiterBasedFrameDecoder} is greater than the maximum.
|
* decoded by {@link DelimiterBasedFrameDecoder} is greater than the maximum.
|
||||||
* @apiviz.hidden
|
*
|
||||||
|
* @apiviz.exclude
|
||||||
*/
|
*/
|
||||||
public class TooLongFrameException extends DecoderException {
|
public class TooLongFrameException extends DecoderException {
|
||||||
|
|
||||||
|
@ -48,7 +48,6 @@ public interface EventRateMonitor {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Record {@code count} event occurrences.
|
* Record {@code count} event occurrences.
|
||||||
* @param count
|
|
||||||
*/
|
*/
|
||||||
void events(long count);
|
void events(long count);
|
||||||
}
|
}
|
||||||
|
@ -49,7 +49,6 @@ public interface ValueDistributionMonitor {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Record {@code value}.
|
* Record {@code value}.
|
||||||
* @param value
|
|
||||||
*/
|
*/
|
||||||
void update(long value);
|
void update(long value);
|
||||||
}
|
}
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
package io.netty.util;
|
package io.netty.util;
|
||||||
|
|
||||||
import static org.junit.Assert.assertTrue;
|
|
||||||
import io.netty.monitor.CounterMonitor;
|
import io.netty.monitor.CounterMonitor;
|
||||||
import io.netty.monitor.EventRateMonitor;
|
import io.netty.monitor.EventRateMonitor;
|
||||||
import io.netty.monitor.MonitorName;
|
import io.netty.monitor.MonitorName;
|
||||||
import io.netty.monitor.MonitorRegistry;
|
import io.netty.monitor.MonitorRegistry;
|
||||||
import io.netty.monitor.ValueDistributionMonitor;
|
import io.netty.monitor.ValueDistributionMonitor;
|
||||||
import io.netty.monitor.ValueMonitor;
|
import io.netty.monitor.ValueMonitor;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
import java.util.concurrent.CountDownLatch;
|
import java.util.concurrent.CountDownLatch;
|
||||||
import java.util.concurrent.Executors;
|
import java.util.concurrent.Executors;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
import org.junit.Test;
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
public class HashedWheelTimerMonitorTest {
|
public class HashedWheelTimerMonitorTest {
|
||||||
|
|
||||||
@ -51,10 +51,6 @@ public class HashedWheelTimerMonitorTest {
|
|||||||
|
|
||||||
private final EventRateMonitor eventRateMonitor;
|
private final EventRateMonitor eventRateMonitor;
|
||||||
|
|
||||||
/**
|
|
||||||
* @param eventDistributionMonitor
|
|
||||||
* @param eventRateMonitor
|
|
||||||
*/
|
|
||||||
RecordingMonitorRegistry(final ValueDistributionMonitor eventDistributionMonitor,
|
RecordingMonitorRegistry(final ValueDistributionMonitor eventDistributionMonitor,
|
||||||
final EventRateMonitor eventRateMonitor) {
|
final EventRateMonitor eventRateMonitor) {
|
||||||
this.eventDistributionMonitor = eventDistributionMonitor;
|
this.eventDistributionMonitor = eventDistributionMonitor;
|
||||||
|
@ -204,8 +204,6 @@ public class HttpUploadServerHandler extends ChannelInboundMessageHandlerAdapter
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Example of reading all InterfaceHttpData from finished transfer
|
* Example of reading all InterfaceHttpData from finished transfer
|
||||||
*
|
|
||||||
* @param channel
|
|
||||||
*/
|
*/
|
||||||
private void readHttpDataAllReceive(Channel channel) {
|
private void readHttpDataAllReceive(Channel channel) {
|
||||||
List<InterfaceHttpData> datas = null;
|
List<InterfaceHttpData> datas = null;
|
||||||
@ -227,8 +225,6 @@ public class HttpUploadServerHandler extends ChannelInboundMessageHandlerAdapter
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Example of reading request by chunk and getting values from chunk to chunk
|
* Example of reading request by chunk and getting values from chunk to chunk
|
||||||
*
|
|
||||||
* @param channel
|
|
||||||
*/
|
*/
|
||||||
private void readHttpDataChunkByChunk(Channel channel) {
|
private void readHttpDataChunkByChunk(Channel channel) {
|
||||||
try {
|
try {
|
||||||
|
@ -28,9 +28,6 @@ class YammerCounterMonitor implements CounterMonitor {
|
|||||||
|
|
||||||
private final Counter delegate;
|
private final Counter delegate;
|
||||||
|
|
||||||
/**
|
|
||||||
* @param delegate
|
|
||||||
*/
|
|
||||||
YammerCounterMonitor(final Counter delegate) {
|
YammerCounterMonitor(final Counter delegate) {
|
||||||
if (delegate == null) {
|
if (delegate == null) {
|
||||||
throw new NullPointerException("delegate");
|
throw new NullPointerException("delegate");
|
||||||
@ -38,49 +35,31 @@ class YammerCounterMonitor implements CounterMonitor {
|
|||||||
this.delegate = delegate;
|
this.delegate = delegate;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @see CounterMonitor#inc()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void inc() {
|
public void inc() {
|
||||||
delegate.inc();
|
delegate.inc();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @see CounterMonitor#inc(long)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void inc(final long delta) {
|
public void inc(final long delta) {
|
||||||
delegate.inc(delta);
|
delegate.inc(delta);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @see CounterMonitor#decr()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void decr() {
|
public void decr() {
|
||||||
delegate.dec();
|
delegate.dec();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @see CounterMonitor#decr(long)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void decr(final long delta) {
|
public void decr(final long delta) {
|
||||||
delegate.dec(delta);
|
delegate.dec(delta);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @see CounterMonitor#reset()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void reset() {
|
public void reset() {
|
||||||
delegate.clear();
|
delegate.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @see Object#toString()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "YammerCounterMonitor(delegate=" + delegate + ')';
|
return "YammerCounterMonitor(delegate=" + delegate + ')';
|
||||||
|
@ -28,9 +28,6 @@ class YammerEventRateMonitor implements EventRateMonitor {
|
|||||||
|
|
||||||
private final Meter delegate;
|
private final Meter delegate;
|
||||||
|
|
||||||
/**
|
|
||||||
* @param delegate
|
|
||||||
*/
|
|
||||||
YammerEventRateMonitor(final Meter delegate) {
|
YammerEventRateMonitor(final Meter delegate) {
|
||||||
if (delegate == null) {
|
if (delegate == null) {
|
||||||
throw new NullPointerException("delegate");
|
throw new NullPointerException("delegate");
|
||||||
@ -39,7 +36,6 @@ class YammerEventRateMonitor implements EventRateMonitor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see EventRateMonitor#event()
|
|
||||||
* @see Meter#mark()
|
* @see Meter#mark()
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@ -48,7 +44,6 @@ class YammerEventRateMonitor implements EventRateMonitor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see EventRateMonitor#events(long)
|
|
||||||
* @see Meter#mark(long)
|
* @see Meter#mark(long)
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@ -56,9 +51,6 @@ class YammerEventRateMonitor implements EventRateMonitor {
|
|||||||
delegate.mark(count);
|
delegate.mark(count);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @see Object#toString()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "YammerEventRateMonitor(delegate=" + delegate + ')';
|
return "YammerEventRateMonitor(delegate=" + delegate + ')';
|
||||||
|
@ -28,9 +28,6 @@ final class YammerValueDistributionMonitor implements ValueDistributionMonitor {
|
|||||||
|
|
||||||
private final Histogram delegate;
|
private final Histogram delegate;
|
||||||
|
|
||||||
/**
|
|
||||||
* @param delegate
|
|
||||||
*/
|
|
||||||
YammerValueDistributionMonitor(final Histogram delegate) {
|
YammerValueDistributionMonitor(final Histogram delegate) {
|
||||||
if (delegate == null) {
|
if (delegate == null) {
|
||||||
throw new NullPointerException("delegate");
|
throw new NullPointerException("delegate");
|
||||||
@ -38,25 +35,16 @@ final class YammerValueDistributionMonitor implements ValueDistributionMonitor {
|
|||||||
this.delegate = delegate;
|
this.delegate = delegate;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @see io.netty.monitor.EventDistributionMonitor#reset()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void reset() {
|
public void reset() {
|
||||||
delegate.clear();
|
delegate.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @see io.netty.monitor.EventDistributionMonitor#update(long)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void update(final long value) {
|
public void update(final long value) {
|
||||||
delegate.update(value);
|
delegate.update(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @see Object#toString()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "YammerEventDistributionMonitor(delegate=" + delegate + ')';
|
return "YammerEventDistributionMonitor(delegate=" + delegate + ')';
|
||||||
|
@ -33,15 +33,10 @@ public class YammerMonitorRegistryFactory implements MonitorRegistryFactory {
|
|||||||
|
|
||||||
private final MetricsRegistry metricsRegistry;
|
private final MetricsRegistry metricsRegistry;
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
public YammerMonitorRegistryFactory() {
|
public YammerMonitorRegistryFactory() {
|
||||||
this(Metrics.defaultRegistry());
|
this(Metrics.defaultRegistry());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param metricsRegistry
|
|
||||||
*/
|
|
||||||
public YammerMonitorRegistryFactory(final MetricsRegistry metricsRegistry) {
|
public YammerMonitorRegistryFactory(final MetricsRegistry metricsRegistry) {
|
||||||
if (metricsRegistry == null) {
|
if (metricsRegistry == null) {
|
||||||
throw new NullPointerException("metricsRegistry");
|
throw new NullPointerException("metricsRegistry");
|
||||||
@ -49,25 +44,16 @@ public class YammerMonitorRegistryFactory implements MonitorRegistryFactory {
|
|||||||
this.metricsRegistry = metricsRegistry;
|
this.metricsRegistry = metricsRegistry;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @see MonitorRegistryFactory#provider()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public MonitorProvider provider() {
|
public MonitorProvider provider() {
|
||||||
return YammerProvider.PROVIDER;
|
return YammerProvider.PROVIDER;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @see MonitorRegistryFactory#newMonitorRegistry()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public MonitorRegistry newMonitorRegistry() {
|
public MonitorRegistry newMonitorRegistry() {
|
||||||
return new YammerMonitorRegistry(metricsRegistry);
|
return new YammerMonitorRegistry(metricsRegistry);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @see Object#toString()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "YammerMonitorRegistryFactory(metricsRegistry=" + metricsRegistry + ')';
|
return "YammerMonitorRegistryFactory(metricsRegistry=" + metricsRegistry + ')';
|
||||||
|
@ -17,7 +17,8 @@ package io.netty.channel;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* A {@link RuntimeException} which is thrown when an I/O operation fails.
|
* A {@link RuntimeException} which is thrown when an I/O operation fails.
|
||||||
* @apiviz.hidden
|
*
|
||||||
|
* @apiviz.exclude
|
||||||
*/
|
*/
|
||||||
public class ChannelException extends RuntimeException {
|
public class ChannelException extends RuntimeException {
|
||||||
|
|
||||||
|
@ -19,7 +19,8 @@ package io.netty.channel;
|
|||||||
* A {@link RuntimeException} which is thrown when a
|
* A {@link RuntimeException} which is thrown when a
|
||||||
* {@link LifeCycleAwareChannelHandler} throws an {@link Exception}
|
* {@link LifeCycleAwareChannelHandler} throws an {@link Exception}
|
||||||
* in its handler methods.
|
* in its handler methods.
|
||||||
* @apiviz.hidden
|
*
|
||||||
|
* @apiviz.exclude
|
||||||
*/
|
*/
|
||||||
public class ChannelHandlerLifeCycleException extends RuntimeException {
|
public class ChannelHandlerLifeCycleException extends RuntimeException {
|
||||||
|
|
||||||
|
@ -19,7 +19,8 @@ package io.netty.channel;
|
|||||||
* A {@link ChannelException} which is thrown when a {@link ChannelPipeline}
|
* A {@link ChannelException} which is thrown when a {@link ChannelPipeline}
|
||||||
* failed to process a {@link ChannelEvent} or when a {@link ChannelPipelineFactory}
|
* failed to process a {@link ChannelEvent} or when a {@link ChannelPipelineFactory}
|
||||||
* failed to initialize a {@link ChannelPipeline}.
|
* failed to initialize a {@link ChannelPipeline}.
|
||||||
* @apiviz.hidden
|
*
|
||||||
|
* @apiviz.exclude
|
||||||
*/
|
*/
|
||||||
public class ChannelPipelineException extends ChannelException {
|
public class ChannelPipelineException extends ChannelException {
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user