Remove deprecated HttpHeaders sub classes and related classes (#8813)
Motivation: Code cleanup; Changes: - Removed deprecated HttpHeaders.Names and HttpHeaders.Values sub classes; - Removed cross reference between EmptyHttpHeaders and HttpHeaders; - Removed depraced Rtsp* classes; Result: Removed deprecated code.
This commit is contained in:
parent
d7648f1d93
commit
ab0c33adff
@ -23,22 +23,10 @@ import java.util.Map.Entry;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
public class EmptyHttpHeaders extends HttpHeaders {
|
public class EmptyHttpHeaders extends HttpHeaders {
|
||||||
static final Iterator<Entry<CharSequence, CharSequence>> EMPTY_CHARS_ITERATOR =
|
private static final Iterator<Entry<CharSequence, CharSequence>> EMPTY_CHARS_ITERATOR =
|
||||||
Collections.<Entry<CharSequence, CharSequence>>emptyList().iterator();
|
Collections.<Entry<CharSequence, CharSequence>>emptyList().iterator();
|
||||||
|
|
||||||
public static final EmptyHttpHeaders INSTANCE = instance();
|
public static final EmptyHttpHeaders INSTANCE = new EmptyHttpHeaders();
|
||||||
|
|
||||||
/**
|
|
||||||
* @see InstanceInitializer#EMPTY_HEADERS
|
|
||||||
* @deprecated Use {@link EmptyHttpHeaders#INSTANCE}
|
|
||||||
* <p>
|
|
||||||
* This is needed to break a cyclic static initialization loop between {@link HttpHeaders} and {@link
|
|
||||||
* EmptyHttpHeaders}.
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
static EmptyHttpHeaders instance() {
|
|
||||||
return InstanceInitializer.EMPTY_HEADERS;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected EmptyHttpHeaders() {
|
protected EmptyHttpHeaders() {
|
||||||
}
|
}
|
||||||
@ -168,21 +156,4 @@ public class EmptyHttpHeaders extends HttpHeaders {
|
|||||||
return EMPTY_CHARS_ITERATOR;
|
return EMPTY_CHARS_ITERATOR;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* This class is needed to break a cyclic static initialization loop between {@link HttpHeaders} and
|
|
||||||
* {@link EmptyHttpHeaders}.
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
private static final class InstanceInitializer {
|
|
||||||
/**
|
|
||||||
* The instance is instantiated here to break the cyclic static initialization between {@link EmptyHttpHeaders}
|
|
||||||
* and {@link HttpHeaders}. The issue is that if someone accesses {@link EmptyHttpHeaders#INSTANCE} before
|
|
||||||
* {@link HttpHeaders#EMPTY_HEADERS} then {@link HttpHeaders#EMPTY_HEADERS} will be {@code null}.
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
private static final EmptyHttpHeaders EMPTY_HEADERS = new EmptyHttpHeaders();
|
|
||||||
|
|
||||||
private InstanceInitializer() {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -42,468 +42,6 @@ import static io.netty.util.internal.ObjectUtil.checkNotNull;
|
|||||||
* commonly used utility methods that accesses an {@link HttpMessage}.
|
* commonly used utility methods that accesses an {@link HttpMessage}.
|
||||||
*/
|
*/
|
||||||
public abstract class HttpHeaders implements Iterable<Map.Entry<String, String>> {
|
public abstract class HttpHeaders implements Iterable<Map.Entry<String, String>> {
|
||||||
/**
|
|
||||||
* @deprecated Use {@link EmptyHttpHeaders#INSTANCE}.
|
|
||||||
* <p>
|
|
||||||
* The instance is instantiated here to break the cyclic static initialization between {@link EmptyHttpHeaders} and
|
|
||||||
* {@link HttpHeaders}. The issue is that if someone accesses {@link EmptyHttpHeaders#INSTANCE} before
|
|
||||||
* {@link HttpHeaders#EMPTY_HEADERS} then {@link HttpHeaders#EMPTY_HEADERS} will be {@code null}.
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public static final HttpHeaders EMPTY_HEADERS = EmptyHttpHeaders.instance();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated Use {@link HttpHeaderNames} instead.
|
|
||||||
*
|
|
||||||
* Standard HTTP header names.
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public static final class Names {
|
|
||||||
/**
|
|
||||||
* {@code "Accept"}
|
|
||||||
*/
|
|
||||||
public static final String ACCEPT = "Accept";
|
|
||||||
/**
|
|
||||||
* {@code "Accept-Charset"}
|
|
||||||
*/
|
|
||||||
public static final String ACCEPT_CHARSET = "Accept-Charset";
|
|
||||||
/**
|
|
||||||
* {@code "Accept-Encoding"}
|
|
||||||
*/
|
|
||||||
public static final String ACCEPT_ENCODING = "Accept-Encoding";
|
|
||||||
/**
|
|
||||||
* {@code "Accept-Language"}
|
|
||||||
*/
|
|
||||||
public static final String ACCEPT_LANGUAGE = "Accept-Language";
|
|
||||||
/**
|
|
||||||
* {@code "Accept-Ranges"}
|
|
||||||
*/
|
|
||||||
public static final String ACCEPT_RANGES = "Accept-Ranges";
|
|
||||||
/**
|
|
||||||
* {@code "Accept-Patch"}
|
|
||||||
*/
|
|
||||||
public static final String ACCEPT_PATCH = "Accept-Patch";
|
|
||||||
/**
|
|
||||||
* {@code "Access-Control-Allow-Credentials"}
|
|
||||||
*/
|
|
||||||
public static final String ACCESS_CONTROL_ALLOW_CREDENTIALS = "Access-Control-Allow-Credentials";
|
|
||||||
/**
|
|
||||||
* {@code "Access-Control-Allow-Headers"}
|
|
||||||
*/
|
|
||||||
public static final String ACCESS_CONTROL_ALLOW_HEADERS = "Access-Control-Allow-Headers";
|
|
||||||
/**
|
|
||||||
* {@code "Access-Control-Allow-Methods"}
|
|
||||||
*/
|
|
||||||
public static final String ACCESS_CONTROL_ALLOW_METHODS = "Access-Control-Allow-Methods";
|
|
||||||
/**
|
|
||||||
* {@code "Access-Control-Allow-Origin"}
|
|
||||||
*/
|
|
||||||
public static final String ACCESS_CONTROL_ALLOW_ORIGIN = "Access-Control-Allow-Origin";
|
|
||||||
/**
|
|
||||||
* {@code "Access-Control-Expose-Headers"}
|
|
||||||
*/
|
|
||||||
public static final String ACCESS_CONTROL_EXPOSE_HEADERS = "Access-Control-Expose-Headers";
|
|
||||||
/**
|
|
||||||
* {@code "Access-Control-Max-Age"}
|
|
||||||
*/
|
|
||||||
public static final String ACCESS_CONTROL_MAX_AGE = "Access-Control-Max-Age";
|
|
||||||
/**
|
|
||||||
* {@code "Access-Control-Request-Headers"}
|
|
||||||
*/
|
|
||||||
public static final String ACCESS_CONTROL_REQUEST_HEADERS = "Access-Control-Request-Headers";
|
|
||||||
/**
|
|
||||||
* {@code "Access-Control-Request-Method"}
|
|
||||||
*/
|
|
||||||
public static final String ACCESS_CONTROL_REQUEST_METHOD = "Access-Control-Request-Method";
|
|
||||||
/**
|
|
||||||
* {@code "Age"}
|
|
||||||
*/
|
|
||||||
public static final String AGE = "Age";
|
|
||||||
/**
|
|
||||||
* {@code "Allow"}
|
|
||||||
*/
|
|
||||||
public static final String ALLOW = "Allow";
|
|
||||||
/**
|
|
||||||
* {@code "Authorization"}
|
|
||||||
*/
|
|
||||||
public static final String AUTHORIZATION = "Authorization";
|
|
||||||
/**
|
|
||||||
* {@code "Cache-Control"}
|
|
||||||
*/
|
|
||||||
public static final String CACHE_CONTROL = "Cache-Control";
|
|
||||||
/**
|
|
||||||
* {@code "Connection"}
|
|
||||||
*/
|
|
||||||
public static final String CONNECTION = "Connection";
|
|
||||||
/**
|
|
||||||
* {@code "Content-Base"}
|
|
||||||
*/
|
|
||||||
public static final String CONTENT_BASE = "Content-Base";
|
|
||||||
/**
|
|
||||||
* {@code "Content-Encoding"}
|
|
||||||
*/
|
|
||||||
public static final String CONTENT_ENCODING = "Content-Encoding";
|
|
||||||
/**
|
|
||||||
* {@code "Content-Language"}
|
|
||||||
*/
|
|
||||||
public static final String CONTENT_LANGUAGE = "Content-Language";
|
|
||||||
/**
|
|
||||||
* {@code "Content-Length"}
|
|
||||||
*/
|
|
||||||
public static final String CONTENT_LENGTH = "Content-Length";
|
|
||||||
/**
|
|
||||||
* {@code "Content-Location"}
|
|
||||||
*/
|
|
||||||
public static final String CONTENT_LOCATION = "Content-Location";
|
|
||||||
/**
|
|
||||||
* {@code "Content-Transfer-Encoding"}
|
|
||||||
*/
|
|
||||||
public static final String CONTENT_TRANSFER_ENCODING = "Content-Transfer-Encoding";
|
|
||||||
/**
|
|
||||||
* {@code "Content-MD5"}
|
|
||||||
*/
|
|
||||||
public static final String CONTENT_MD5 = "Content-MD5";
|
|
||||||
/**
|
|
||||||
* {@code "Content-Range"}
|
|
||||||
*/
|
|
||||||
public static final String CONTENT_RANGE = "Content-Range";
|
|
||||||
/**
|
|
||||||
* {@code "Content-Type"}
|
|
||||||
*/
|
|
||||||
public static final String CONTENT_TYPE = "Content-Type";
|
|
||||||
/**
|
|
||||||
* {@code "Cookie"}
|
|
||||||
*/
|
|
||||||
public static final String COOKIE = "Cookie";
|
|
||||||
/**
|
|
||||||
* {@code "Date"}
|
|
||||||
*/
|
|
||||||
public static final String DATE = "Date";
|
|
||||||
/**
|
|
||||||
* {@code "ETag"}
|
|
||||||
*/
|
|
||||||
public static final String ETAG = "ETag";
|
|
||||||
/**
|
|
||||||
* {@code "Expect"}
|
|
||||||
*/
|
|
||||||
public static final String EXPECT = "Expect";
|
|
||||||
/**
|
|
||||||
* {@code "Expires"}
|
|
||||||
*/
|
|
||||||
public static final String EXPIRES = "Expires";
|
|
||||||
/**
|
|
||||||
* {@code "From"}
|
|
||||||
*/
|
|
||||||
public static final String FROM = "From";
|
|
||||||
/**
|
|
||||||
* {@code "Host"}
|
|
||||||
*/
|
|
||||||
public static final String HOST = "Host";
|
|
||||||
/**
|
|
||||||
* {@code "If-Match"}
|
|
||||||
*/
|
|
||||||
public static final String IF_MATCH = "If-Match";
|
|
||||||
/**
|
|
||||||
* {@code "If-Modified-Since"}
|
|
||||||
*/
|
|
||||||
public static final String IF_MODIFIED_SINCE = "If-Modified-Since";
|
|
||||||
/**
|
|
||||||
* {@code "If-None-Match"}
|
|
||||||
*/
|
|
||||||
public static final String IF_NONE_MATCH = "If-None-Match";
|
|
||||||
/**
|
|
||||||
* {@code "If-Range"}
|
|
||||||
*/
|
|
||||||
public static final String IF_RANGE = "If-Range";
|
|
||||||
/**
|
|
||||||
* {@code "If-Unmodified-Since"}
|
|
||||||
*/
|
|
||||||
public static final String IF_UNMODIFIED_SINCE = "If-Unmodified-Since";
|
|
||||||
/**
|
|
||||||
* {@code "Last-Modified"}
|
|
||||||
*/
|
|
||||||
public static final String LAST_MODIFIED = "Last-Modified";
|
|
||||||
/**
|
|
||||||
* {@code "Location"}
|
|
||||||
*/
|
|
||||||
public static final String LOCATION = "Location";
|
|
||||||
/**
|
|
||||||
* {@code "Max-Forwards"}
|
|
||||||
*/
|
|
||||||
public static final String MAX_FORWARDS = "Max-Forwards";
|
|
||||||
/**
|
|
||||||
* {@code "Origin"}
|
|
||||||
*/
|
|
||||||
public static final String ORIGIN = "Origin";
|
|
||||||
/**
|
|
||||||
* {@code "Pragma"}
|
|
||||||
*/
|
|
||||||
public static final String PRAGMA = "Pragma";
|
|
||||||
/**
|
|
||||||
* {@code "Proxy-Authenticate"}
|
|
||||||
*/
|
|
||||||
public static final String PROXY_AUTHENTICATE = "Proxy-Authenticate";
|
|
||||||
/**
|
|
||||||
* {@code "Proxy-Authorization"}
|
|
||||||
*/
|
|
||||||
public static final String PROXY_AUTHORIZATION = "Proxy-Authorization";
|
|
||||||
/**
|
|
||||||
* {@code "Range"}
|
|
||||||
*/
|
|
||||||
public static final String RANGE = "Range";
|
|
||||||
/**
|
|
||||||
* {@code "Referer"}
|
|
||||||
*/
|
|
||||||
public static final String REFERER = "Referer";
|
|
||||||
/**
|
|
||||||
* {@code "Retry-After"}
|
|
||||||
*/
|
|
||||||
public static final String RETRY_AFTER = "Retry-After";
|
|
||||||
/**
|
|
||||||
* {@code "Sec-WebSocket-Key1"}
|
|
||||||
*/
|
|
||||||
public static final String SEC_WEBSOCKET_KEY1 = "Sec-WebSocket-Key1";
|
|
||||||
/**
|
|
||||||
* {@code "Sec-WebSocket-Key2"}
|
|
||||||
*/
|
|
||||||
public static final String SEC_WEBSOCKET_KEY2 = "Sec-WebSocket-Key2";
|
|
||||||
/**
|
|
||||||
* {@code "Sec-WebSocket-Location"}
|
|
||||||
*/
|
|
||||||
public static final String SEC_WEBSOCKET_LOCATION = "Sec-WebSocket-Location";
|
|
||||||
/**
|
|
||||||
* {@code "Sec-WebSocket-Origin"}
|
|
||||||
*/
|
|
||||||
public static final String SEC_WEBSOCKET_ORIGIN = "Sec-WebSocket-Origin";
|
|
||||||
/**
|
|
||||||
* {@code "Sec-WebSocket-Protocol"}
|
|
||||||
*/
|
|
||||||
public static final String SEC_WEBSOCKET_PROTOCOL = "Sec-WebSocket-Protocol";
|
|
||||||
/**
|
|
||||||
* {@code "Sec-WebSocket-Version"}
|
|
||||||
*/
|
|
||||||
public static final String SEC_WEBSOCKET_VERSION = "Sec-WebSocket-Version";
|
|
||||||
/**
|
|
||||||
* {@code "Sec-WebSocket-Key"}
|
|
||||||
*/
|
|
||||||
public static final String SEC_WEBSOCKET_KEY = "Sec-WebSocket-Key";
|
|
||||||
/**
|
|
||||||
* {@code "Sec-WebSocket-Accept"}
|
|
||||||
*/
|
|
||||||
public static final String SEC_WEBSOCKET_ACCEPT = "Sec-WebSocket-Accept";
|
|
||||||
/**
|
|
||||||
* {@code "Server"}
|
|
||||||
*/
|
|
||||||
public static final String SERVER = "Server";
|
|
||||||
/**
|
|
||||||
* {@code "Set-Cookie"}
|
|
||||||
*/
|
|
||||||
public static final String SET_COOKIE = "Set-Cookie";
|
|
||||||
/**
|
|
||||||
* {@code "Set-Cookie2"}
|
|
||||||
*/
|
|
||||||
public static final String SET_COOKIE2 = "Set-Cookie2";
|
|
||||||
/**
|
|
||||||
* {@code "TE"}
|
|
||||||
*/
|
|
||||||
public static final String TE = "TE";
|
|
||||||
/**
|
|
||||||
* {@code "Trailer"}
|
|
||||||
*/
|
|
||||||
public static final String TRAILER = "Trailer";
|
|
||||||
/**
|
|
||||||
* {@code "Transfer-Encoding"}
|
|
||||||
*/
|
|
||||||
public static final String TRANSFER_ENCODING = "Transfer-Encoding";
|
|
||||||
/**
|
|
||||||
* {@code "Upgrade"}
|
|
||||||
*/
|
|
||||||
public static final String UPGRADE = "Upgrade";
|
|
||||||
/**
|
|
||||||
* {@code "User-Agent"}
|
|
||||||
*/
|
|
||||||
public static final String USER_AGENT = "User-Agent";
|
|
||||||
/**
|
|
||||||
* {@code "Vary"}
|
|
||||||
*/
|
|
||||||
public static final String VARY = "Vary";
|
|
||||||
/**
|
|
||||||
* {@code "Via"}
|
|
||||||
*/
|
|
||||||
public static final String VIA = "Via";
|
|
||||||
/**
|
|
||||||
* {@code "Warning"}
|
|
||||||
*/
|
|
||||||
public static final String WARNING = "Warning";
|
|
||||||
/**
|
|
||||||
* {@code "WebSocket-Location"}
|
|
||||||
*/
|
|
||||||
public static final String WEBSOCKET_LOCATION = "WebSocket-Location";
|
|
||||||
/**
|
|
||||||
* {@code "WebSocket-Origin"}
|
|
||||||
*/
|
|
||||||
public static final String WEBSOCKET_ORIGIN = "WebSocket-Origin";
|
|
||||||
/**
|
|
||||||
* {@code "WebSocket-Protocol"}
|
|
||||||
*/
|
|
||||||
public static final String WEBSOCKET_PROTOCOL = "WebSocket-Protocol";
|
|
||||||
/**
|
|
||||||
* {@code "WWW-Authenticate"}
|
|
||||||
*/
|
|
||||||
public static final String WWW_AUTHENTICATE = "WWW-Authenticate";
|
|
||||||
|
|
||||||
private Names() {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated Use {@link HttpHeaderValues} instead.
|
|
||||||
*
|
|
||||||
* Standard HTTP header values.
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public static final class Values {
|
|
||||||
/**
|
|
||||||
* {@code "application/json"}
|
|
||||||
*/
|
|
||||||
public static final String APPLICATION_JSON = "application/json";
|
|
||||||
/**
|
|
||||||
* {@code "application/x-www-form-urlencoded"}
|
|
||||||
*/
|
|
||||||
public static final String APPLICATION_X_WWW_FORM_URLENCODED =
|
|
||||||
"application/x-www-form-urlencoded";
|
|
||||||
/**
|
|
||||||
* {@code "base64"}
|
|
||||||
*/
|
|
||||||
public static final String BASE64 = "base64";
|
|
||||||
/**
|
|
||||||
* {@code "binary"}
|
|
||||||
*/
|
|
||||||
public static final String BINARY = "binary";
|
|
||||||
/**
|
|
||||||
* {@code "boundary"}
|
|
||||||
*/
|
|
||||||
public static final String BOUNDARY = "boundary";
|
|
||||||
/**
|
|
||||||
* {@code "bytes"}
|
|
||||||
*/
|
|
||||||
public static final String BYTES = "bytes";
|
|
||||||
/**
|
|
||||||
* {@code "charset"}
|
|
||||||
*/
|
|
||||||
public static final String CHARSET = "charset";
|
|
||||||
/**
|
|
||||||
* {@code "chunked"}
|
|
||||||
*/
|
|
||||||
public static final String CHUNKED = "chunked";
|
|
||||||
/**
|
|
||||||
* {@code "close"}
|
|
||||||
*/
|
|
||||||
public static final String CLOSE = "close";
|
|
||||||
/**
|
|
||||||
* {@code "compress"}
|
|
||||||
*/
|
|
||||||
public static final String COMPRESS = "compress";
|
|
||||||
/**
|
|
||||||
* {@code "100-continue"}
|
|
||||||
*/
|
|
||||||
public static final String CONTINUE = "100-continue";
|
|
||||||
/**
|
|
||||||
* {@code "deflate"}
|
|
||||||
*/
|
|
||||||
public static final String DEFLATE = "deflate";
|
|
||||||
/**
|
|
||||||
* {@code "gzip"}
|
|
||||||
*/
|
|
||||||
public static final String GZIP = "gzip";
|
|
||||||
/**
|
|
||||||
* {@code "gzip,deflate"}
|
|
||||||
*/
|
|
||||||
public static final String GZIP_DEFLATE = "gzip,deflate";
|
|
||||||
/**
|
|
||||||
* {@code "identity"}
|
|
||||||
*/
|
|
||||||
public static final String IDENTITY = "identity";
|
|
||||||
/**
|
|
||||||
* {@code "keep-alive"}
|
|
||||||
*/
|
|
||||||
public static final String KEEP_ALIVE = "keep-alive";
|
|
||||||
/**
|
|
||||||
* {@code "max-age"}
|
|
||||||
*/
|
|
||||||
public static final String MAX_AGE = "max-age";
|
|
||||||
/**
|
|
||||||
* {@code "max-stale"}
|
|
||||||
*/
|
|
||||||
public static final String MAX_STALE = "max-stale";
|
|
||||||
/**
|
|
||||||
* {@code "min-fresh"}
|
|
||||||
*/
|
|
||||||
public static final String MIN_FRESH = "min-fresh";
|
|
||||||
/**
|
|
||||||
* {@code "multipart/form-data"}
|
|
||||||
*/
|
|
||||||
public static final String MULTIPART_FORM_DATA = "multipart/form-data";
|
|
||||||
/**
|
|
||||||
* {@code "must-revalidate"}
|
|
||||||
*/
|
|
||||||
public static final String MUST_REVALIDATE = "must-revalidate";
|
|
||||||
/**
|
|
||||||
* {@code "no-cache"}
|
|
||||||
*/
|
|
||||||
public static final String NO_CACHE = "no-cache";
|
|
||||||
/**
|
|
||||||
* {@code "no-store"}
|
|
||||||
*/
|
|
||||||
public static final String NO_STORE = "no-store";
|
|
||||||
/**
|
|
||||||
* {@code "no-transform"}
|
|
||||||
*/
|
|
||||||
public static final String NO_TRANSFORM = "no-transform";
|
|
||||||
/**
|
|
||||||
* {@code "none"}
|
|
||||||
*/
|
|
||||||
public static final String NONE = "none";
|
|
||||||
/**
|
|
||||||
* {@code "only-if-cached"}
|
|
||||||
*/
|
|
||||||
public static final String ONLY_IF_CACHED = "only-if-cached";
|
|
||||||
/**
|
|
||||||
* {@code "private"}
|
|
||||||
*/
|
|
||||||
public static final String PRIVATE = "private";
|
|
||||||
/**
|
|
||||||
* {@code "proxy-revalidate"}
|
|
||||||
*/
|
|
||||||
public static final String PROXY_REVALIDATE = "proxy-revalidate";
|
|
||||||
/**
|
|
||||||
* {@code "public"}
|
|
||||||
*/
|
|
||||||
public static final String PUBLIC = "public";
|
|
||||||
/**
|
|
||||||
* {@code "quoted-printable"}
|
|
||||||
*/
|
|
||||||
public static final String QUOTED_PRINTABLE = "quoted-printable";
|
|
||||||
/**
|
|
||||||
* {@code "s-maxage"}
|
|
||||||
*/
|
|
||||||
public static final String S_MAXAGE = "s-maxage";
|
|
||||||
/**
|
|
||||||
* {@code "trailers"}
|
|
||||||
*/
|
|
||||||
public static final String TRAILERS = "trailers";
|
|
||||||
/**
|
|
||||||
* {@code "Upgrade"}
|
|
||||||
*/
|
|
||||||
public static final String UPGRADE = "Upgrade";
|
|
||||||
/**
|
|
||||||
* {@code "WebSocket"}
|
|
||||||
*/
|
|
||||||
public static final String WEBSOCKET = "WebSocket";
|
|
||||||
|
|
||||||
private Values() {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated Use {@link HttpUtil#isKeepAlive(HttpMessage)} instead.
|
* @deprecated Use {@link HttpUtil#isKeepAlive(HttpMessage)} instead.
|
||||||
|
@ -1,398 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2012 The Netty Project
|
|
||||||
*
|
|
||||||
* The Netty Project licenses this file to you under the Apache License,
|
|
||||||
* version 2.0 (the "License"); you may not use this file except in compliance
|
|
||||||
* with the License. You may obtain a copy of the License at:
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
* License for the specific language governing permissions and limitations
|
|
||||||
* under the License.
|
|
||||||
*/
|
|
||||||
package io.netty.handler.codec.rtsp;
|
|
||||||
|
|
||||||
import io.netty.handler.codec.http.HttpHeaders;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated Use {@link RtspHeaderNames} or {@link RtspHeaderValues} instead.
|
|
||||||
|
|
||||||
* Standard RTSP header names and values.
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
public final class RtspHeaders {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated Use {@link RtspHeaderNames} instead.
|
|
||||||
*
|
|
||||||
* Standard RTSP header names.
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
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-Language"}
|
|
||||||
*/
|
|
||||||
public static final String ACCEPT_LANGUAGE = HttpHeaders.Names.ACCEPT_LANGUAGE;
|
|
||||||
/**
|
|
||||||
* {@code "Allow"}
|
|
||||||
*/
|
|
||||||
public static final String ALLOW = "Allow";
|
|
||||||
/**
|
|
||||||
* {@code "Authorization"}
|
|
||||||
*/
|
|
||||||
public static final String AUTHORIZATION = HttpHeaders.Names.AUTHORIZATION;
|
|
||||||
/**
|
|
||||||
* {@code "Bandwidth"}
|
|
||||||
*/
|
|
||||||
public static final String BANDWIDTH = "Bandwidth";
|
|
||||||
/**
|
|
||||||
* {@code "Blocksize"}
|
|
||||||
*/
|
|
||||||
public static final String BLOCKSIZE = "Blocksize";
|
|
||||||
/**
|
|
||||||
* {@code "Cache-Control"}
|
|
||||||
*/
|
|
||||||
public static final String CACHE_CONTROL = HttpHeaders.Names.CACHE_CONTROL;
|
|
||||||
/**
|
|
||||||
* {@code "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"}
|
|
||||||
*/
|
|
||||||
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"}
|
|
||||||
*/
|
|
||||||
public static final String PROXY_REQUIRE = "Proxy-Require";
|
|
||||||
/**
|
|
||||||
* {@code "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"}
|
|
||||||
*/
|
|
||||||
public static final String REQUIRE = "Require";
|
|
||||||
/**
|
|
||||||
* {@code "Retry-After"}
|
|
||||||
*/
|
|
||||||
public static final String RETRT_AFTER = HttpHeaders.Names.RETRY_AFTER;
|
|
||||||
/**
|
|
||||||
* {@code "RTP-Info"}
|
|
||||||
*/
|
|
||||||
public static final String RTP_INFO = "RTP-Info";
|
|
||||||
/**
|
|
||||||
* {@code "Scale"}
|
|
||||||
*/
|
|
||||||
public static final String SCALE = "Scale";
|
|
||||||
/**
|
|
||||||
* {@code "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"}
|
|
||||||
*/
|
|
||||||
public static final String TIMESTAMP = "Timestamp";
|
|
||||||
/**
|
|
||||||
* {@code "Transport"}
|
|
||||||
*/
|
|
||||||
public static final String TRANSPORT = "Transport";
|
|
||||||
/**
|
|
||||||
* {@code "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;
|
|
||||||
|
|
||||||
private Names() {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated Use {@link RtspHeaderValues} instead.
|
|
||||||
*
|
|
||||||
* Standard RTSP header values.
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public static final class Values {
|
|
||||||
/**
|
|
||||||
* {@code "append"}
|
|
||||||
*/
|
|
||||||
public static final String APPEND = "append";
|
|
||||||
/**
|
|
||||||
* {@code "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"}
|
|
||||||
*/
|
|
||||||
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"}
|
|
||||||
*/
|
|
||||||
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"}
|
|
||||||
*/
|
|
||||||
public static final String INTERLEAVED = "interleaved";
|
|
||||||
/**
|
|
||||||
* {@code "keep-alive"}
|
|
||||||
*/
|
|
||||||
public static final String KEEP_ALIVE = HttpHeaders.Values.KEEP_ALIVE;
|
|
||||||
/**
|
|
||||||
* {@code "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"}
|
|
||||||
*/
|
|
||||||
public static final String MODE = "mode";
|
|
||||||
/**
|
|
||||||
* {@code "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"}
|
|
||||||
*/
|
|
||||||
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"}
|
|
||||||
*/
|
|
||||||
public static final String RTP = "RTP";
|
|
||||||
/**
|
|
||||||
* {@code "rtptime"}
|
|
||||||
*/
|
|
||||||
public static final String RTPTIME = "rtptime";
|
|
||||||
/**
|
|
||||||
* {@code "seq"}
|
|
||||||
*/
|
|
||||||
public static final String SEQ = "seq";
|
|
||||||
/**
|
|
||||||
* {@code "server_port"}
|
|
||||||
*/
|
|
||||||
public static final String SERVER_PORT = "server_port";
|
|
||||||
/**
|
|
||||||
* {@code "ssrc"}
|
|
||||||
*/
|
|
||||||
public static final String SSRC = "ssrc";
|
|
||||||
/**
|
|
||||||
* {@code "TCP"}
|
|
||||||
*/
|
|
||||||
public static final String TCP = "TCP";
|
|
||||||
/**
|
|
||||||
* {@code "time"}
|
|
||||||
*/
|
|
||||||
public static final String TIME = "time";
|
|
||||||
/**
|
|
||||||
* {@code "timeout"}
|
|
||||||
*/
|
|
||||||
public static final String TIMEOUT = "timeout";
|
|
||||||
/**
|
|
||||||
* {@code "ttl"}
|
|
||||||
*/
|
|
||||||
public static final String TTL = "ttl";
|
|
||||||
/**
|
|
||||||
* {@code "UDP"}
|
|
||||||
*/
|
|
||||||
public static final String UDP = "UDP";
|
|
||||||
/**
|
|
||||||
* {@code "unicast"}
|
|
||||||
*/
|
|
||||||
public static final String UNICAST = "unicast";
|
|
||||||
/**
|
|
||||||
* {@code "url"}
|
|
||||||
*/
|
|
||||||
public static final String URL = "url";
|
|
||||||
|
|
||||||
private Values() { }
|
|
||||||
}
|
|
||||||
|
|
||||||
private RtspHeaders() { }
|
|
||||||
}
|
|
@ -1,89 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2012 The Netty Project
|
|
||||||
*
|
|
||||||
* The Netty Project licenses this file to you under the Apache License,
|
|
||||||
* version 2.0 (the "License"); you may not use this file except in compliance
|
|
||||||
* with the License. You may obtain a copy of the License at:
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
* License for the specific language governing permissions and limitations
|
|
||||||
* under the License.
|
|
||||||
*/
|
|
||||||
package io.netty.handler.codec.rtsp;
|
|
||||||
|
|
||||||
import io.netty.buffer.ByteBuf;
|
|
||||||
import io.netty.handler.codec.TooLongFrameException;
|
|
||||||
import io.netty.handler.codec.http.HttpMessage;
|
|
||||||
import io.netty.handler.codec.http.HttpObjectDecoder;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Decodes {@link ByteBuf}s into RTSP messages represented in
|
|
||||||
* {@link HttpMessage}s.
|
|
||||||
* <p>
|
|
||||||
* <h3>Parameters that prevents excessive memory consumption</h3>
|
|
||||||
* <table border="1">
|
|
||||||
* <tr>
|
|
||||||
* <th>Name</th><th>Meaning</th>
|
|
||||||
* </tr>
|
|
||||||
* <tr>
|
|
||||||
* <td>{@code maxInitialLineLength}</td>
|
|
||||||
* <td>The maximum length of the initial line
|
|
||||||
* (e.g. {@code "SETUP / RTSP/1.0"} or {@code "RTSP/1.0 200 OK"})
|
|
||||||
* If the length of the initial line exceeds this value, a
|
|
||||||
* {@link TooLongFrameException} will be raised.</td>
|
|
||||||
* </tr>
|
|
||||||
* <tr>
|
|
||||||
* <td>{@code maxHeaderSize}</td>
|
|
||||||
* <td>The maximum length of all headers. If the sum of the length of each
|
|
||||||
* header exceeds this value, a {@link TooLongFrameException} will be raised.</td>
|
|
||||||
* </tr>
|
|
||||||
* <tr>
|
|
||||||
* <td>{@code maxContentLength}</td>
|
|
||||||
* <td>The maximum length of the content. If the content length exceeds this
|
|
||||||
* value, a {@link TooLongFrameException} will be raised.</td>
|
|
||||||
* </tr>
|
|
||||||
* </table>
|
|
||||||
*
|
|
||||||
* @deprecated Use {@link RtspDecoder} instead.
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public abstract class RtspObjectDecoder extends HttpObjectDecoder {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates a new instance with the default
|
|
||||||
* {@code maxInitialLineLength (4096)}, {@code maxHeaderSize (8192)}.
|
|
||||||
*/
|
|
||||||
protected RtspObjectDecoder() {
|
|
||||||
this(4096, 8192);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates a new instance with the specified parameters.
|
|
||||||
*/
|
|
||||||
protected RtspObjectDecoder(int maxInitialLineLength, int maxHeaderSize) {
|
|
||||||
super(maxInitialLineLength, maxHeaderSize, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected RtspObjectDecoder(
|
|
||||||
int maxInitialLineLength, int maxHeaderSize, boolean validateHeaders) {
|
|
||||||
super(maxInitialLineLength, maxHeaderSize, false, validateHeaders);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected boolean isContentAlwaysEmpty(HttpMessage msg) {
|
|
||||||
// Unlike HTTP, RTSP always assumes zero-length body if Content-Length
|
|
||||||
// header is absent.
|
|
||||||
boolean empty = super.isContentAlwaysEmpty(msg);
|
|
||||||
if (empty) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if (!msg.headers().contains(RtspHeaderNames.CONTENT_LENGTH)) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return empty;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,44 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2012 The Netty Project
|
|
||||||
*
|
|
||||||
* The Netty Project licenses this file to you under the Apache License,
|
|
||||||
* version 2.0 (the "License"); you may not use this file except in compliance
|
|
||||||
* with the License. You may obtain a copy of the License at:
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
* License for the specific language governing permissions and limitations
|
|
||||||
* under the License.
|
|
||||||
*/
|
|
||||||
package io.netty.handler.codec.rtsp;
|
|
||||||
|
|
||||||
import io.netty.buffer.ByteBuf;
|
|
||||||
import io.netty.channel.ChannelHandler.Sharable;
|
|
||||||
import io.netty.handler.codec.http.FullHttpMessage;
|
|
||||||
import io.netty.handler.codec.http.HttpMessage;
|
|
||||||
import io.netty.handler.codec.http.HttpObjectEncoder;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Encodes an RTSP message represented in {@link FullHttpMessage} into
|
|
||||||
* a {@link ByteBuf}.
|
|
||||||
*
|
|
||||||
* @deprecated Use {@link RtspEncoder} instead.
|
|
||||||
*/
|
|
||||||
@Sharable
|
|
||||||
@Deprecated
|
|
||||||
public abstract class RtspObjectEncoder<H extends HttpMessage> extends HttpObjectEncoder<H> {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates a new instance.
|
|
||||||
*/
|
|
||||||
protected RtspObjectEncoder() {
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean acceptOutboundMessage(Object msg) throws Exception {
|
|
||||||
return msg instanceof FullHttpMessage;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,23 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2012 The Netty Project
|
|
||||||
*
|
|
||||||
* The Netty Project licenses this file to you under the Apache License,
|
|
||||||
* version 2.0 (the "License"); you may not use this file except in compliance
|
|
||||||
* with the License. You may obtain a copy of the License at:
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
* License for the specific language governing permissions and limitations
|
|
||||||
* under the License.
|
|
||||||
*/
|
|
||||||
package io.netty.handler.codec.rtsp;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated Use {@link RtspDecoder} directly instead
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public class RtspRequestDecoder extends RtspDecoder {
|
|
||||||
}
|
|
@ -1,23 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2012 The Netty Project
|
|
||||||
*
|
|
||||||
* The Netty Project licenses this file to you under the Apache License,
|
|
||||||
* version 2.0 (the "License"); you may not use this file except in compliance
|
|
||||||
* with the License. You may obtain a copy of the License at:
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
* License for the specific language governing permissions and limitations
|
|
||||||
* under the License.
|
|
||||||
*/
|
|
||||||
package io.netty.handler.codec.rtsp;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated Use {@link RtspEncoder} directly instead
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public class RtspRequestEncoder extends RtspEncoder {
|
|
||||||
}
|
|
@ -1,23 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2012 The Netty Project
|
|
||||||
*
|
|
||||||
* The Netty Project licenses this file to you under the Apache License,
|
|
||||||
* version 2.0 (the "License"); you may not use this file except in compliance
|
|
||||||
* with the License. You may obtain a copy of the License at:
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
* License for the specific language governing permissions and limitations
|
|
||||||
* under the License.
|
|
||||||
*/
|
|
||||||
package io.netty.handler.codec.rtsp;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated Use {@link RtspDecoder} directly instead
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public class RtspResponseDecoder extends RtspDecoder {
|
|
||||||
}
|
|
@ -1,23 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2012 The Netty Project
|
|
||||||
*
|
|
||||||
* The Netty Project licenses this file to you under the Apache License,
|
|
||||||
* version 2.0 (the "License"); you may not use this file except in compliance
|
|
||||||
* with the License. You may obtain a copy of the License at:
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
* License for the specific language governing permissions and limitations
|
|
||||||
* under the License.
|
|
||||||
*/
|
|
||||||
package io.netty.handler.codec.rtsp;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated Use {@link RtspEncoder} directly instead
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public class RtspResponseEncoder extends RtspEncoder {
|
|
||||||
}
|
|
@ -1,43 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2017 The Netty Project
|
|
||||||
*
|
|
||||||
* The Netty Project licenses this file to you under the Apache License,
|
|
||||||
* version 2.0 (the "License"); you may not use this file except in compliance
|
|
||||||
* with the License. You may obtain a copy of the License at:
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
* License for the specific language governing permissions and limitations
|
|
||||||
* under the License.
|
|
||||||
*/
|
|
||||||
package io.netty.handler.codec.http;
|
|
||||||
|
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
import static org.junit.Assert.*;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A test to validate that either order of initialization of the {@link EmptyHttpHeaders#INSTANCE} and
|
|
||||||
* {@link HttpHeaders#EMPTY_HEADERS} field results in both fields being non-null.
|
|
||||||
*
|
|
||||||
* Since this is testing static initialization, the tests might not actually test anything, except
|
|
||||||
* when run in isolation.
|
|
||||||
*/
|
|
||||||
public class EmptyHttpHeadersInitializationTest {
|
|
||||||
|
|
||||||
@Test
|
|
||||||
public void testEmptyHttpHeadersFirst() {
|
|
||||||
assertNotNull(EmptyHttpHeaders.INSTANCE);
|
|
||||||
assertNotNull(HttpHeaders.EMPTY_HEADERS);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
public void testHttpHeadersFirst() {
|
|
||||||
assertNotNull(HttpHeaders.EMPTY_HEADERS);
|
|
||||||
assertNotNull(EmptyHttpHeaders.INSTANCE);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user