* APIviz tagging
* Added missing @version tags
This commit is contained in:
parent
748c169ee2
commit
a30c36d8e2
@ -32,6 +32,9 @@ import org.jboss.netty.channel.Channel;
|
||||
* @author The Netty Project (netty-dev@lists.jboss.org)
|
||||
* @author Trustin Lee (tlee@redhat.com)
|
||||
* @version $Rev$, $Date$
|
||||
*
|
||||
* @apiviz.landmark
|
||||
* @apiviz.has org.jboss.netty.group.ChannelGroupFuture oneway - - returns
|
||||
*/
|
||||
public interface ChannelGroup extends Set<Channel>, Comparable<ChannelGroup> {
|
||||
String getName();
|
||||
|
@ -30,6 +30,9 @@ import java.util.concurrent.ConcurrentMap;
|
||||
* @author The Netty Project (netty-dev@lists.jboss.org)
|
||||
* @author Trustin Lee (tlee@redhat.com)
|
||||
* @version $Rev$, $Date$
|
||||
*
|
||||
* @apiviz.landmark
|
||||
* @apiviz.has org.jboss.netty.group.ChannelGroup oneway - - creates
|
||||
*/
|
||||
public class ChannelGroupFactory {
|
||||
|
||||
|
@ -32,6 +32,8 @@ import org.jboss.netty.channel.ChannelFuture;
|
||||
* @author The Netty Project (netty-dev@lists.jboss.org)
|
||||
* @author Trustin Lee (tlee@redhat.com)
|
||||
* @version $Rev$, $Date$
|
||||
*
|
||||
* @apiviz.owns org.jboss.netty.group.ChannelGroupFutureListener - - notifies
|
||||
*/
|
||||
public interface ChannelGroupFuture extends Iterable<ChannelFuture>{
|
||||
|
||||
|
@ -24,5 +24,8 @@
|
||||
/**
|
||||
* A global channel registry which helps a user maintain the list of open
|
||||
* channels and perform bulk operations on them.
|
||||
*
|
||||
* @apiviz.exclude ^java
|
||||
* @apiviz.exclude \.(Abstract|Default).*$
|
||||
*/
|
||||
package org.jboss.netty.group;
|
||||
|
@ -26,6 +26,8 @@ package org.jboss.netty.handler.codec.embedder;
|
||||
* @author The Netty Project (netty-dev@lists.jboss.org)
|
||||
* @author Trustin Lee (tlee@redhat.com)
|
||||
* @version $Rev$, $Date$
|
||||
*
|
||||
* @apiviz.exclude
|
||||
*/
|
||||
public class CodecEmbedderException extends RuntimeException {
|
||||
|
||||
|
@ -37,6 +37,7 @@ import org.jboss.netty.buffer.ChannelBuffer;
|
||||
* @author The Netty Project (netty-dev@lists.jboss.org)
|
||||
* @author Andy Taylor (andy.taylor@jboss.org)
|
||||
* @author Trustin Lee (tlee@redhat.com)
|
||||
* @version $Rev$, $Date$
|
||||
*/
|
||||
public class DefaultHttpMessage implements HttpMessage {
|
||||
private final static Comparator<String> caseIgnoringComparator = new CaseIgnoringComparator();
|
||||
|
@ -28,6 +28,7 @@ package org.jboss.netty.handler.codec.http;
|
||||
* @author The Netty Project (netty-dev@lists.jboss.org)
|
||||
* @author Andy Taylor (andy.taylor@jboss.org)
|
||||
* @author Trustin Lee (tlee@redhat.com)
|
||||
* @version $Rev$, $Date$
|
||||
*/
|
||||
public class DefaultHttpRequest extends DefaultHttpMessage implements HttpRequest {
|
||||
|
||||
|
@ -27,6 +27,7 @@ package org.jboss.netty.handler.codec.http;
|
||||
* @author The Netty Project (netty-dev@lists.jboss.org)
|
||||
* @author Andy Taylor (andy.taylor@jboss.org)
|
||||
* @author Trustin Lee (tlee@redhat.com)
|
||||
* @version $Rev$, $Date$
|
||||
*/
|
||||
public class DefaultHttpResponse extends DefaultHttpMessage implements HttpResponse {
|
||||
private final HttpResponseStatus status;
|
||||
|
@ -24,6 +24,7 @@ package org.jboss.netty.handler.codec.http;
|
||||
/**
|
||||
* @author The Netty Project (netty-dev@lists.jboss.org)
|
||||
* @author Andy Taylor (andy.taylor@jboss.org)
|
||||
* @version $Rev$, $Date$
|
||||
*/
|
||||
class HttpCodecUtil {
|
||||
//space ' '
|
||||
|
@ -24,6 +24,7 @@ package org.jboss.netty.handler.codec.http;
|
||||
/**
|
||||
* @author The Netty Project (netty-dev@lists.jboss.org)
|
||||
* @author Andy Taylor (andy.taylor@jboss.org)
|
||||
* @version $Rev$, $Date$
|
||||
*/
|
||||
public class HttpHeaders {
|
||||
public static final String HOST = "Host";
|
||||
@ -43,6 +44,4 @@ public class HttpHeaders {
|
||||
|
||||
public static final String CHUNKED = "Chunked";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -32,6 +32,7 @@ import org.jboss.netty.buffer.ChannelBuffer;
|
||||
* @author The Netty Project (netty-dev@lists.jboss.org)
|
||||
* @author Andy Taylor (andy.taylor@jboss.org)
|
||||
* @author Trustin Lee (tlee@redhat.com)
|
||||
* @version $Rev$, $Date$
|
||||
*/
|
||||
public interface HttpMessage {
|
||||
String getHeader(String name);
|
||||
|
@ -37,8 +37,9 @@ import org.jboss.netty.handler.codec.replay.ReplayingDecoder;
|
||||
* @author The Netty Project (netty-dev@lists.jboss.org)
|
||||
* @author Andy Taylor (andy.taylor@jboss.org)
|
||||
* @author Trustin Lee (tlee@redhat.com)
|
||||
* @version $Rev$, $Date$
|
||||
*/
|
||||
public abstract class HttpMessageDecoder extends ReplayingDecoder<HttpMessageDecoder.ResponseState> {
|
||||
public abstract class HttpMessageDecoder extends ReplayingDecoder<HttpMessageDecoder.State> {
|
||||
|
||||
private static final Pattern INITIAL_PATTERN = Pattern.compile(
|
||||
"^\\s*(\\S+)\\s+(\\S+)\\s+(.*)\\s*$");
|
||||
@ -49,7 +50,14 @@ public abstract class HttpMessageDecoder extends ReplayingDecoder<HttpMessageDec
|
||||
private ChannelBuffer content;
|
||||
private int chunkSize;
|
||||
|
||||
public enum ResponseState {
|
||||
/**
|
||||
* @author The Netty Project (netty-dev@lists.jboss.org)
|
||||
* @author Trustin Lee (tlee@redhat.com)
|
||||
* @version $Rev$, $Date$
|
||||
*
|
||||
* @apiviz.exclude
|
||||
*/
|
||||
protected enum State {
|
||||
READ_INITIAL,
|
||||
READ_HEADER,
|
||||
READ_CONTENT,
|
||||
@ -59,14 +67,14 @@ public abstract class HttpMessageDecoder extends ReplayingDecoder<HttpMessageDec
|
||||
READ_CRLF,;
|
||||
}
|
||||
|
||||
private ResponseState nextState;
|
||||
private State nextState;
|
||||
|
||||
protected HttpMessageDecoder() {
|
||||
super(ResponseState.READ_INITIAL);
|
||||
super(State.READ_INITIAL);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Object decode(ChannelHandlerContext ctx, Channel channel, ChannelBuffer buffer, ResponseState state) throws Exception {
|
||||
protected Object decode(ChannelHandlerContext ctx, Channel channel, ChannelBuffer buffer, State state) throws Exception {
|
||||
switch (state) {
|
||||
case READ_INITIAL: {
|
||||
readInitial(buffer);
|
||||
@ -111,7 +119,7 @@ public abstract class HttpMessageDecoder extends ReplayingDecoder<HttpMessageDec
|
||||
return reset();
|
||||
}
|
||||
else {
|
||||
checkpoint(ResponseState.READ_CHUNKED_CONTENT);
|
||||
checkpoint(State.READ_CHUNKED_CONTENT);
|
||||
}
|
||||
}
|
||||
case READ_CHUNKED_CONTENT: {
|
||||
@ -136,7 +144,7 @@ public abstract class HttpMessageDecoder extends ReplayingDecoder<HttpMessageDec
|
||||
message.setContent(content);
|
||||
content = null;
|
||||
nextState = null;
|
||||
checkpoint(ResponseState.READ_INITIAL);
|
||||
checkpoint(State.READ_INITIAL);
|
||||
return message;
|
||||
}
|
||||
|
||||
@ -145,8 +153,8 @@ public abstract class HttpMessageDecoder extends ReplayingDecoder<HttpMessageDec
|
||||
content = ChannelBuffers.dynamicBuffer(chunkSize);
|
||||
}
|
||||
content.writeBytes(buffer, chunkSize);
|
||||
nextState = ResponseState.READ_CHUNK_SIZE;
|
||||
checkpoint(ResponseState.READ_CRLF);
|
||||
nextState = State.READ_CHUNK_SIZE;
|
||||
checkpoint(State.READ_CRLF);
|
||||
}
|
||||
|
||||
private void readFixedLengthContent(ChannelBuffer buffer) {
|
||||
@ -183,15 +191,15 @@ public abstract class HttpMessageDecoder extends ReplayingDecoder<HttpMessageDec
|
||||
System.out.println(n + ": " + v);
|
||||
}
|
||||
}
|
||||
ResponseState nextState;
|
||||
State nextState;
|
||||
if (message.getContentLength() >= 0) {
|
||||
nextState = ResponseState.READ_FIXED_LENGTH_CONTENT;
|
||||
nextState = State.READ_FIXED_LENGTH_CONTENT;
|
||||
}
|
||||
else if (message.isChunked()) {
|
||||
nextState = ResponseState.READ_CHUNK_SIZE;
|
||||
nextState = State.READ_CHUNK_SIZE;
|
||||
}
|
||||
else {
|
||||
nextState = ResponseState.READ_CONTENT;
|
||||
nextState = State.READ_CONTENT;
|
||||
}
|
||||
checkpoint(nextState);
|
||||
}
|
||||
|
@ -40,6 +40,7 @@ import org.jboss.netty.channel.SimpleChannelHandler;
|
||||
* @author The Netty Project (netty-dev@lists.jboss.org)
|
||||
* @author Andy Taylor (andy.taylor@jboss.org)
|
||||
* @author Trustin Lee (tlee@redhat.com)
|
||||
* @version $Rev$, $Date$
|
||||
*/
|
||||
@ChannelPipelineCoverage("one")
|
||||
public abstract class HttpMessageEncoder extends SimpleChannelHandler {
|
||||
|
@ -26,6 +26,9 @@ package org.jboss.netty.handler.codec.http;
|
||||
*
|
||||
* @author The Netty Project (netty-dev@lists.jboss.org)
|
||||
* @author Andy Taylor (andy.taylor@jboss.org)
|
||||
* @version $Rev$, $Date$
|
||||
*
|
||||
* @apiviz.exclude
|
||||
*/
|
||||
public enum HttpMethod {
|
||||
/**
|
||||
|
@ -27,6 +27,10 @@ package org.jboss.netty.handler.codec.http;
|
||||
*
|
||||
* @author The Netty Project (netty-dev@lists.jboss.org)
|
||||
* @author Andy Taylor (andy.taylor@jboss.org)
|
||||
* @version $Rev$, $Date$
|
||||
*
|
||||
* @see QueryStringEncoder
|
||||
* @see QueryStringDecoder
|
||||
*/
|
||||
public interface HttpRequest extends HttpMessage {
|
||||
|
||||
|
@ -29,13 +29,14 @@ import org.jboss.netty.buffer.ChannelBuffer;
|
||||
* @author The Netty Project (netty-dev@lists.jboss.org)
|
||||
* @author Andy Taylor (andy.taylor@jboss.org)
|
||||
* @author Trustin Lee (tlee@redhat.com)
|
||||
* @version $Rev$, $Date$
|
||||
*/
|
||||
public class HttpRequestDecoder extends HttpMessageDecoder {
|
||||
|
||||
@Override
|
||||
protected void readInitial(ChannelBuffer buffer) throws Exception{
|
||||
String line = readIntoCurrentLine(buffer);
|
||||
checkpoint(ResponseState.READ_HEADER);
|
||||
checkpoint(State.READ_HEADER);
|
||||
String[] split = splitInitial(line);
|
||||
message = new DefaultHttpRequest(
|
||||
HttpVersion.decode(split[2]), HttpMethod.valueOf(split[0]), split[1]);
|
||||
|
@ -31,6 +31,7 @@ import org.jboss.netty.buffer.ChannelBuffer;
|
||||
* @author The Netty Project (netty-dev@lists.jboss.org)
|
||||
* @author Andy Taylor (andy.taylor@jboss.org)
|
||||
* @author Trustin Lee (tlee@redhat.com)
|
||||
* @version $Rev$, $Date$
|
||||
*/
|
||||
public class HttpRequestEncoder extends HttpMessageEncoder {
|
||||
|
||||
|
@ -28,6 +28,7 @@ package org.jboss.netty.handler.codec.http;
|
||||
* @author The Netty Project (netty-dev@lists.jboss.org)
|
||||
* @author Andy Taylor (andy.taylor@jboss.org)
|
||||
* @author Trustin Lee (tlee@redhat.com)
|
||||
* @version $Rev$, $Date$
|
||||
*/
|
||||
public interface HttpResponse extends HttpMessage {
|
||||
HttpResponseStatus getStatus();
|
||||
|
@ -29,12 +29,13 @@ import org.jboss.netty.buffer.ChannelBuffer;
|
||||
* @author The Netty Project (netty-dev@lists.jboss.org)
|
||||
* @author Andy Taylor (andy.taylor@jboss.org)
|
||||
* @author Trustin Lee (tlee@redhat.com)
|
||||
* @version $Rev$, $Date$
|
||||
*/
|
||||
public class HttpResponseDecoder extends HttpMessageDecoder {
|
||||
@Override
|
||||
protected void readInitial(ChannelBuffer buffer) {
|
||||
String line = readIntoCurrentLine(buffer);
|
||||
checkpoint(ResponseState.READ_HEADER);
|
||||
checkpoint(State.READ_HEADER);
|
||||
String[] split = splitInitial(line);
|
||||
message = new DefaultHttpResponse(HttpVersion.decode(split[0]), new HttpResponseStatus(Integer.valueOf(split[1]), split[2]));
|
||||
}
|
||||
|
@ -31,6 +31,7 @@ import org.jboss.netty.buffer.ChannelBuffer;
|
||||
* @author The Netty Project (netty-dev@lists.jboss.org)
|
||||
* @author Andy Taylor (andy.taylor@jboss.org)
|
||||
* @author Trustin Lee (tlee@redhat.com)
|
||||
* @version $Rev$, $Date$
|
||||
*/
|
||||
public class HttpResponseEncoder extends HttpMessageEncoder {
|
||||
@Override
|
||||
|
@ -28,6 +28,9 @@ package org.jboss.netty.handler.codec.http;
|
||||
* @author The Netty Project (netty-dev@lists.jboss.org)
|
||||
* @author Andy Taylor (andy.taylor@jboss.org)
|
||||
* @author Trustin Lee (tlee@redhat.com)
|
||||
* @version $Rev$, $Date$
|
||||
*
|
||||
* @apiviz.exclude
|
||||
*/
|
||||
public class HttpResponseStatus {
|
||||
|
||||
|
@ -27,6 +27,9 @@ package org.jboss.netty.handler.codec.http;
|
||||
* @author The Netty Project (netty-dev@lists.jboss.org)
|
||||
* @author Andy Taylor (andy.taylor@jboss.org)
|
||||
* @author Trustin Lee (tlee@redhat.com)
|
||||
* @version $Rev$, $Date$
|
||||
*
|
||||
* @apiviz.exclude
|
||||
*/
|
||||
public enum HttpVersion {
|
||||
HTTP_1_0("HTTP/1.0"),
|
||||
|
@ -30,6 +30,7 @@ import java.util.Map;
|
||||
/**
|
||||
* @author The Netty Project (netty-dev@lists.jboss.org)
|
||||
* @author Andy Taylor (andy.taylor@jboss.org)
|
||||
* @version $Rev$, $Date$
|
||||
*/
|
||||
public class QueryStringDecoder {
|
||||
|
||||
|
@ -29,6 +29,7 @@ import java.util.List;
|
||||
/**
|
||||
* @author The Netty Project (netty-dev@lists.jboss.org)
|
||||
* @author Andy Taylor (andy.taylor@jboss.org)
|
||||
* @version $Rev$, $Date$
|
||||
*/
|
||||
public class QueryStringEncoder {
|
||||
|
||||
|
@ -23,5 +23,8 @@
|
||||
|
||||
/**
|
||||
* Encoder, decoder and their related message types for HTTP.
|
||||
*
|
||||
* @apiviz.exclude \.HttpHeaders.*$
|
||||
* @apiviz.exclude \.QueryString.*$
|
||||
*/
|
||||
package org.jboss.netty.handler.codec.http;
|
||||
|
Loading…
Reference in New Issue
Block a user