/** * Gets the CookieSpec for a particular cookie version. * * <p>Supported versions: * <ul> * <li><tt>version 0</tt> corresponds to the Netscape draft * <li><tt>version 1</tt> corresponds to the RFC 2109 * <li>Any other cookie value coresponds to the default spec * <ul> * * @param ver the cookie version to get the spec for * @return cookie specification interface intended for processing * cookies with the given version * * @deprecated Use {@link CookiePolicy#getCookieSpec(String)} */ public static CookieSpec getSpecByVersion(int ver) { switch(ver) { case 0: return new NetscapeDraftSpec(); case 1: return new RFC2109Spec(); default: return getDefaultSpec(); } }
/** * @param policy cookie policy to get the CookieSpec for * @return cookie specification interface for the given policy * * @deprecated Use {@link CookiePolicy#getCookieSpec(String)} */ public static CookieSpec getSpecByPolicy(int policy) { switch(policy) { case COMPATIBILITY: return new CookieSpecBase(); case NETSCAPE_DRAFT: return new NetscapeDraftSpec(); case RFC2109: return new RFC2109Spec(); case RFC2965: return new RFC2965Spec(); default: return getDefaultSpec(); } }
/** * @return the {@link CookieSpec} (defaults to {@link RFC2109Spec} when spec is * null) */ public static CookieSpec getCookieSpec(String spec) { if (spec != null && spec.equalsIgnoreCase(HttpConnector.COOKIE_SPEC_NETSCAPE)) { return new NetscapeDraftSpec(); } else { return new RFC2109Spec(); } }
/** * Gets the CookieSpec for a particular cookie version. * * <p>Supported versions: * <ul> * <li><tt>version 0</tt> corresponds to the Netscape draft * <li><tt>version 1</tt> corresponds to the RFC 2109 * <li>Any other cookie value coresponds to the default spec * <ul> * * @param ver the cookie version to get the spec for * @return cookie specification interface intended for processing * cookies with the given version * * @deprecated Use {@link CookiePolicy#getCookieSpec(String)} */ public static CookieSpec getSpecByVersion(int ver) { switch(ver) { case 0: return new NetscapeDraftSpec(); case 1: return new RFC2109Spec(); default: return getDefaultSpec(); } }
/** * Gets the CookieSpec for a particular cookie version. * * <p>Supported versions: * <ul> * <li><tt>version 0</tt> corresponds to the Netscape draft * <li><tt>version 1</tt> corresponds to the RFC 2109 * <li>Any other cookie value coresponds to the default spec * <ul> * * @param ver the cookie version to get the spec for * @return cookie specification interface intended for processing * cookies with the given version * * @deprecated Use {@link CookiePolicy#getCookieSpec(String)} */ public static CookieSpec getSpecByVersion(int ver) { switch(ver) { case 0: return new NetscapeDraftSpec(); case 1: return new RFC2109Spec(); default: return getDefaultSpec(); } }
/** * Gets the CookieSpec for a particular cookie version. * * <p>Supported versions: * <ul> * <li><tt>version 0</tt> corresponds to the Netscape draft * <li><tt>version 1</tt> corresponds to the RFC 2109 * <li>Any other cookie value coresponds to the default spec * <ul> * * @param ver the cookie version to get the spec for * @return cookie specification interface intended for processing * cookies with the given version * * @deprecated Use {@link CookiePolicy#getCookieSpec(String)} */ public static CookieSpec getSpecByVersion(int ver) { switch(ver) { case 0: return new NetscapeDraftSpec(); case 1: return new RFC2109Spec(); default: return getDefaultSpec(); } }
/** * Gets the CookieSpec for a particular cookie version. * * <p>Supported versions: * <ul> * <li><tt>version 0</tt> corresponds to the Netscape draft * <li><tt>version 1</tt> corresponds to the RFC 2109 * <li>Any other cookie value coresponds to the default spec * <ul> * * @param ver the cookie version to get the spec for * @return cookie specification interface intended for processing * cookies with the given version * * @deprecated Use {@link CookiePolicy#getCookieSpec(String)} */ public static CookieSpec getSpecByVersion(int ver) { switch(ver) { case 0: return new NetscapeDraftSpec(); case 1: return new RFC2109Spec(); default: return getDefaultSpec(); } }
/** * @param policy cookie policy to get the CookieSpec for * @return cookie specification interface for the given policy * * @deprecated Use {@link CookiePolicy#getCookieSpec(String)} */ public static CookieSpec getSpecByPolicy(int policy) { switch(policy) { case COMPATIBILITY: return new CookieSpecBase(); case NETSCAPE_DRAFT: return new NetscapeDraftSpec(); case RFC2109: return new RFC2109Spec(); case RFC2965: return new RFC2965Spec(); default: return getDefaultSpec(); } }
/** * @param policy cookie policy to get the CookieSpec for * @return cookie specification interface for the given policy * * @deprecated Use {@link CookiePolicy#getCookieSpec(String)} */ public static CookieSpec getSpecByPolicy(int policy) { switch(policy) { case COMPATIBILITY: return new CookieSpecBase(); case NETSCAPE_DRAFT: return new NetscapeDraftSpec(); case RFC2109: return new RFC2109Spec(); case RFC2965: return new RFC2965Spec(); default: return getDefaultSpec(); } }
/** * @param policy cookie policy to get the CookieSpec for * @return cookie specification interface for the given policy * * @deprecated Use {@link CookiePolicy#getCookieSpec(String)} */ public static CookieSpec getSpecByPolicy(int policy) { switch(policy) { case COMPATIBILITY: return new CookieSpecBase(); case NETSCAPE_DRAFT: return new NetscapeDraftSpec(); case RFC2109: return new RFC2109Spec(); case RFC2965: return new RFC2965Spec(); default: return getDefaultSpec(); } }
/** * @param policy cookie policy to get the CookieSpec for * @return cookie specification interface for the given policy * * @deprecated Use {@link CookiePolicy#getCookieSpec(String)} */ public static CookieSpec getSpecByPolicy(int policy) { switch(policy) { case COMPATIBILITY: return new CookieSpecBase(); case NETSCAPE_DRAFT: return new NetscapeDraftSpec(); case RFC2109: return new RFC2109Spec(); case RFC2965: return new RFC2965Spec(); default: return getDefaultSpec(); } }