public class Nonce
extends java.lang.Object
Constructor and Description |
---|
Nonce(ToolConsumer consumer,
java.lang.String value)
Construct a nonce value for a tool consumer with the specified value.
|
Nonce(ToolConsumer consumer,
java.lang.String value,
int life)
Construct a nonce value for a tool consumer with the specified value and maximum life.
|
Modifier and Type | Method and Description |
---|---|
ToolConsumer |
getConsumer()
Returns the tool consumer.
|
java.util.Calendar |
getExpires()
Returns the date/time when the nonce value is due to expire.
|
java.lang.String |
getKey()
Returns the tool consumer key.
|
java.lang.String |
getValue()
Returns the outcome value.
|
boolean |
load()
Load a nonce value from the database.
|
boolean |
save()
Save a nonce value in the database.
|
public Nonce(ToolConsumer consumer, java.lang.String value)
consumer
- Tool Consumer objectvalue
- Nonce valuepublic Nonce(ToolConsumer consumer, java.lang.String value, int life)
consumer
- Tool Consumer objectvalue
- Nonce valuelife
- Maximum life of nonce valuepublic boolean load()
true
if the nonce value was successfully loadedpublic boolean save()
true
if the nonce value was successfully savedpublic ToolConsumer getConsumer()
public java.lang.String getKey()
public java.lang.String getValue()
public java.util.Calendar getExpires()