Class AddMessageIDHandler
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
org.opensaml.messaging.handler.AbstractMessageHandler
org.opensaml.soap.messaging.AbstractHeaderGeneratingMessageHandler
org.opensaml.soap.wsaddressing.messaging.impl.AddMessageIDHandler
- All Implemented Interfaces:
Component,DestructableComponent,InitializableComponent,MessageHandler
Handler implementation that adds a wsa:MessageID header to the outbound SOAP envelope.
The value from WSAddressingContext.getMessageIDURI() will be used, if present. If not,
then the value generated via the locally-configured strategy getIdentifierGenerationStrategy()
will be used. If neither of those sources are available, then a random "urn:uuid:..." URI value will be
generated internally using UUID.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate IdentifierGenerationStrategyStrategy for generating identifiers.private org.slf4j.LoggerLogger. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoInvoke(MessageContext messageContext) Performs the handler logic.Get the identifier generation strategy.protected StringgetMessageID(MessageContext messageContext) Get the effective message ID value to issue in the outbound message.voidSet the identifier generation strategy.Methods inherited from class org.opensaml.soap.messaging.AbstractHeaderGeneratingMessageHandler
decorateGeneratedHeader, doPreInvoke, getEffectiveTargetNode, isEffectiveMustUnderstand, setMustUnderstand, setMustUnderstandStrategy, setTargetNode, setTargetNodeStrategyMethods inherited from class org.opensaml.messaging.handler.AbstractMessageHandler
doPostInvoke, doPostInvoke, getActivationCondition, getLogPrefix, invoke, isPreInvokeCalled, setActivationConditionMethods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, doDestroy, doInitialize, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException, initialize, isDestroyed, isInitializedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.shibboleth.shared.component.InitializableComponent
initialize, isInitialized
-
Field Details
-
log
@Nonnull private org.slf4j.Logger logLogger. -
identifierGenerationStrategy
Strategy for generating identifiers.
-
-
Constructor Details
-
AddMessageIDHandler
public AddMessageIDHandler()
-
-
Method Details
-
getIdentifierGenerationStrategy
Get the identifier generation strategy.- Returns:
- the strategy, or null
-
doInvoke
Performs the handler logic.- Specified by:
doInvokein classAbstractMessageHandler- Parameters:
messageContext- the message context on which to invoke the handler- Throws:
MessageHandlerException- if there is an error invoking the handler on the message context
-
getMessageID
Get the effective message ID value to issue in the outbound message.- Parameters:
messageContext- the current message context- Returns:
- the retrieved or generated message ID
-