InboundMessageType
- type of in-bound messageOutboundMessageType
- type of out-bound message@Prototype public abstract class AbstractProfileAction<InboundMessageType,OutboundMessageType> extends AbstractInitializableComponent implements ProfileAction<InboundMessageType,OutboundMessageType>
Prototype
to indicate that it is stateful.Constructor and Description |
---|
AbstractProfileAction() |
Modifier and Type | Method and Description |
---|---|
protected void |
doExecute(ProfileRequestContext<InboundMessageType,OutboundMessageType> profileRequestContext)
Performs this action.
|
protected void |
doPostExecute(ProfileRequestContext<InboundMessageType,OutboundMessageType> profileRequestContext)
Called after execution, actions may override this method to perform post-processing for a request.
|
protected void |
doPostExecute(ProfileRequestContext<InboundMessageType,OutboundMessageType> profileRequestContext,
Exception e)
Called after execution, actions may override this method to perform post-processing for a request.
|
protected boolean |
doPreExecute(ProfileRequestContext<InboundMessageType,OutboundMessageType> profileRequestContext)
Called prior to execution, actions may override this method to perform pre-processing for a request.
|
void |
execute(ProfileRequestContext<InboundMessageType,OutboundMessageType> profileRequestContext)
Performs this action.
|
HttpServletRequest |
getHttpServletRequest()
Get the current HTTP request if available.
|
HttpServletResponse |
getHttpServletResponse()
Get the current HTTP response.
|
protected String |
getLogPrefix()
Return a prefix for logging messages for this component.
|
void |
setHttpServletRequest(HttpServletRequest request)
Set the current HTTP request.
|
void |
setHttpServletResponse(HttpServletResponse response)
Set the current HTTP response.
|
destroy, doDestroy, doInitialize, initialize, isDestroyed, isInitialized
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
initialize, isInitialized
@Nullable public HttpServletRequest getHttpServletRequest()
public void setHttpServletRequest(@Nullable HttpServletRequest request)
request
- current HTTP request@Nullable public HttpServletResponse getHttpServletResponse()
public void setHttpServletResponse(@Nullable HttpServletResponse response)
response
- current HTTP responsepublic void execute(@Nonnull ProfileRequestContext<InboundMessageType,OutboundMessageType> profileRequestContext)
execute
in interface ProfileAction<InboundMessageType,OutboundMessageType>
profileRequestContext
- the current IdP profile request contextprotected boolean doPreExecute(@Nonnull ProfileRequestContext<InboundMessageType,OutboundMessageType> profileRequestContext)
If false is returned, execution will not proceed, and the action should attach an
EventContext
to the context tree to signal how to continue with overall
workflow processing.
If returning successfully, the last step should be to return the result of the superclass version of this method.
profileRequestContext
- the current IdP profile request contextprotected void doExecute(@Nonnull ProfileRequestContext<InboundMessageType,OutboundMessageType> profileRequestContext)
profileRequestContext
- the current IdP profile request contextprotected void doPostExecute(@Nonnull ProfileRequestContext<InboundMessageType,OutboundMessageType> profileRequestContext)
Actions must not "fail" during this step and will not have the opportunity to signal events at this stage. This
method will not be called if doPreExecute(org.opensaml.profile.context.ProfileRequestContext<InboundMessageType, OutboundMessageType>)
fails, but is called if an exception is raised by
doExecute(org.opensaml.profile.context.ProfileRequestContext<InboundMessageType, OutboundMessageType>)
.
profileRequestContext
- the current IdP profile request contextprotected void doPostExecute(@Nonnull ProfileRequestContext<InboundMessageType,OutboundMessageType> profileRequestContext, @Nonnull Exception e)
Actions must not "fail" during this step and will not have the opportunity to signal events at this stage. This
method will not be called if doPreExecute(org.opensaml.profile.context.ProfileRequestContext<InboundMessageType, OutboundMessageType>)
fails, but is called if an exception is raised by
doExecute(org.opensaml.profile.context.ProfileRequestContext<InboundMessageType, OutboundMessageType>)
.
This version of the method will be called if an exception is raised during execution of the action. The overall action result will be to raise this error, so any errors inadvertently raised by this method will be logged and superseded.
The default implementation simply calls the error-less version of this method.
profileRequestContext
- the current IdP profile request contexte
- an exception raised by the doExecute(org.opensaml.profile.context.ProfileRequestContext<InboundMessageType, OutboundMessageType>)
methodCopyright © 2016 JBoss by Red Hat. All rights reserved.