public class Timestamp extends Object
| Constructor and Description |
|---|
Timestamp(boolean milliseconds,
Document doc,
int ttl)
Constructs a
Timestamp object according
to the defined parameters. |
Timestamp(boolean milliseconds,
Document doc,
WSTimeSource timeSource,
int ttl)
Constructs a
Timestamp object according
to the defined parameters. |
Timestamp(Element timestampElement,
BSPEnforcer bspEnforcer)
Constructs a
Timestamp object and parses the
wsu:Timestamp element to initialize it. |
| Modifier and Type | Method and Description |
|---|---|
void |
addWSUNamespace()
Add the WSU Namespace to this T.
|
boolean |
equals(Object object) |
Instant |
getCreated()
Get the time of creation.
|
String |
getCreatedString()
Get the time of creation as a String
|
Element |
getElement()
Returns the dom element of this
Timestamp object. |
Instant |
getExpires()
Get the time of expiration.
|
String |
getID() |
int |
hashCode() |
boolean |
isExpired()
Return true if the current Timestamp is expired, meaning if the "Expires" value
is before the current time.
|
void |
setID(String id)
Set wsu:Id attribute of this timestamp
|
String |
toString()
Returns the string representation of the token.
|
boolean |
verifyCreated(int timeToLive,
int futureTimeToLive)
Return true if the "Created" value is before the current time minus the timeToLive
argument, and if the Created value is not "in the future".
|
public Timestamp(Element timestampElement, BSPEnforcer bspEnforcer) throws WSSecurityException
Timestamp object and parses the
wsu:Timestamp element to initialize it.timestampElement - the wsu:Timestamp element that
contains the timestamp databspEnforcer - a BSPEnforcer instance to enforce BSP rulesWSSecurityExceptionpublic Timestamp(boolean milliseconds,
Document doc,
int ttl)
Timestamp object according
to the defined parameters.doc - the SOAP envelope as Documentttl - the time to live (validity of the security semantics) in secondspublic Timestamp(boolean milliseconds,
Document doc,
WSTimeSource timeSource,
int ttl)
Timestamp object according
to the defined parameters.doc - the SOAP envelope as Documentttl - the time to live (validity of the security semantics) in secondspublic void addWSUNamespace()
public Element getElement()
Timestamp object.wsse:UsernameToken elementpublic String toString()
public Instant getCreated()
public String getCreatedString()
public Instant getExpires()
public void setID(String id)
id - public String getID()
public boolean isExpired()
public boolean verifyCreated(int timeToLive,
int futureTimeToLive)
timeToLive - the value in seconds for the validity of the Created timefutureTimeToLive - the value in seconds for the future validity of the Created timeCopyright © 2018 JBoss by Red Hat. All rights reserved.