001: /*
002: * ==============================================================================
003: * Licensed under the Apache License, Version 2.0 (the "License"); you may not
004: * use this file except in compliance with the License. You may obtain a copy of
005: * the License at
006: *
007: * http://www.apache.org/licenses/LICENSE-2.0
008: *
009: * Unless required by applicable law or agreed to in writing, software
010: * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
011: * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
012: * License for the specific language governing permissions and limitations under
013: * the License.
014: */
015: package wicket.jmx;
016:
017: /**
018: * Cookie persister settings.
019: *
020: * @author eelcohillenius
021: */
022: public interface CookieValuePersisterSettingsMBean {
023: /**
024: * Gets the cookie comment.
025: *
026: * @return the cookie comment
027: */
028: String getComment();
029:
030: /**
031: * Gets the cookie domain name.
032: *
033: * @return the cookie domain name
034: */
035: String getDomain();
036:
037: /**
038: * Gets the max age. After
039: *
040: * @return the max age
041: */
042: int getMaxAge();
043:
044: /**
045: * Returns true if the browser is sending cookies only over a secure
046: * protocol, or false if the browser can send cookies using any protocol.
047: *
048: * @return whether this cookie is secure
049: */
050: boolean getSecure();
051:
052: /**
053: * Returns the version of the protocol this cookie complies with. Version 1
054: * complies with RFC 2109, and version 0 complies with the original cookie
055: * specification drafted by Netscape. Cookies provided by a browser use and
056: * identify the browser's cookie version.
057: *
058: * @return 0 if the cookie complies with the original Netscape
059: * specification; 1 if the cookie complies with RFC 2109
060: */
061: int getVersion();
062:
063: /**
064: * Sets the cookie comment.
065: *
066: * @param comment
067: * the cookie comment
068: */
069: void setComment(String comment);
070:
071: /**
072: * Sets the cookie domain name.
073: *
074: * @param domain
075: * the cookie domain name
076: */
077: void setDomain(String domain);
078:
079: /**
080: * Sets the maximum age of the cookie in seconds.
081: *
082: * @param maxAge
083: * the max age in secs.
084: */
085: void setMaxAge(int maxAge);
086:
087: /**
088: * Indicates to the browser whether the cookie should only be sent using a
089: * secure protocol, such as HTTPS or SSL.
090: *
091: * @param secure
092: * if true, sends the cookie from the browser to the server using
093: * only when using a secure protocol; if false, sent on any
094: * protocol
095: */
096: void setSecure(boolean secure);
097:
098: /**
099: * Sets the version of the cookie protocol this cookie complies with.
100: * Version 0 complies with the original Netscape cookie specification.
101: * Version 1 complies with RFC 2109. <br/>Since RFC 2109 is still somewhat
102: * new, consider version 1 as experimental; do not use it yet on production
103: * sites.
104: *
105: * @param version
106: * 0 if the cookie should comply with the original Netscape
107: * specification; 1 if the cookie should comply with RFC 2109
108: */
109: void setVersion(int version);
110: }
|