michael@0: /*
michael@0: * ====================================================================
michael@0: * Licensed to the Apache Software Foundation (ASF) under one
michael@0: * or more contributor license agreements. See the NOTICE file
michael@0: * distributed with this work for additional information
michael@0: * regarding copyright ownership. The ASF licenses this file
michael@0: * to you under the Apache License, Version 2.0 (the
michael@0: * "License"); you may not use this file except in compliance
michael@0: * with the License. You may obtain a copy of the License at
michael@0: *
michael@0: * http://www.apache.org/licenses/LICENSE-2.0
michael@0: *
michael@0: * Unless required by applicable law or agreed to in writing,
michael@0: * software distributed under the License is distributed on an
michael@0: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
michael@0: * KIND, either express or implied. See the License for the
michael@0: * specific language governing permissions and limitations
michael@0: * under the License.
michael@0: * ====================================================================
michael@0: *
michael@0: * This software consists of voluntary contributions made by many
michael@0: * individuals on behalf of the Apache Software Foundation. For more
michael@0: * information on the Apache Software Foundation, please see
michael@0: *
Note: the object returned by this method is michael@0: * considered immutable. Changing it (e.g. using setTime()) could result michael@0: * in undefined behaviour. Do so at your peril.
michael@0: * @return Expiration {@link Date}, or null. michael@0: */ michael@0: Date getExpiryDate(); michael@0: michael@0: /** michael@0: * Returns false if the cookie should be discarded at the end michael@0: * of the "session"; true otherwise. michael@0: * michael@0: * @return false if the cookie should be discarded at the end michael@0: * of the "session"; true otherwise michael@0: */ michael@0: boolean isPersistent(); michael@0: michael@0: /** michael@0: * Returns domain attribute of the cookie. The value of the Domain michael@0: * attribute specifies the domain for which the cookie is valid. michael@0: * michael@0: * @return the value of the domain attribute. michael@0: */ michael@0: String getDomain(); michael@0: michael@0: /** michael@0: * Returns the path attribute of the cookie. The value of the Path michael@0: * attribute specifies the subset of URLs on the origin server to which michael@0: * this cookie applies. michael@0: * michael@0: * @return The value of the path attribute. michael@0: */ michael@0: String getPath(); michael@0: michael@0: /** michael@0: * Get the Port attribute. It restricts the ports to which a cookie michael@0: * may be returned in a Cookie request header. michael@0: */ michael@0: int[] getPorts(); michael@0: michael@0: /** michael@0: * Indicates whether this cookie requires a secure connection. michael@0: * michael@0: * @returntrue
if this cookie should only be sent
michael@0: * over secure connections, false
otherwise.
michael@0: */
michael@0: boolean isSecure();
michael@0:
michael@0: /**
michael@0: * Returns the version of the cookie specification to which this
michael@0: * cookie conforms.
michael@0: *
michael@0: * @return the version of the cookie.
michael@0: */
michael@0: int getVersion();
michael@0:
michael@0: /**
michael@0: * Returns true if this cookie has expired.
michael@0: * @param date Current time
michael@0: *
michael@0: * @return true if the cookie has expired.
michael@0: */
michael@0: boolean isExpired(final Date date);
michael@0:
michael@0: }
michael@0: