All Downloads are FREE. Search and download functionalities are using the official Maven repository.

leap.lang.http.Cookie Maven / Gradle / Ivy

The newest version!
/*
 * Copyright 2014 the original author or authors.
 *
 * Licensed 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 leap.lang.http;

public interface Cookie {

	/**
	 * Returns the name of the cookie. The name cannot be changed after
	 * creation.
	 *
	 * @return the name of the cookie
	 */
	String getName();

	/**
	 * Gets the current value of this Cookie.
	 *
	 * @return the current value of this Cookie
	 */
	String getValue();

	/**
	 * Gets the domain name of this Cookie.
	 *
	 * 

Domain names are formatted according to RFC 2109. * * @return the domain name of this Cookie * * @see #setDomain */ String getDomain(); /** * Returns the path on the server * to which the browser returns this cookie. The * cookie is visible to all subpaths on the server. * * @return a String specifying a path that contains * a servlet name, for example, /catalog */ String getPath(); /** * Gets the maximum age in seconds of this Cookie. * *

By default, -1 is returned, which indicates that * the cookie will persist until browser shutdown. * * @return an integer specifying the maximum age of the * cookie in seconds; if negative, means * the cookie persists until browser shutdown */ int getMaxAge(); /** * Returns the comment describing the purpose of this cookie, or * null if the cookie has no comment. * * @return the comment of the cookie, or null if unspecified */ String getComment(); /** * Returns true if the browser is sending cookies * only over a secure protocol, or false if the * browser can send cookies using any protocol. * * @return true if the browser uses a secure protocol, * false otherwise */ boolean isSecure(); /** * Checks whether this Cookie has been marked as HttpOnly. * * @return true if this Cookie has been marked as HttpOnly, * false otherwise * * @see HttpOnly */ boolean isHttpOnly(); }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy