public class Context
extends java.lang.Object
Constructor and Description |
---|
Context(java.lang.String id,
long expirationTime,
long creationTime)
The constructor.
|
Modifier and Type | Method and Description |
---|---|
long |
getCreationTime()
Returns the time of context creation or when it was last renewed.
|
long |
getExpirationTime()
Returns the time after which the context expires and is no longer valid.
|
java.lang.String |
getId()
Returns the id.
|
void |
renew()
Renews the context.
|
public Context(java.lang.String id, long expirationTime, long creationTime)
id
- The id.expirationTime
- The time in milliseconds after which the context expires and
is no longer valid.creationTime
- The time the context was created or the last renew action.public java.lang.String getId()
public long getExpirationTime()
public long getCreationTime()
public void renew()