public abstract class AbstractSession extends Object implements Session
Constructor and Description |
---|
AbstractSession()
This constructor is mandatory (even though not referenced anywhere) is required for
serialization purposes.
|
AbstractSession(PRNG random) |
AbstractSession(PRNG random,
long timeout,
int length) |
Modifier and Type | Method and Description |
---|---|
protected int |
checksum() |
protected int |
crc() |
Map<String,Object> |
data() |
void |
destroy()
Destroy the session
|
<T> T |
get(String key)
Get some data from the session
|
String |
id() |
void |
incrementVersion() |
boolean |
isDestroyed() |
boolean |
isEmpty() |
boolean |
isRegenerated() |
long |
lastAccessed() |
String |
oldId() |
Session |
put(String key,
Object obj)
Put some data in a session
|
Session |
regenerateId() |
<T> T |
remove(String key)
Remove some data from the session
|
void |
setAccessed()
Mark the session as being accessed.
|
protected void |
setData(JsonObject data) |
protected void |
setData(Map<String,Object> data) |
protected void |
setId(String id) |
protected void |
setLastAccessed(long lastAccessed) |
void |
setPRNG(PRNG prng) |
protected void |
setTimeout(long timeout) |
protected void |
setVersion(int version) |
long |
timeout() |
int |
version() |
public AbstractSession()
public AbstractSession(PRNG random)
public AbstractSession(PRNG random, long timeout, int length)
protected void setId(String id)
protected void setTimeout(long timeout)
protected void setData(JsonObject data)
protected void setLastAccessed(long lastAccessed)
protected void setVersion(int version)
public void setPRNG(PRNG prng)
public String id()
public Session regenerateId()
regenerateId
in interface Session
public long timeout()
public <T> T get(String key)
Session
public Session put(String key, Object obj)
Session
public <T> T remove(String key)
Session
public boolean isEmpty()
public long lastAccessed()
lastAccessed
in interface Session
public void setAccessed()
Session
setAccessed
in interface Session
public void destroy()
Session
public boolean isDestroyed()
isDestroyed
in interface Session
public boolean isRegenerated()
isRegenerated
in interface Session
public int version()
public void incrementVersion()
protected int crc()
protected int checksum()
Copyright © 2023 Eclipse. All rights reserved.