Updated APIviz tags and improved Javadoc of the HTTP codec
This commit is contained in:
parent
5c49cae981
commit
f15db3a65e
@ -31,6 +31,8 @@ import java.util.Set;
|
||||
* @author Trustin Lee (tlee@redhat.com)
|
||||
* @author Andy Taylor (andy.taylor@jboss.org)
|
||||
* @version $Rev$, $Date$
|
||||
*
|
||||
* @apiviz.landmark
|
||||
*/
|
||||
public interface Cookie extends Comparable<Cookie> {
|
||||
|
||||
|
@ -35,6 +35,12 @@ import java.util.regex.Pattern;
|
||||
* Decodes an HTTP header value into {@link Cookie}s. This decoder can decode
|
||||
* the HTTP cookie version 0, 1, and 2.
|
||||
*
|
||||
* <pre>
|
||||
* HttpRequest req = ...;
|
||||
* String value = req.getHeader("Cookie");
|
||||
* Set<Cookie> cookies = new CookieDecoder().decode(value);
|
||||
* </pre>
|
||||
*
|
||||
* @author The Netty Project (netty-dev@lists.jboss.org)
|
||||
* @author Andy Taylor (andy.taylor@jboss.org)
|
||||
* @author Trustin Lee (tlee@redhat.com)
|
||||
|
@ -35,6 +35,19 @@ import java.util.TreeSet;
|
||||
* method. Once {@link #encode()} is called, all added {@link Cookie}s are
|
||||
* encoded into an HTTP header value and all {@link Cookie}s in the internal
|
||||
* data structure are removed so that the encoder can start over.
|
||||
* <pre>
|
||||
* // Client-side example
|
||||
* HttpRequest req = ...;
|
||||
* CookieEncoder encoder = new CookieEncoder(false);
|
||||
* encoder.addCookie("JSESSIONID", "1234");
|
||||
* res.setHeader("Cookie", encoder.encode());
|
||||
*
|
||||
* // Server-side example
|
||||
* HttpResponse res = ...;
|
||||
* CookieEncoder encoder = new CookieEncoder(true);
|
||||
* encoder.addCookie("JSESSIONID", "1234");
|
||||
* res.setHeader("Set-Cookie", encoder.encode());
|
||||
* </pre>
|
||||
*
|
||||
* @author The Netty Project (netty-dev@lists.jboss.org)
|
||||
* @author Andy Taylor (andy.taylor@jboss.org)
|
||||
|
@ -39,6 +39,8 @@ import org.jboss.netty.channel.ChannelPipeline;
|
||||
* @version $Rev$, $Date$
|
||||
*
|
||||
* @see HttpChunkAggregator
|
||||
*
|
||||
* @apiviz.landmark
|
||||
*/
|
||||
public interface HttpChunk {
|
||||
|
||||
|
@ -55,6 +55,7 @@ import org.jboss.netty.handler.codec.frame.TooLongFrameException;
|
||||
* @author Trustin Lee (tlee@redhat.com)
|
||||
* @version $Rev$, $Date$
|
||||
*
|
||||
* @apiviz.landmark
|
||||
* @apiviz.has org.jboss.netty.handler.codec.http.HttpChunk oneway - - filters out
|
||||
*/
|
||||
@ChannelPipelineCoverage("one")
|
||||
|
@ -37,8 +37,10 @@ import org.jboss.netty.buffer.ChannelBuffers;
|
||||
* @author Trustin Lee (tlee@redhat.com)
|
||||
* @version $Rev$, $Date$
|
||||
*
|
||||
* @see HttpHeaders
|
||||
*
|
||||
* @apiviz.landmark
|
||||
* @apiviz.has org.jboss.netty.handler.codec.http.HttpChunk oneway - - is followed by
|
||||
* @apiviz.uses org.jboss.netty.handler.codec.http.HttpHeaders - - useful
|
||||
*/
|
||||
public interface HttpMessage {
|
||||
|
||||
|
@ -79,6 +79,8 @@ import org.jboss.netty.handler.codec.replay.ReplayingDecoder;
|
||||
* @author Andy Taylor (andy.taylor@jboss.org)
|
||||
* @author Trustin Lee (tlee@redhat.com)
|
||||
* @version $Rev$, $Date$
|
||||
*
|
||||
* @apiviz.landmark
|
||||
*/
|
||||
public abstract class HttpMessageDecoder extends ReplayingDecoder<HttpMessageDecoder.State> {
|
||||
|
||||
|
@ -53,6 +53,8 @@ import org.jboss.netty.handler.codec.oneone.OneToOneEncoder;
|
||||
* @author Andy Taylor (andy.taylor@jboss.org)
|
||||
* @author Trustin Lee (tlee@redhat.com)
|
||||
* @version $Rev$, $Date$
|
||||
*
|
||||
* @apiviz.landmark
|
||||
*/
|
||||
@ChannelPipelineCoverage("all")
|
||||
public abstract class HttpMessageEncoder extends OneToOneEncoder {
|
||||
|
@ -26,6 +26,13 @@ package org.jboss.netty.handler.codec.http;
|
||||
/**
|
||||
* An HTTP request.
|
||||
*
|
||||
* <h3>Accessing Query Parameters and Cookie</h3>
|
||||
* <p>
|
||||
* Unlike the Servlet API, a query string is constructed and decomposed by
|
||||
* {@link QueryStringEncoder} and {@link QueryStringDecoder}. {@link Cookie}
|
||||
* support is also provided separately via {@link CookieEncoder} and
|
||||
* {@link CookieDecoder}.
|
||||
*
|
||||
* @author The Netty Project (netty-dev@lists.jboss.org)
|
||||
* @author Andy Taylor (andy.taylor@jboss.org)
|
||||
* @version $Rev$, $Date$
|
||||
@ -33,6 +40,8 @@ package org.jboss.netty.handler.codec.http;
|
||||
* @see HttpResponse
|
||||
* @see QueryStringEncoder
|
||||
* @see QueryStringDecoder
|
||||
* @see CookieEncoder
|
||||
* @see CookieDecoder
|
||||
*/
|
||||
public interface HttpRequest extends HttpMessage {
|
||||
|
||||
|
@ -26,12 +26,19 @@ package org.jboss.netty.handler.codec.http;
|
||||
/**
|
||||
* An HTTP response.
|
||||
*
|
||||
* <h3>Accessing Cookie</h3>
|
||||
* <p>
|
||||
* Unlike the Servlet API, {@link Cookie} support is provided separately via
|
||||
* {@link CookieEncoder} and {@link CookieDecoder}.
|
||||
*
|
||||
* @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$
|
||||
*
|
||||
* @see HttpRequest
|
||||
* @see CookieEncoder
|
||||
* @see CookieDecoder
|
||||
*/
|
||||
public interface HttpResponse extends HttpMessage {
|
||||
|
||||
|
@ -47,8 +47,10 @@ import java.util.regex.Pattern;
|
||||
* @author Trustin Lee (tlee@redhat.com)
|
||||
* @version $Rev$, $Date$
|
||||
*
|
||||
* @apiviz.stereotype utility
|
||||
* @see QueryStringEncoder
|
||||
*
|
||||
* @apiviz.stereotype utility
|
||||
* @apiviz.has org.jboss.netty.handler.codec.http.HttpRequest oneway - - decodes
|
||||
*/
|
||||
public class QueryStringDecoder {
|
||||
|
||||
|
@ -45,8 +45,10 @@ import java.util.List;
|
||||
* @author Trustin Lee (tlee@redhat.com)
|
||||
* @version $Rev$, $Date$
|
||||
*
|
||||
* @apiviz.stereotype utility
|
||||
* @see QueryStringDecoder
|
||||
*
|
||||
* @apiviz.stereotype utility
|
||||
* @apiviz.has org.jboss.netty.handler.codec.http.HttpRequest oneway - - encodes
|
||||
*/
|
||||
public class QueryStringEncoder {
|
||||
|
||||
|
@ -24,9 +24,10 @@
|
||||
/**
|
||||
* Encoder, decoder and their related message types for HTTP.
|
||||
*
|
||||
* @apiviz.exclude HttpHeaders\.
|
||||
* @apiviz.exclude ^java\.lang\.
|
||||
* @apiviz.exclude OneToOne(Encoder|Decoder)$
|
||||
* @apiviz.exclude HttpHeaders
|
||||
* @apiviz.exclude (QueryString|Cookie)(Encoder|Decoder)$
|
||||
* @apiviz.exclude \.codec\.replay\.
|
||||
* @apiviz.exclude \.(Simple)?Channel[A-Za-z]*Handler$
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user