public class AddTimestampHandler extends AbstractHeaderGeneratingMessageHandler
Modifier and Type | Field and Description |
---|---|
private org.opensaml.messaging.context.navigate.ContextDataLookupFunction<org.opensaml.messaging.context.MessageContext,org.joda.time.DateTime> |
createdLookup
Context lookup function for the Created time.
|
private org.joda.time.DateTime |
createdValue
The effective Created value to use.
|
private org.opensaml.messaging.context.navigate.ContextDataLookupFunction<org.opensaml.messaging.context.MessageContext,org.joda.time.DateTime> |
expiresLookup
Context lookup function for the Expires time.
|
private Long |
expiresOffsetFromCreated
Parameter indicating the offset from Created, in milliseconds, used to calculate the Expires time,
if no Expires value is explicitly supplied via the other supported mechanisms.
|
private org.joda.time.DateTime |
expiresValue
The effective Expires value to use.
|
private org.slf4j.Logger |
log
Logger.
|
private boolean |
useCurrentTimeAsDefaultCreated
Flag indicating whether to use the current time as the Created time, if no value
is explicitly supplied by the other supported mechanisms.
|
Constructor and Description |
---|
AddTimestampHandler() |
Modifier and Type | Method and Description |
---|---|
protected void |
doInvoke(org.opensaml.messaging.context.MessageContext messageContext) |
protected boolean |
doPreInvoke(org.opensaml.messaging.context.MessageContext messageContext) |
org.opensaml.messaging.context.navigate.ContextDataLookupFunction<org.opensaml.messaging.context.MessageContext,org.joda.time.DateTime> |
getCreatedLookup()
Get the context lookup function for the Created time.
|
protected org.joda.time.DateTime |
getCreatedValue(org.opensaml.messaging.context.MessageContext messageContext)
Get the Created value.
|
org.opensaml.messaging.context.navigate.ContextDataLookupFunction<org.opensaml.messaging.context.MessageContext,org.joda.time.DateTime> |
getExpiresLookup()
Get the context lookup function for the Expires time.
|
Long |
getExpiresOffsetFromCreated()
Get the parameter indicating the offset from Created, in milliseconds, used to calculate the Expires time,
if no Expires value is explicitly supplied via the other supported mechanisms.
|
protected org.joda.time.DateTime |
getExpiresValue(org.opensaml.messaging.context.MessageContext messageContext,
org.joda.time.DateTime created)
Get the Expires value.
|
boolean |
isUseCurrentTimeAsDefaultCreated()
Get the flag indicating whether to use the current time as the Created time, if no value
is explicitly supplied by the other supported mechanisms.
|
void |
setCreatedLookup(org.opensaml.messaging.context.navigate.ContextDataLookupFunction<org.opensaml.messaging.context.MessageContext,org.joda.time.DateTime> lookup)
Set the context lookup function for the Created time.
|
void |
setExpiresLookup(org.opensaml.messaging.context.navigate.ContextDataLookupFunction<org.opensaml.messaging.context.MessageContext,org.joda.time.DateTime> lookup)
Set the context lookup function for the Expires time.
|
void |
setExpiresOffsetFromCreated(Long value)
Set the parameter indicating the offset from Created, in milliseconds, used to calculate the Expires time,
if no Expires value is explicitly supplied via the other supported mechanisms.
|
void |
setUseCurrentTimeAsDefaultCreated(boolean flag)
Set the flag indicating whether to use the current time as the Created time, if no value
is explicitly supplied by the other supported mechanisms.
|
decorateGeneratedHeader, getEffectiveTargetNode, isEffectiveMustUnderstand, setMustUnderstand, setMustUnderstandStrategy, setTargetNode, setTargetNodeStrategy
doPostInvoke, doPostInvoke, getActivationCondition, getLogPrefix, invoke, setActivationCondition
destroy, doDestroy, doInitialize, initialize, isDestroyed, isInitialized
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
initialize, isInitialized
private org.slf4j.Logger log
private org.opensaml.messaging.context.navigate.ContextDataLookupFunction<org.opensaml.messaging.context.MessageContext,org.joda.time.DateTime> createdLookup
private org.opensaml.messaging.context.navigate.ContextDataLookupFunction<org.opensaml.messaging.context.MessageContext,org.joda.time.DateTime> expiresLookup
private boolean useCurrentTimeAsDefaultCreated
private Long expiresOffsetFromCreated
private org.joda.time.DateTime createdValue
private org.joda.time.DateTime expiresValue
@Nullable public org.opensaml.messaging.context.navigate.ContextDataLookupFunction<org.opensaml.messaging.context.MessageContext,org.joda.time.DateTime> getCreatedLookup()
public void setCreatedLookup(@Nullable org.opensaml.messaging.context.navigate.ContextDataLookupFunction<org.opensaml.messaging.context.MessageContext,org.joda.time.DateTime> lookup)
lookup
- the lookup function@Nullable public org.opensaml.messaging.context.navigate.ContextDataLookupFunction<org.opensaml.messaging.context.MessageContext,org.joda.time.DateTime> getExpiresLookup()
public void setExpiresLookup(@Nullable org.opensaml.messaging.context.navigate.ContextDataLookupFunction<org.opensaml.messaging.context.MessageContext,org.joda.time.DateTime> lookup)
lookup
- the lookup functionpublic boolean isUseCurrentTimeAsDefaultCreated()
public void setUseCurrentTimeAsDefaultCreated(boolean flag)
flag
- true if should use currnet time, false if not@Nullable public Long getExpiresOffsetFromCreated()
public void setExpiresOffsetFromCreated(@Nullable Long value)
value
- the expires off set, or nullprotected boolean doPreInvoke(@Nonnull org.opensaml.messaging.context.MessageContext messageContext) throws org.opensaml.messaging.handler.MessageHandlerException
doPreInvoke
in class AbstractHeaderGeneratingMessageHandler
org.opensaml.messaging.handler.MessageHandlerException
protected void doInvoke(@Nonnull org.opensaml.messaging.context.MessageContext messageContext) throws org.opensaml.messaging.handler.MessageHandlerException
doInvoke
in class org.opensaml.messaging.handler.AbstractMessageHandler
org.opensaml.messaging.handler.MessageHandlerException
@Nullable protected org.joda.time.DateTime getCreatedValue(@Nonnull org.opensaml.messaging.context.MessageContext messageContext)
messageContext
- the current message context@Nullable protected org.joda.time.DateTime getExpiresValue(@Nonnull org.opensaml.messaging.context.MessageContext messageContext, @Nullable org.joda.time.DateTime created)
messageContext
- the current message contextcreated
- the created value, if anyCopyright © 1999–2018 Shibboleth Consortium. All rights reserved.