RtspHeaders and its inner classes do not extend HttpHeaders anymore because RTSP user should not see non-RTSP header constants when he or she static-imported RtspHeaders.

This commit is contained in:
Trustin Lee 2010-01-26 08:25:29 +00:00
parent 9de5df705a
commit c2465826fd

View File

@ -17,6 +17,7 @@ package org.jboss.netty.handler.codec.rtsp;
import org.jboss.netty.handler.codec.http.HttpHeaders; import org.jboss.netty.handler.codec.http.HttpHeaders;
/** /**
* Standard RTSP header names and values. * Standard RTSP header names and values.
* *
@ -25,7 +26,7 @@ import org.jboss.netty.handler.codec.http.HttpHeaders;
* @author Trustin Lee (trustin@gmail.com) * @author Trustin Lee (trustin@gmail.com)
* @version $Rev$, $Date$ * @version $Rev$, $Date$
*/ */
public class RtspHeaders { public final class RtspHeaders {
/** /**
* Standard RTSP header names. * Standard RTSP header names.
@ -35,11 +36,27 @@ public class RtspHeaders {
* @author Trustin Lee (trustin@gmail.com) * @author Trustin Lee (trustin@gmail.com)
* @version $Rev$, $Date$ * @version $Rev$, $Date$
*/ */
public static class Names extends HttpHeaders.Names { public static final class Names {
/**
* {@code "Accept"}
*/
public static final String ACCEPT = HttpHeaders.Names.ACCEPT;
/**
* {@code "Accept-Encoding"}
*/
public static final String ACCEPT_ENCODING = HttpHeaders.Names.ACCEPT_ENCODING;
/**
* {@code "Accept-Lanugage"}
*/
public static final String ACCEPT_LANGUAGE = HttpHeaders.Names.ACCEPT_LANGUAGE;
/** /**
* {@code "Allow"} * {@code "Allow"}
*/ */
public static final String ALLOW = "Allow"; public static final String ALLOW = "Allow";
/**
* {@code "Authorization"}
*/
public static final String AUTHORIZATION = HttpHeaders.Names.AUTHORIZATION;
/** /**
* {@code "Bandwidth"} * {@code "Bandwidth"}
*/ */
@ -48,14 +65,82 @@ public class RtspHeaders {
* {@code "Blocksize"} * {@code "Blocksize"}
*/ */
public static final String BLOCKSIZE = "Blocksize"; public static final String BLOCKSIZE = "Blocksize";
/**
* {@code "Cache-Control"}
*/
public static final String CACHE_CONTROL = HttpHeaders.Names.CACHE_CONTROL;
/** /**
* {@code "Conference"} * {@code "Conference"}
*/ */
public static final String CONFERENCE = "Conference"; public static final String CONFERENCE = "Conference";
/**
* {@code "Connection"}
*/
public static final String CONNECTION = HttpHeaders.Names.CONNECTION;
/**
* {@code "Content-Base"}
*/
public static final String CONTENT_BASE = HttpHeaders.Names.CONTENT_BASE;
/**
* {@code "Content-Encoding"}
*/
public static final String CONTENT_ENCODING = HttpHeaders.Names.CONTENT_ENCODING;
/**
* {@code "Content-Language"}
*/
public static final String CONTENT_LANGUAGE = HttpHeaders.Names.CONTENT_LANGUAGE;
/**
* {@code "Content-Length"}
*/
public static final String CONTENT_LENGTH = HttpHeaders.Names.CONTENT_LENGTH;
/**
* {@code "Content-Location"}
*/
public static final String CONTENT_LOCATION = HttpHeaders.Names.CONTENT_LOCATION;
/**
* {@code "Content-Type"}
*/
public static final String CONTENT_TYPE = HttpHeaders.Names.CONTENT_TYPE;
/** /**
* {@code "CSeq"} * {@code "CSeq"}
*/ */
public static final String CSEQ = "CSeq"; public static final String CSEQ = "CSeq";
/**
* {@code "Date"}
*/
public static final String DATE = HttpHeaders.Names.DATE;
/**
* {@code "Expires"}
*/
public static final String EXPIRES = HttpHeaders.Names.EXPIRES;
/**
* {@code "From"}
*/
public static final String FROM = HttpHeaders.Names.FROM;
/**
* {@code "Host"}
*/
public static final String HOST = HttpHeaders.Names.HOST;
/**
* {@code "If-Match"}
*/
public static final String IF_MATCH = HttpHeaders.Names.IF_MATCH;
/**
* {@code "If-Modified-Since"}
*/
public static final String IF_MODIFIED_SINCE = HttpHeaders.Names.IF_MODIFIED_SINCE;
/**
* {@code "KeyMgmt"}
*/
public static final String KEYMGMT = "KeyMgmt";
/**
* {@code "Last-Modified"}
*/
public static final String LAST_MODIFIED = HttpHeaders.Names.LAST_MODIFIED;
/**
* {@code "Proxy-Authenticate"}
*/
public static final String PROXY_AUTHENTICATE = HttpHeaders.Names.PROXY_AUTHENTICATE;
/** /**
* {@code "Proxy-Require"} * {@code "Proxy-Require"}
*/ */
@ -64,10 +149,22 @@ public class RtspHeaders {
* {@code "Public"} * {@code "Public"}
*/ */
public static final String PUBLIC = "Public"; public static final String PUBLIC = "Public";
/**
* {@code "Range"}
*/
public static final String RANGE = HttpHeaders.Names.RANGE;
/**
* {@code "Referer"}
*/
public static final String REFERER = HttpHeaders.Names.REFERER;
/** /**
* {@code "Require"} * {@code "Require"}
*/ */
public static final String REQUIRE = "Require"; public static final String REQUIRE = "Require";
/**
* {@code "Retry-After"}
*/
public static final String RETRT_AFTER = HttpHeaders.Names.RETRY_AFTER;
/** /**
* {@code "RTP-Info"} * {@code "RTP-Info"}
*/ */
@ -76,14 +173,18 @@ public class RtspHeaders {
* {@code "Scale"} * {@code "Scale"}
*/ */
public static final String SCALE = "Scale"; public static final String SCALE = "Scale";
/**
* {@code "Speed"}
*/
public static final String SPEED = "Speed";
/** /**
* {@code "Session"} * {@code "Session"}
*/ */
public static final String SESSION = "Session"; public static final String SESSION = "Session";
/**
* {@code "Server"}
*/
public static final String SERVER = HttpHeaders.Names.SERVER;
/**
* {@code "Speed"}
*/
public static final String SPEED = "Speed";
/** /**
* {@code "Timestamp"} * {@code "Timestamp"}
*/ */
@ -96,8 +197,24 @@ public class RtspHeaders {
* {@code "Unsupported"} * {@code "Unsupported"}
*/ */
public static final String UNSUPPORTED = "Unsupported"; public static final String UNSUPPORTED = "Unsupported";
/**
* {@code "User-Agent"}
*/
public static final String USER_AGENT = HttpHeaders.Names.USER_AGENT;
/**
* {@code "Vary"}
*/
public static final String VARY = HttpHeaders.Names.VARY;
/**
* {@code "Via"}
*/
public static final String VIA = HttpHeaders.Names.VIA;
/**
* {@code "WWW-Authenticate"}
*/
public static final String WWW_AUTHENTICATE = HttpHeaders.Names.WWW_AUTHENTICATE;
protected Names() { private Names() {
super(); super();
} }
} }
@ -109,7 +226,7 @@ public class RtspHeaders {
* @author Trustin Lee (trustin@gmail.com) * @author Trustin Lee (trustin@gmail.com)
* @version $Rev$, $Date$ * @version $Rev$, $Date$
*/ */
public static class Values extends HttpHeaders.Values { public static final class Values {
/** /**
* {@code "append"} * {@code "append"}
*/ */
@ -118,22 +235,74 @@ public class RtspHeaders {
* {@code "AVP"} * {@code "AVP"}
*/ */
public static final String AVP = "AVP"; public static final String AVP = "AVP";
/**
* {@code "bytes"}
*/
public static final String BYTES = HttpHeaders.Values.BYTES;
/**
* {@code "charset"}
*/
public static final String CHARSET = HttpHeaders.Values.CHARSET;
/** /**
* {@code "client_port"} * {@code "client_port"}
*/ */
public static final String CLIENT_PORT = "client_port"; public static final String CLIENT_PORT = "client_port";
/**
* {@code "clock"}
*/
public static final String CLOCK = "clock";
/**
* {@code "close"}
*/
public static final String CLOSE = HttpHeaders.Values.CLOSE;
/**
* {@code "compress"}
*/
public static final String COMPRESS = HttpHeaders.Values.COMPRESS;
/**
* {@code "100-continue"}
*/
public static final String CONTINUE = HttpHeaders.Values.CONTINUE;
/**
* {@code "deflate"}
*/
public static final String DEFLATE = HttpHeaders.Values.DEFLATE;
/** /**
* {@code "destination"} * {@code "destination"}
*/ */
public static final String DESTINATION = "destination"; public static final String DESTINATION = "destination";
/**
* {@code "gzip"}
*/
public static final String GZIP = HttpHeaders.Values.GZIP;
/**
* {@code "identity"}
*/
public static final String IDENTITY = HttpHeaders.Values.IDENTITY;
/** /**
* {@code "interleaved"} * {@code "interleaved"}
*/ */
public static final String INTERLEAVED = "interleaved"; public static final String INTERLEAVED = "interleaved";
/**
* {@code "keep-alive"}
*/
public static final String KEEP_ALIVE = HttpHeaders.Values.KEEP_ALIVE;
/** /**
* {@code "layers"} * {@code "layers"}
*/ */
public static final String LAYERS = "layers"; public static final String LAYERS = "layers";
/**
* {@code "max-age"}
*/
public static final String MAX_AGE = HttpHeaders.Values.MAX_AGE;
/**
* {@code "max-stale"}
*/
public static final String MAX_STALE = HttpHeaders.Values.MAX_STALE;
/**
* {@code "min-fresh"}
*/
public static final String MIN_FRESH = HttpHeaders.Values.MIN_FRESH;
/** /**
* {@code "mode"} * {@code "mode"}
*/ */
@ -142,10 +311,42 @@ public class RtspHeaders {
* {@code "multicast"} * {@code "multicast"}
*/ */
public static final String MULTICAST = "multicast"; public static final String MULTICAST = "multicast";
/**
* {@code "must-revalidate"}
*/
public static final String MUST_REVALIDATE = HttpHeaders.Values.MUST_REVALIDATE;
/**
* {@code "none"}
*/
public static final String NONE = HttpHeaders.Values.NONE;
/**
* {@code "no-cache"}
*/
public static final String NO_CACHE = HttpHeaders.Values.NO_CACHE;
/**
* {@code "no-transform"}
*/
public static final String NO_TRANSFORM = HttpHeaders.Values.NO_TRANSFORM;
/**
* {@code "only-if-cached"}
*/
public static final String ONLY_IF_CACHED = HttpHeaders.Values.ONLY_IF_CACHED;
/** /**
* {@code "port"} * {@code "port"}
*/ */
public static final String PORT = "port"; public static final String PORT = "port";
/**
* {@code "private"}
*/
public static final String PRIVATE = HttpHeaders.Values.PRIVATE;
/**
* {@code "proxy-revalidate"}
*/
public static final String PROXY_REVALIDATE = HttpHeaders.Values.PROXY_REVALIDATE;
/**
* {@code "public"}
*/
public static final String PUBLIC = HttpHeaders.Values.PUBLIC;
/** /**
* {@code "RTP"} * {@code "RTP"}
*/ */
@ -170,6 +371,10 @@ public class RtspHeaders {
* {@code "TCP"} * {@code "TCP"}
*/ */
public static final String TCP = "TCP"; public static final String TCP = "TCP";
/**
* {@code "time"}
*/
public static final String TIME = "time";
/** /**
* {@code "timeout"} * {@code "timeout"}
*/ */
@ -196,7 +401,7 @@ public class RtspHeaders {
} }
} }
protected RtspHeaders() { private RtspHeaders() {
super(); super();
} }
} }