Package net.shibboleth.idp.profile.impl
Class WebFlowMessageHandlerAdaptor
java.lang.Object
net.shibboleth.utilities.java.support.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.INBOUND
indicates to execute the handler on theInOutOperationContext.getInboundMessageContext()
WebFlowMessageHandlerAdaptor.Direction.OUTBOUND
indicates 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 enum
Used to indicate the target message context for invocation of the adapted message handler. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final WebFlowMessageHandlerAdaptor.Direction
The direction of execution for this action instance.private String
An event to signal in the event of a handler exception.private MessageHandler
The message handler being adapted.private Function<ProfileRequestContext,
MessageHandler> Lookup strategy for handler to run if not set directly.private org.slf4j.Logger
Logger. -
Constructor Summary
ConstructorsModifierConstructorDescriptionWebFlowMessageHandlerAdaptor
(Function<ProfileRequestContext, MessageHandler> lookupStrategy, WebFlowMessageHandlerAdaptor.Direction executionDirection) Constructor.private
WebFlowMessageHandlerAdaptor
(WebFlowMessageHandlerAdaptor.Direction executionDirection) Constructor.WebFlowMessageHandlerAdaptor
(MessageHandler messageHandler, WebFlowMessageHandlerAdaptor.Direction executionDirection) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
doExecute
(ProfileRequestContext profileRequestContext) protected void
doPostExecute
(ProfileRequestContext profileRequestContext) protected boolean
doPreExecute
(ProfileRequestContext profileRequestContext) void
setErrorEvent
(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, getMessage, getMessage, getMessage, getProfileContextLookupStrategy, getRequestContext, getResult, setMessageSource, setProfileContextLookupStrategy
Methods inherited from class org.opensaml.profile.action.AbstractConditionalProfileAction
getActivationCondition, setActivationCondition
Methods inherited from class org.opensaml.profile.action.AbstractProfileAction
doPostExecute, execute, getHttpServletRequest, getHttpServletResponse, getLogPrefix, setHttpServletRequest, setHttpServletResponse
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
destroy, doDestroy, doInitialize, initialize, isDestroyed, isInitialized
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.shibboleth.utilities.java.support.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:
doPreExecute
in classAbstractConditionalProfileAction
-
doExecute
- Overrides:
doExecute
in classAbstractProfileAction
-
doPostExecute
- Overrides:
doPostExecute
in classAbstractProfileAction
-