Package com.sun.xml.wss.impl.policy.mls
Class TimestampPolicy
java.lang.Object
com.sun.xml.wss.impl.policy.MLSPolicy
com.sun.xml.wss.impl.policy.mls.WSSPolicy
com.sun.xml.wss.impl.policy.mls.TimestampPolicy
- All Implemented Interfaces:
SecurityPolicy,Cloneable
A policy representing a WSS Timestamp element.
Note: The TimestampPolicy is the only WSSPolicy element that does not contain a
concrete FeatureBinding and/or KeyBinding.
-
Field Summary
Fields inherited from class com.sun.xml.wss.impl.policy.mls.WSSPolicy
_featureBinding, _isOptional, _keyBinding, _policyIdentifier, bsp, UUID -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()Clone operatorbooleanequals operatorbooleanequalsIgnoreTargets(WSSPolicy policy) longlonglonggetType()Get the type of the policy.voidsetCreationTime(String creationTime) set the CreationTime for the timestamp in this TimestampPolicyvoidsetExpirationTime(String expirationTime) voidsetMaxClockSkew(long maxClockSkew) set the maximum clock skew adjustment value (in milliseconds)voidsetTimeout(long timeout) If the current time on a receiving system is past the CreationTime of the timestamp plus the timeout, then the timestamp is to be considered expired.voidsetTimestampFreshness(long timestampFreshness) set the Timestamp Freshness Limit (in milliseconds) for this Timestamp Timestamps received by a receiver with creation Times older than the Timestamp Freshness Limit period are supposed to be rejected by the receiver.Methods inherited from class com.sun.xml.wss.impl.policy.mls.WSSPolicy
getFeatureBinding, getKeyBinding, getPolicyIdentifier, getUUID, isBSP, isBSP, isOptional, isOptional, setFeatureBinding, setKeyBinding, setPolicyIdentifier, setUUIDMethods inherited from class com.sun.xml.wss.impl.policy.MLSPolicy
isReadOnly, isReadOnly
-
Constructor Details
-
TimestampPolicy
public TimestampPolicy()Default constructor
-
-
Method Details
-
setCreationTime
set the CreationTime for the timestamp in this TimestampPolicy -
setTimeout
public void setTimeout(long timeout) If the current time on a receiving system is past the CreationTime of the timestamp plus the timeout, then the timestamp is to be considered expired.- Parameters:
timeout- the number of milliseconds after which the Timestamp in this TimestampPolicy will expire.
-
setMaxClockSkew
public void setMaxClockSkew(long maxClockSkew) set the maximum clock skew adjustment value (in milliseconds)- Parameters:
maxClockSkew- the Maximum Clock Skew adjustment to be used when validating received timestamps
-
setTimestampFreshness
public void setTimestampFreshness(long timestampFreshness) set the Timestamp Freshness Limit (in milliseconds) for this Timestamp Timestamps received by a receiver with creation Times older than the Timestamp Freshness Limit period are supposed to be rejected by the receiver.- Parameters:
timestampFreshness- the Timestamp Freshness Limit (in milliseconds)
-
getCreationTime
- Returns:
- creationTime the creation time of the timestamp in this TimestampPolicy if set, empty string otherwise
-
getTimeout
public long getTimeout()- Returns:
- timeout the Timeout in milliseconds for this Timestamp
-
getExpirationTime
- Returns:
- expirationTime the expiration time if set for this Timestamp, empty string otherwise
- Throws:
Exception
-
setExpirationTime
- Parameters:
expirationTime- the expiration time
-
getMaxClockSkew
public long getMaxClockSkew()- Returns:
- maxClockSkew the maximum Clock Skew adjustment
-
getTimestampFreshness
public long getTimestampFreshness()- Returns:
- timeStampFreshness limit
-
equals
Description copied from class:WSSPolicyequals operator -
equalsIgnoreTargets
- Specified by:
equalsIgnoreTargetsin classWSSPolicy
-
clone
Clone operator -
getType
Description copied from interface:SecurityPolicyGet the type of the policy.Implementation Note: Useful to avoid instanceof checks and String.equals checks
- Returns:
- the type of the policy
-