[java-identity-provider COMMIT] in /trunk: idp-profile-api/src/main/java/net/shibboleth/idp/profile/AbstractProfileAc...
noreply at shibboleth.net
noreply at shibboleth.net
Thu Sep 22 16:47:39 EDT 2016
Author: scantor
Date: Thu Sep 22 16:47:39 2016
New Revision: 8422
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=8422&view=rev
Log:
Checkpoint work on adding timers across actions.
Added:
trunk/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/impl/PopulateTimerContext.java (with props)
Modified:
trunk/idp-profile-api/src/main/java/net/shibboleth/idp/profile/AbstractProfileAction.java
trunk/idp-profile-api/src/main/java/net/shibboleth/idp/profile/context/TimerContext.java
Modified: trunk/idp-profile-api/src/main/java/net/shibboleth/idp/profile/AbstractProfileAction.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-profile-api/src/main/java/net/shibboleth/idp/profile/AbstractProfileAction.java?rev=8422&r1=8421&r2=8422&view=diff
==============================================================================
--- trunk/idp-profile-api/src/main/java/net/shibboleth/idp/profile/AbstractProfileAction.java (original)
+++ trunk/idp-profile-api/src/main/java/net/shibboleth/idp/profile/AbstractProfileAction.java Thu Sep 22 16:47:39 2016
@@ -25,6 +25,7 @@
import javax.annotation.concurrent.ThreadSafe;
import net.shibboleth.idp.profile.context.SpringRequestContext;
+import net.shibboleth.idp.profile.context.TimerContext;
import net.shibboleth.idp.profile.context.navigate.WebflowRequestContextProfileRequestContextLookup;
import net.shibboleth.utilities.java.support.component.ComponentSupport;
import net.shibboleth.utilities.java.support.logic.Constraint;
@@ -47,34 +48,34 @@
import com.google.common.base.Function;
-//TODO perf metrics
-
/**
* Base class for Spring-aware profile actions.
*
- * This base class takes care of the following:
+ * <p>This base class takes care of the following:
* <ul>
* <li>retrieving the {@link ProfileRequestContext} from the current request environment</li>
- * <li>ensuring the {@link javax.servlet.http.HttpServletRequest} and {@link javax.servlet.http.HttpServletResponse} are
- * available on the {@link ProfileRequestContext}, if they exist</li>
- * <li>tracking performance metrics for the action</li>
+ * <li>populating the SWF {@link RequestContext} into the profile context tree</li>
+ * <li>starting or stopping any timers as instructed by a {@link TimerContext} in the tree</li>
* </ul>
+ * </p>
*
- * Action implementations should override {@link #doExecute(RequestContext, ProfileRequestContext)}.
+ * <p>Action implementations may override {@link #doExecute(RequestContext, ProfileRequestContext)}
+ * if they require SWF functionality, but most should override {@link #doExecute(ProfileRequestContext)}
+ * instead.</p>
*
* @param <InboundMessageType> type of in-bound message
* @param <OutboundMessageType> type of out-bound message
*/
@ThreadSafe
-public abstract class AbstractProfileAction<InboundMessageType, OutboundMessageType>
- extends AbstractConditionalProfileAction<InboundMessageType, OutboundMessageType>
+public abstract class AbstractProfileAction<InboundMessageType,OutboundMessageType>
+ extends AbstractConditionalProfileAction<InboundMessageType,OutboundMessageType>
implements Action, MessageSource, MessageSourceAware {
/** Class logger. */
@Nonnull private final Logger log = LoggerFactory.getLogger(AbstractProfileAction.class);
/** Strategy used to lookup the {@link ProfileRequestContext} from a given WebFlow {@link RequestContext}. */
- @Nonnull private Function<RequestContext, ProfileRequestContext> profileContextLookupStrategy;
+ @Nonnull private Function<RequestContext,ProfileRequestContext> profileContextLookupStrategy;
/** MessageSource injected by Spring, typically the parent ApplicationContext itself. */
@Nonnull private MessageSource messageSource;
@@ -94,7 +95,7 @@
*
* @return lookup strategy
*/
- @Nonnull public Function<RequestContext, ProfileRequestContext> getProfileContextLookupStrategy() {
+ @Nonnull public Function<RequestContext,ProfileRequestContext> getProfileContextLookupStrategy() {
return profileContextLookupStrategy;
}
@@ -116,7 +117,7 @@
@Nonnull public Event execute(@Nonnull final RequestContext springRequestContext) {
ComponentSupport.ifNotInitializedThrowUninitializedComponentException(this);
- final ProfileRequestContext<InboundMessageType, OutboundMessageType> profileRequestContext =
+ final ProfileRequestContext<InboundMessageType,OutboundMessageType> profileRequestContext =
profileContextLookupStrategy.apply(springRequestContext);
if (profileRequestContext == null) {
log.error("{} IdP profile request context is not available", getLogPrefix());
@@ -143,7 +144,7 @@
* @return a Web Flow event produced by the action
*/
@Nonnull protected Event doExecute(@Nonnull final RequestContext springRequestContext,
- @Nonnull final ProfileRequestContext<InboundMessageType, OutboundMessageType> profileRequestContext) {
[... 185 lines stripped ...]
More information about the commits
mailing list