public class PopulateMetricContext extends AbstractProfileAction
MetricContext child of the ProfileRequestContext with
a set of rules for activating timer measurements and counters on associated objects during the execution
of a profile request.
Unlike a more typical "lookup strategy" design used in most other places, the strategy function supplied is free, and indeed expected, to directly manipulate the created child context directly rather than returning the data to use. The function may return false to indicate a lack of success, but this value is merely logged.
EventIds.PROCEED_EVENT_ID| Modifier and Type | Class and Description |
|---|---|
private class |
PopulateMetricContext.NullFunction
Default function to remove the context from the tree when no metrics are installed.
|
| Modifier and Type | Field and Description |
|---|---|
private org.slf4j.Logger |
log
Class logger.
|
private com.google.common.base.Function<ProfileRequestContext,Boolean> |
metricStrategy
Strategy function for establishing metric mappings to apply.
|
| Constructor and Description |
|---|
PopulateMetricContext() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doExecute(ProfileRequestContext profileRequestContext) |
protected void |
doInitialize() |
void |
setMetricStrategy(com.google.common.base.Function<ProfileRequestContext,Boolean> strategy)
Set strategy to establish the metric mappings to use.
|
doPostExecute, doPostExecute, doPreExecute, execute, getHttpServletRequest, getHttpServletResponse, getLogPrefix, setHttpServletRequest, setHttpServletResponsedestroy, doDestroy, initialize, isDestroyed, isInitialized@Nonnull private final org.slf4j.Logger log
@NonnullAfterInit private com.google.common.base.Function<ProfileRequestContext,Boolean> metricStrategy
public void setMetricStrategy(@Nullable com.google.common.base.Function<ProfileRequestContext,Boolean> strategy)
strategy - timer mapping strategyprotected void doInitialize()
throws net.shibboleth.utilities.java.support.component.ComponentInitializationException
doInitialize in class net.shibboleth.utilities.java.support.component.AbstractInitializableComponentnet.shibboleth.utilities.java.support.component.ComponentInitializationExceptionprotected void doExecute(@Nonnull ProfileRequestContext profileRequestContext)
doExecute in class AbstractProfileActionCopyright © 1999–2018 Shibboleth Consortium. All rights reserved.