Package net.shibboleth.idp.profile.impl
Class WebFlowMessageHandlerAdaptor
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
org.opensaml.profile.action.AbstractProfileAction
org.opensaml.profile.action.AbstractConditionalProfileAction
net.shibboleth.idp.profile.AbstractProfileAction
net.shibboleth.idp.profile.impl.WebFlowMessageHandlerAdaptor
- All Implemented Interfaces:
Component,DestructableComponent,InitializableComponent,ProfileAction,Aware,MessageSource,MessageSourceAware,Action
An
AbstractProfileAction subclass that adapts an OpenSAML MessageHandler for execution
in a Spring WebFlow environment.
The handler to run may be injected directly, or supplied via a lookup function.
The WebFlowMessageHandlerAdaptor.Direction enum is used to indicate the target message context for the invocation
of the handler:
WebFlowMessageHandlerAdaptor.Direction.INBOUNDindicates to execute the handler on theInOutOperationContext.getInboundMessageContext()WebFlowMessageHandlerAdaptor.Direction.OUTBOUNDindicates to execute the handler on theInOutOperationContext.getOutboundMessageContext()
- Event:
EventIds.PROCEED_EVENT_ID,EventIds.INVALID_PROFILE_CTX,EventIds.INVALID_MSG_CTX, any, as set
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumUsed to indicate the target message context for invocation of the adapted message handler. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final WebFlowMessageHandlerAdaptor.DirectionThe direction of execution for this action instance.private StringAn event to signal in the event of a handler exception.private MessageHandlerThe message handler being adapted.private Function<ProfileRequestContext,MessageHandler> Lookup strategy for handler to run if not set directly.private org.slf4j.LoggerLogger. -
Constructor Summary
ConstructorsModifierConstructorDescriptionWebFlowMessageHandlerAdaptor(Function<ProfileRequestContext, MessageHandler> lookupStrategy, WebFlowMessageHandlerAdaptor.Direction executionDirection) Constructor.privateWebFlowMessageHandlerAdaptor(WebFlowMessageHandlerAdaptor.Direction executionDirection) Constructor.WebFlowMessageHandlerAdaptor(MessageHandler messageHandler, WebFlowMessageHandlerAdaptor.Direction executionDirection) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoiddoExecute(ProfileRequestContext profileRequestContext) protected voiddoPostExecute(ProfileRequestContext profileRequestContext) protected booleandoPreExecute(ProfileRequestContext profileRequestContext) voidsetErrorEvent(String event) Set the event to signal in the event of a handler exception.Methods inherited from class net.shibboleth.idp.profile.AbstractProfileAction
doExecute, execute, getBean, getBean, getMessage, getMessage, getMessage, getParameter, getParameter, getProfileContextLookupStrategy, getRequestContext, getResult, setMessageSource, setProfileContextLookupStrategyMethods inherited from class org.opensaml.profile.action.AbstractConditionalProfileAction
getActivationCondition, setActivationConditionMethods inherited from class org.opensaml.profile.action.AbstractProfileAction
doPostExecute, ensureHttpServletRequest, ensureHttpServletResponse, execute, getHttpServletRequest, getHttpServletRequestSupplier, getHttpServletResponse, getHttpServletResponseSupplier, getLogPrefix, isPreExecuteCalled, setHttpServletRequestSupplier, setHttpServletResponseSupplierMethods 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. -
handlerLookupStrategy
Lookup strategy for handler to run if not set directly. -
handler
The message handler being adapted. -
direction
The direction of execution for this action instance. -
errorEvent
An event to signal in the event of a handler exception.
-
-
Constructor Details
-
WebFlowMessageHandlerAdaptor
private WebFlowMessageHandlerAdaptor(@Nonnull @ParameterName(name="executionDirection") WebFlowMessageHandlerAdaptor.Direction executionDirection) Constructor.- Parameters:
executionDirection- the direction of execution
-
WebFlowMessageHandlerAdaptor
public WebFlowMessageHandlerAdaptor(@Nonnull @ParameterName(name="messageHandler") MessageHandler messageHandler, @Nonnull @ParameterName(name="executionDirection") WebFlowMessageHandlerAdaptor.Direction executionDirection) Constructor.- Parameters:
messageHandler- the adapted message handlerexecutionDirection- the direction of execution
-
WebFlowMessageHandlerAdaptor
public WebFlowMessageHandlerAdaptor(@Nonnull @ParameterName(name="lookupStrategy") Function<ProfileRequestContext, MessageHandler> lookupStrategy, @Nonnull @ParameterName(name="executionDirection") WebFlowMessageHandlerAdaptor.Direction executionDirection) Constructor.- Parameters:
lookupStrategy- lookup function for message handler to runexecutionDirection- the direction of execution
-
-
Method Details
-
setErrorEvent
Set the event to signal in the event of a handler exception.- Parameters:
event- event to signal
-
doPreExecute
- Overrides:
doPreExecutein classAbstractConditionalProfileAction
-
doExecute
- Overrides:
doExecutein classAbstractProfileAction
-
doPostExecute
- Overrides:
doPostExecutein classAbstractProfileAction
-