public abstract class AbstractObjectValidator<T extends XMLObject> extends Object implements ObjectValidator<T>
ObjectValidator
.
Supports the following ValidationContext
static parameters:
CoreValidatorParameters.STRICT_VALIDATION
: Optional. If not supplied, defaults to 'false'. Tells whether
strict validation should be performed.CoreValidatorParameters.ALLOWED_CLOCK_SKEW
: Optional. Gives the number of milliseconds that is the
maximum allowed clock skew. If not given DEFAULT_ALLOWED_CLOCK_SKEW
is used.CoreValidatorParameters.MAX_AGE_MESSAGE
: Optional. Gives the maximum age (difference between issuance
time and the validation time). If not given, the DEFAULT_MAX_AGE_RECEIVED_MESSAGE
is used.Modifier and Type | Field and Description |
---|---|
static long |
DEFAULT_ALLOWED_CLOCK_SKEW
The default allowed clock skew - 30000L milliseconds.
|
static long |
DEFAULT_MAX_AGE_RECEIVED_MESSAGE
The default value for how old a received message is allowed to be - 180000L milliseconds.
|
Constructor and Description |
---|
AbstractObjectValidator() |
Modifier and Type | Method and Description |
---|---|
static long |
getAllowedClockSkew(ValidationContext context)
Returns the number of milliseconds that is the maximum allowed clock skew that we accept when comparing time
stamps.
|
static long |
getMaxAgeReceivedMessage(ValidationContext context)
Returns the number of milliseconds that a received message (or element) is allowed to less than the current time.
|
static long |
getReceiveInstant(ValidationContext context)
Returns the timestamp (milliseconds since epoch) for when the message being validated was received.
|
static boolean |
isStrictValidation(ValidationContext context)
Tells whether this validator runs in "strict" mode.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
validate
public static final long DEFAULT_ALLOWED_CLOCK_SKEW
public static final long DEFAULT_MAX_AGE_RECEIVED_MESSAGE
public static boolean isStrictValidation(ValidationContext context)
CoreValidatorParameters.STRICT_VALIDATION
. If this parameter is not available false
is returned.context
- the validation contexttrue
for strict mode, and false
otherwisepublic static long getAllowedClockSkew(ValidationContext context)
CoreValidatorParameters.ALLOWED_CLOCK_SKEW
. If this parameter is not available,
DEFAULT_ALLOWED_CLOCK_SKEW
is used.context
- the validation contextpublic static long getMaxAgeReceivedMessage(ValidationContext context)
CoreValidatorParameters.MAX_AGE_MESSAGE
. If
this parameter is not available, DEFAULT_MAX_AGE_RECEIVED_MESSAGE
is used.context
- the validation contextpublic static long getReceiveInstant(ValidationContext context)
CoreValidatorParameters.RECEIVE_INSTANT
. If the parameter is not available the current time is
returned.context
- the validation context.Copyright © 2018 Litsec AB. All rights reserved.