/*
 * 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.http;

import java.util.Set;

An interface defining an HTTP cookie.
Deprecated:Use Cookie instead.
/** * An interface defining an * <a href="http://en.wikipedia.org/wiki/HTTP_cookie">HTTP cookie</a>. * @deprecated Use {@link io.netty.handler.codec.http.cookie.Cookie} instead. */
@Deprecated public interface Cookie extends io.netty.handler.codec.http.cookie.Cookie {
Deprecated:Use Cookie.name() instead.
/** * @deprecated Use {@link #name()} instead. */
@Deprecated String getName();
Deprecated:Use Cookie.value() instead.
/** * @deprecated Use {@link #value()} instead. */
@Deprecated String getValue();
Deprecated:Use Cookie.domain() instead.
/** * @deprecated Use {@link #domain()} instead. */
@Deprecated String getDomain();
Deprecated:Use Cookie.path() instead.
/** * @deprecated Use {@link #path()} instead. */
@Deprecated String getPath();
Deprecated:Use comment() instead.
/** * @deprecated Use {@link #comment()} instead. */
@Deprecated String getComment();
Returns the comment of this Cookie.
Returns:The comment of this Cookie
Deprecated:Not part of RFC6265
/** * Returns the comment of this {@link Cookie}. * * @return The comment of this {@link Cookie} * * @deprecated Not part of RFC6265 */
@Deprecated String comment();
Sets the comment of this Cookie.
Params:
  • comment – The comment to use
Deprecated:Not part of RFC6265
/** * Sets the comment of this {@link Cookie}. * * @param comment The comment to use * * @deprecated Not part of RFC6265 */
@Deprecated void setComment(String comment);
Deprecated:Use maxAge() instead.
/** * @deprecated Use {@link #maxAge()} instead. */
@Deprecated long getMaxAge();
Returns the maximum age of this Cookie in seconds or Long.MIN_VALUE if unspecified
Returns:The maximum age of this Cookie
Deprecated:Not part of RFC6265
/** * Returns the maximum age of this {@link Cookie} in seconds or {@link Long#MIN_VALUE} if unspecified * * @return The maximum age of this {@link Cookie} * * @deprecated Not part of RFC6265 */
@Deprecated @Override long maxAge();
Sets the maximum age of this Cookie in seconds. If an age of 0 is specified, this Cookie will be automatically removed by browser because it will expire immediately. If Long.MIN_VALUE is specified, this Cookie will be removed when the browser is closed.
Params:
  • maxAge – The maximum age of this Cookie in seconds
Deprecated:Not part of RFC6265
/** * Sets the maximum age of this {@link Cookie} in seconds. * If an age of {@code 0} is specified, this {@link Cookie} will be * automatically removed by browser because it will expire immediately. * If {@link Long#MIN_VALUE} is specified, this {@link Cookie} will be removed when the * browser is closed. * * @param maxAge The maximum age of this {@link Cookie} in seconds * * @deprecated Not part of RFC6265 */
@Deprecated @Override void setMaxAge(long maxAge);
Deprecated:Use version() instead.
/** * @deprecated Use {@link #version()} instead. */
@Deprecated int getVersion();
Returns the version of this Cookie.
Returns:The version of this Cookie
Deprecated:Not part of RFC6265
/** * Returns the version of this {@link Cookie}. * * @return The version of this {@link Cookie} * * @deprecated Not part of RFC6265 */
@Deprecated int version();
Sets the version of this Cookie.
Params:
  • version – The new version to use
Deprecated:Not part of RFC6265
/** * Sets the version of this {@link Cookie}. * * @param version The new version to use * * @deprecated Not part of RFC6265 */
@Deprecated void setVersion(int version);
Deprecated:Use commentUrl() instead.
/** * @deprecated Use {@link #commentUrl()} instead. */
@Deprecated String getCommentUrl();
Returns the comment URL of this Cookie.
Returns:The comment URL of this Cookie
Deprecated:Not part of RFC6265
/** * Returns the comment URL of this {@link Cookie}. * * @return The comment URL of this {@link Cookie} * * @deprecated Not part of RFC6265 */
@Deprecated String commentUrl();
Sets the comment URL of this Cookie.
Params:
  • commentUrl – The comment URL to use
Deprecated:Not part of RFC6265
/** * Sets the comment URL of this {@link Cookie}. * * @param commentUrl The comment URL to use * * @deprecated Not part of RFC6265 */
@Deprecated void setCommentUrl(String commentUrl);
Checks to see if this Cookie is to be discarded by the browser at the end of the current session.
Returns:True if this Cookie is to be discarded, otherwise false
Deprecated:Not part of RFC6265
/** * Checks to see if this {@link Cookie} is to be discarded by the browser * at the end of the current session. * * @return True if this {@link Cookie} is to be discarded, otherwise false * * @deprecated Not part of RFC6265 */
@Deprecated boolean isDiscard();
Sets the discard flag of this Cookie. If set to true, this Cookie will be discarded by the browser at the end of the current session
Params:
  • discard – True if the Cookie is to be discarded
Deprecated:Not part of RFC6265
/** * Sets the discard flag of this {@link Cookie}. * If set to true, this {@link Cookie} will be discarded by the browser * at the end of the current session * * @param discard True if the {@link Cookie} is to be discarded * * @deprecated Not part of RFC6265 */
@Deprecated void setDiscard(boolean discard);
Deprecated:Use ports() instead.
/** * @deprecated Use {@link #ports()} instead. */
@Deprecated Set<Integer> getPorts();
Returns the ports that this Cookie can be accessed on.
Returns:The Set of ports that this Cookie can use
Deprecated:Not part of RFC6265
/** * Returns the ports that this {@link Cookie} can be accessed on. * * @return The {@link Set} of ports that this {@link Cookie} can use * * @deprecated Not part of RFC6265 */
@Deprecated Set<Integer> ports();
Sets the ports that this Cookie can be accessed on.
Params:
  • ports – The ports that this Cookie can be accessed on
Deprecated:Not part of RFC6265
/** * Sets the ports that this {@link Cookie} can be accessed on. * * @param ports The ports that this {@link Cookie} can be accessed on * * @deprecated Not part of RFC6265 */
@Deprecated void setPorts(int... ports);
Sets the ports that this Cookie can be accessed on.
Params:
  • ports – The Iterable collection of ports that this Cookie can be accessed on.
Deprecated:Not part of RFC6265
/** * Sets the ports that this {@link Cookie} can be accessed on. * * @param ports The {@link Iterable} collection of ports that this * {@link Cookie} can be accessed on. * * @deprecated Not part of RFC6265 */
@Deprecated void setPorts(Iterable<Integer> ports); }