public final class PSSession extends Object implements PSCredentials, Serializable
Constructor and Description |
---|
PSSession(String session)
Create a new session with the specified ID.
|
PSSession(String session,
long timestamp)
Create a new session with the specified ID.
|
Modifier and Type | Method and Description |
---|---|
long |
age()
Returns the age of this session.
|
String |
getJSessionId() |
static PSSession |
parseSetCookieHeader(String cookie)
Generate the session from the
Set-Cookie HTTP response header. |
long |
timestamp()
Returns the age of this session.
|
String |
toString() |
void |
update()
Update the timestamp for this session.
|
public PSSession(String session)
session
- The session ID.public PSSession(String session, long timestamp)
session
- The session ID.timestamp
- When the session was initially created.public String getJSessionId()
public void update()
public long age()
public long timestamp()
public static PSSession parseSetCookieHeader(String cookie)
Set-Cookie
HTTP response header.
The expected header value should be:
JSESSIONID=F354C484E7368C6EB08E83A6E913FEA4; Path=/ps; Secure
cookie
- The cookie valuenull
if the cookie could be parsedCopyright © 2016 Allette Systems. All rights reserved.