"Port" cookie attribute handler for RFC 2965 cookie spec.
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public String | |
| public boolean | match(final Cookie
org. to matchthe cookie source to match against origin)Implements org. |
| public void | parse(final SetCookie
org. to be updatedcookie attribute value from the cookie response header portValue)Implements org. |
| private static int[] | Returns: parsed array of portsport attribute value portValue)Parses the given Port attribute value (e.g. "8000,8001,8002") into an array of ports. |
| private static boolean | Returns: true returnstrue if the given port exists in
the given ports list; false otherwise.port of host where cookie was received from or being sent to. port, final int[] port list ports)Returns |
| public void | validate(final Cookie
org. to validatethe cookie source to validate against origin)Implements org. |
| RFC2965PortAttributeHandler | back to summary |
|---|---|
| public RFC2965PortAttributeHandler() | |
| getAttributeName | back to summary |
|---|---|
| public String getAttributeName() Implements org.
| |
| match | back to summary |
|---|---|
| public boolean match(final Cookie cookie, final CookieOrigin origin) Implements org. Match cookie port attribute. If the Port attribute is not specified in header, the cookie can be sent to any port. Otherwise, the request port must be in the cookie's port list.
| |
| parse | back to summary |
|---|---|
| public void parse(final SetCookie cookie, final String portValue) throws MalformedCookieException Implements org. Parse cookie port attribute.
| |
| parsePortAttribute | back to summary |
|---|---|
| private static int[] parsePortAttribute(final String portValue) throws MalformedCookieException Parses the given Port attribute value (e.g. "8000,8001,8002") into an array of ports.
| |
| portMatch | back to summary |
|---|---|
| private static boolean portMatch(final int port, final int[] ports) Returns
| |
| validate | back to summary |
|---|---|
| public void validate(final Cookie cookie, final CookieOrigin origin) throws MalformedCookieException Implements org. Validate cookie port attribute. If the Port attribute was specified in header, the request port must be in cookie's port list.
| |