2009-02-17 18:13:13 +01:00
|
|
|
/*
|
2012-06-04 22:31:44 +02:00
|
|
|
* Copyright 2012 The Netty Project
|
2009-06-19 19:48:17 +02:00
|
|
|
*
|
2011-12-09 06:18:34 +01:00
|
|
|
* 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:
|
2009-02-17 18:13:13 +01:00
|
|
|
*
|
2012-06-04 22:31:44 +02:00
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
2009-02-17 18:13:13 +01:00
|
|
|
*
|
2009-08-28 09:15:49 +02:00
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
2011-12-09 06:18:34 +01:00
|
|
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
2009-08-28 09:15:49 +02:00
|
|
|
* License for the specific language governing permissions and limitations
|
|
|
|
* under the License.
|
2009-02-17 18:13:13 +01:00
|
|
|
*/
|
2011-12-09 04:38:59 +01:00
|
|
|
package io.netty.handler.codec.http;
|
2009-02-17 18:13:13 +01:00
|
|
|
|
2009-03-13 13:32:47 +01:00
|
|
|
import java.util.Set;
|
|
|
|
|
2009-02-17 18:13:13 +01:00
|
|
|
/**
|
2012-06-29 10:59:12 +02:00
|
|
|
* An interface defining an
|
|
|
|
* <a href="http://en.wikipedia.org/wiki/HTTP_cookie">HTTP cookie</a>.
|
2015-04-14 13:57:32 +02:00
|
|
|
* @deprecated Use {@link io.netty.handler.codec.http.cookie.Cookie} instead.
|
2009-02-17 18:13:13 +01:00
|
|
|
*/
|
2015-04-14 13:57:32 +02:00
|
|
|
@Deprecated
|
|
|
|
public interface Cookie extends io.netty.handler.codec.http.cookie.Cookie {
|
2009-06-19 16:49:26 +02:00
|
|
|
|
2014-06-24 10:39:46 +02:00
|
|
|
/**
|
|
|
|
* @deprecated Use {@link #name()} instead.
|
|
|
|
*/
|
|
|
|
@Deprecated
|
|
|
|
String getName();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @deprecated Use {@link #value()} instead.
|
|
|
|
*/
|
|
|
|
@Deprecated
|
|
|
|
String getValue();
|
2009-06-19 16:49:26 +02:00
|
|
|
|
2014-06-24 10:39:46 +02:00
|
|
|
/**
|
|
|
|
* @deprecated Use {@link #domain()} instead.
|
|
|
|
*/
|
|
|
|
@Deprecated
|
|
|
|
String getDomain();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @deprecated Use {@link #path()} instead.
|
|
|
|
*/
|
|
|
|
@Deprecated
|
|
|
|
String getPath();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @deprecated Use {@link #comment()} instead.
|
|
|
|
*/
|
|
|
|
@Deprecated
|
|
|
|
String getComment();
|
|
|
|
|
2009-06-19 16:49:26 +02:00
|
|
|
/**
|
2012-06-29 11:25:31 +02:00
|
|
|
* Returns the comment of this {@link Cookie}.
|
2012-06-29 10:59:12 +02:00
|
|
|
*
|
|
|
|
* @return The comment of this {@link Cookie}
|
2015-04-14 13:57:32 +02:00
|
|
|
*
|
|
|
|
* @deprecated Not part of RFC6265
|
2009-06-19 16:49:26 +02:00
|
|
|
*/
|
2015-04-14 13:57:32 +02:00
|
|
|
@Deprecated
|
2014-06-24 10:39:46 +02:00
|
|
|
String comment();
|
2009-06-19 16:49:26 +02:00
|
|
|
|
|
|
|
/**
|
2012-06-29 10:59:12 +02:00
|
|
|
* Sets the comment of this {@link Cookie}.
|
|
|
|
*
|
|
|
|
* @param comment The comment to use
|
2015-04-14 13:57:32 +02:00
|
|
|
*
|
|
|
|
* @deprecated Not part of RFC6265
|
2009-06-19 16:49:26 +02:00
|
|
|
*/
|
2015-04-14 13:57:32 +02:00
|
|
|
@Deprecated
|
2009-02-26 08:59:37 +01:00
|
|
|
void setComment(String comment);
|
2009-06-19 16:49:26 +02:00
|
|
|
|
2014-06-24 10:39:46 +02:00
|
|
|
/**
|
|
|
|
* @deprecated Use {@link #maxAge()} instead.
|
|
|
|
*/
|
|
|
|
@Deprecated
|
|
|
|
long getMaxAge();
|
|
|
|
|
2009-06-19 16:49:26 +02:00
|
|
|
/**
|
2012-07-30 07:44:53 +02:00
|
|
|
* Returns the maximum age of this {@link Cookie} in seconds or {@link Long#MIN_VALUE} if unspecified
|
2012-06-29 10:59:12 +02:00
|
|
|
*
|
|
|
|
* @return The maximum age of this {@link Cookie}
|
2015-04-14 13:57:32 +02:00
|
|
|
*
|
|
|
|
* @deprecated Not part of RFC6265
|
2009-06-19 16:49:26 +02:00
|
|
|
*/
|
2015-04-14 13:57:32 +02:00
|
|
|
@Deprecated
|
2015-09-03 00:10:58 +02:00
|
|
|
@Override
|
2014-06-24 10:39:46 +02:00
|
|
|
long maxAge();
|
2009-06-19 16:49:26 +02:00
|
|
|
|
|
|
|
/**
|
2012-06-29 10:59:12 +02:00
|
|
|
* 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.
|
2012-07-30 07:44:53 +02:00
|
|
|
* If {@link Long#MIN_VALUE} is specified, this {@link Cookie} will be removed when the
|
2012-06-29 10:59:12 +02:00
|
|
|
* browser is closed.
|
|
|
|
*
|
|
|
|
* @param maxAge The maximum age of this {@link Cookie} in seconds
|
2015-04-14 13:57:32 +02:00
|
|
|
*
|
|
|
|
* @deprecated Not part of RFC6265
|
2009-06-19 16:49:26 +02:00
|
|
|
*/
|
2015-04-14 13:57:32 +02:00
|
|
|
@Deprecated
|
2015-09-03 00:10:58 +02:00
|
|
|
@Override
|
2012-06-08 02:25:39 +02:00
|
|
|
void setMaxAge(long maxAge);
|
2009-06-19 16:49:26 +02:00
|
|
|
|
2014-06-24 10:39:46 +02:00
|
|
|
/**
|
|
|
|
* @deprecated Use {@link #version()} instead.
|
|
|
|
*/
|
|
|
|
@Deprecated
|
|
|
|
int getVersion();
|
|
|
|
|
2009-06-19 16:49:26 +02:00
|
|
|
/**
|
2012-06-29 11:25:31 +02:00
|
|
|
* Returns the version of this {@link Cookie}.
|
2012-06-29 10:59:12 +02:00
|
|
|
*
|
|
|
|
* @return The version of this {@link Cookie}
|
2015-04-14 13:57:32 +02:00
|
|
|
*
|
|
|
|
* @deprecated Not part of RFC6265
|
2009-06-19 16:49:26 +02:00
|
|
|
*/
|
2015-04-14 13:57:32 +02:00
|
|
|
@Deprecated
|
2014-06-24 10:39:46 +02:00
|
|
|
int version();
|
2009-06-19 16:49:26 +02:00
|
|
|
|
|
|
|
/**
|
2012-06-29 10:59:12 +02:00
|
|
|
* Sets the version of this {@link Cookie}.
|
|
|
|
*
|
|
|
|
* @param version The new version to use
|
|
|
|
*
|
2015-04-14 13:57:32 +02:00
|
|
|
* @deprecated Not part of RFC6265
|
2009-06-19 16:49:26 +02:00
|
|
|
*/
|
2015-04-14 13:57:32 +02:00
|
|
|
@Deprecated
|
|
|
|
void setVersion(int version);
|
2009-08-27 08:48:27 +02:00
|
|
|
|
2014-06-24 10:39:46 +02:00
|
|
|
/**
|
|
|
|
* @deprecated Use {@link #commentUrl()} instead.
|
|
|
|
*/
|
|
|
|
@Deprecated
|
|
|
|
String getCommentUrl();
|
|
|
|
|
2009-06-19 16:49:26 +02:00
|
|
|
/**
|
2012-06-29 11:25:31 +02:00
|
|
|
* Returns the comment URL of this {@link Cookie}.
|
2012-06-29 10:59:12 +02:00
|
|
|
*
|
|
|
|
* @return The comment URL of this {@link Cookie}
|
2015-04-14 13:57:32 +02:00
|
|
|
*
|
|
|
|
* @deprecated Not part of RFC6265
|
2009-06-19 16:49:26 +02:00
|
|
|
*/
|
2015-04-14 13:57:32 +02:00
|
|
|
@Deprecated
|
2014-06-24 10:39:46 +02:00
|
|
|
String commentUrl();
|
2009-06-19 16:49:26 +02:00
|
|
|
|
|
|
|
/**
|
2012-06-29 10:59:12 +02:00
|
|
|
* Sets the comment URL of this {@link Cookie}.
|
|
|
|
*
|
|
|
|
* @param commentUrl The comment URL to use
|
2015-04-14 13:57:32 +02:00
|
|
|
*
|
|
|
|
* @deprecated Not part of RFC6265
|
2009-06-19 16:49:26 +02:00
|
|
|
*/
|
2015-04-14 13:57:32 +02:00
|
|
|
@Deprecated
|
2009-03-13 14:53:53 +01:00
|
|
|
void setCommentUrl(String commentUrl);
|
2009-06-19 16:49:26 +02:00
|
|
|
|
|
|
|
/**
|
2012-06-29 10:59:12 +02:00
|
|
|
* 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
|
2015-04-14 13:57:32 +02:00
|
|
|
*
|
|
|
|
* @deprecated Not part of RFC6265
|
2009-06-19 16:49:26 +02:00
|
|
|
*/
|
2015-04-14 13:57:32 +02:00
|
|
|
@Deprecated
|
2009-03-13 11:12:51 +01:00
|
|
|
boolean isDiscard();
|
2009-06-19 16:49:26 +02:00
|
|
|
|
|
|
|
/**
|
2012-06-29 10:59:12 +02:00
|
|
|
* 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
|
2015-04-14 13:57:32 +02:00
|
|
|
*
|
|
|
|
* @deprecated Not part of RFC6265
|
2009-06-19 16:49:26 +02:00
|
|
|
*/
|
2015-04-14 13:57:32 +02:00
|
|
|
@Deprecated
|
2009-03-13 11:12:51 +01:00
|
|
|
void setDiscard(boolean discard);
|
2009-06-19 16:49:26 +02:00
|
|
|
|
2014-06-24 10:39:46 +02:00
|
|
|
/**
|
|
|
|
* @deprecated Use {@link #ports()} instead.
|
|
|
|
*/
|
|
|
|
@Deprecated
|
|
|
|
Set<Integer> getPorts();
|
|
|
|
|
2009-06-19 16:49:26 +02:00
|
|
|
/**
|
2012-06-29 10:59:12 +02:00
|
|
|
* Returns the ports that this {@link Cookie} can be accessed on.
|
|
|
|
*
|
|
|
|
* @return The {@link Set} of ports that this {@link Cookie} can use
|
2015-04-14 13:57:32 +02:00
|
|
|
*
|
|
|
|
* @deprecated Not part of RFC6265
|
2009-06-19 16:49:26 +02:00
|
|
|
*/
|
2015-04-14 13:57:32 +02:00
|
|
|
@Deprecated
|
2014-06-24 10:39:46 +02:00
|
|
|
Set<Integer> ports();
|
2009-06-19 16:49:26 +02:00
|
|
|
|
|
|
|
/**
|
2012-06-29 10:59:12 +02:00
|
|
|
* Sets the ports that this {@link Cookie} can be accessed on.
|
|
|
|
*
|
|
|
|
* @param ports The ports that this {@link Cookie} can be accessed on
|
2015-04-14 13:57:32 +02:00
|
|
|
*
|
|
|
|
* @deprecated Not part of RFC6265
|
2009-06-19 16:49:26 +02:00
|
|
|
*/
|
2015-04-14 13:57:32 +02:00
|
|
|
@Deprecated
|
2009-03-13 13:32:47 +01:00
|
|
|
void setPorts(int... ports);
|
2009-06-19 16:49:26 +02:00
|
|
|
|
|
|
|
/**
|
2012-06-29 10:59:12 +02:00
|
|
|
* 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.
|
2015-04-14 13:57:32 +02:00
|
|
|
*
|
|
|
|
* @deprecated Not part of RFC6265
|
2009-06-19 16:49:26 +02:00
|
|
|
*/
|
2015-04-14 13:57:32 +02:00
|
|
|
@Deprecated
|
2009-03-13 13:32:47 +01:00
|
|
|
void setPorts(Iterable<Integer> ports);
|
2009-08-28 09:15:49 +02:00
|
|
|
}
|