Package org.opensaml.soap.messaging
Class AbstractHeaderGeneratingMessageHandler
- java.lang.Object
-
- net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
-
- org.opensaml.messaging.handler.AbstractMessageHandler
-
- org.opensaml.soap.messaging.AbstractHeaderGeneratingMessageHandler
-
- All Implemented Interfaces:
net.shibboleth.utilities.java.support.component.Component,net.shibboleth.utilities.java.support.component.DestructableComponent,net.shibboleth.utilities.java.support.component.InitializableComponent,org.opensaml.messaging.handler.MessageHandler
public abstract class AbstractHeaderGeneratingMessageHandler extends org.opensaml.messaging.handler.AbstractMessageHandlerAbstract base class for message handlers that generate SOAP headers.
-
-
Field Summary
Fields Modifier and Type Field Description private booleaneffectiveMustUnderstandThe effective mustUnderstand value to use.private StringeffectiveTargetNodeThe effective target node value to use.private booleanmustUnderstandThe statically configured value for mustUnderstand.private Predicate<org.opensaml.messaging.context.MessageContext>mustUnderstandStrategyPredicate strategy for evaluating mustUnderstand from the message context.private StringtargetNodeThe statically configured value for target node (SOAP 1.1 actor or SOAP 1.2 role).private Function<org.opensaml.messaging.context.MessageContext,String>targetNodeStrategyFunction strategy for resolving target node from the message context.
-
Constructor Summary
Constructors Constructor Description AbstractHeaderGeneratingMessageHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddecorateGeneratedHeader(org.opensaml.messaging.context.MessageContext messageContext, org.opensaml.core.xml.XMLObject header)Decorate the header based on configured and/or resolved values.protected booleandoPreInvoke(org.opensaml.messaging.context.MessageContext messageContext)protected StringgetEffectiveTargetNode()Get the effective value for target node (SOAP 1.1 actor or SOAP 1.2 role).protected booleanisEffectiveMustUnderstand()Get the effective value for mustUnderstand.voidsetMustUnderstand(boolean flag)Set the statically configured value for mustUnderstand.voidsetMustUnderstandStrategy(Predicate<org.opensaml.messaging.context.MessageContext> strategy)Set the predicate strategy for evaluating mustUnderstand from the message context.voidsetTargetNode(String node)Set the statically configured value for target node (SOAP 1.1 actor or SOAP 1.2 role).voidsetTargetNodeStrategy(Function<org.opensaml.messaging.context.MessageContext,String> strategy)Set the predicate strategy for evaluating mustUnderstand from the message context.-
Methods inherited from class org.opensaml.messaging.handler.AbstractMessageHandler
doInvoke, doPostInvoke, doPostInvoke, getActivationCondition, getLogPrefix, invoke, setActivationCondition
-
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
destroy, doDestroy, doInitialize, initialize, isDestroyed, isInitialized
-
-
-
-
Field Detail
-
mustUnderstand
private boolean mustUnderstand
The statically configured value for mustUnderstand.
-
mustUnderstandStrategy
@Nullable private Predicate<org.opensaml.messaging.context.MessageContext> mustUnderstandStrategy
Predicate strategy for evaluating mustUnderstand from the message context.
-
effectiveMustUnderstand
private boolean effectiveMustUnderstand
The effective mustUnderstand value to use.
-
targetNode
@Nullable private String targetNode
The statically configured value for target node (SOAP 1.1 actor or SOAP 1.2 role).
-
targetNodeStrategy
@Nullable private Function<org.opensaml.messaging.context.MessageContext,String> targetNodeStrategy
Function strategy for resolving target node from the message context.
-
effectiveTargetNode
private String effectiveTargetNode
The effective target node value to use.
-
-
Method Detail
-
setMustUnderstand
public void setMustUnderstand(boolean flag)
Set the statically configured value for mustUnderstand.- Parameters:
flag- true if header must be understood, false if not
-
setMustUnderstandStrategy
public void setMustUnderstandStrategy(@Nullable Predicate<org.opensaml.messaging.context.MessageContext> strategy)Set the predicate strategy for evaluating mustUnderstand from the message context.- Parameters:
strategy- the predicate strategy
-
isEffectiveMustUnderstand
protected boolean isEffectiveMustUnderstand()
Get the effective value for mustUnderstand.- Returns:
- the effective value for mustUnderstand.
-
setTargetNode
public void setTargetNode(@Nullable String node)Set the statically configured value for target node (SOAP 1.1 actor or SOAP 1.2 role).- Parameters:
node- the target node, may be null
-
setTargetNodeStrategy
public void setTargetNodeStrategy(@Nullable Function<org.opensaml.messaging.context.MessageContext,String> strategy)Set the predicate strategy for evaluating mustUnderstand from the message context.- Parameters:
strategy- the predicate strategy
-
getEffectiveTargetNode
protected String getEffectiveTargetNode()
Get the effective value for target node (SOAP 1.1 actor or SOAP 1.2 role).- Returns:
- the effective value for target node
-
doPreInvoke
protected boolean doPreInvoke(@Nonnull org.opensaml.messaging.context.MessageContext messageContext) throws org.opensaml.messaging.handler.MessageHandlerException- Overrides:
doPreInvokein classorg.opensaml.messaging.handler.AbstractMessageHandler- Throws:
org.opensaml.messaging.handler.MessageHandlerException
-
decorateGeneratedHeader
protected void decorateGeneratedHeader(@Nonnull org.opensaml.messaging.context.MessageContext messageContext, @Nonnull org.opensaml.core.xml.XMLObject header)Decorate the header based on configured and/or resolved values.- Parameters:
messageContext- the current message contextheader- the header to decorate
-
-