public class OutputMetrics
extends net.shibboleth.idp.profile.AbstractProfileAction
Metric objects.
On success, a 200 HTTP status is returned. On failure, a non-successful HTTP status is returned.
EventIds.PROCEED_EVENT_ID, EventIds.INVALID_PROFILE_CTX, EventIds.IO_ERROR| Modifier and Type | Class and Description |
|---|---|
private class |
OutputMetrics.ChainedMetricFilter
MetricFilter that combines two other filters. |
| Modifier and Type | Field and Description |
|---|---|
static String |
ALL_METRICS
Constant representing all metrics.
|
private String |
allowedOrigin
Value for Access-Control-Allow-Origin header, if any.
|
private String |
dateTimeFormat
Formatting string for
DateTime fields. |
static String |
DEFAULT_DT_FORMAT
Default date/time format string.
|
private String |
jsonpCallbackName
Name of JSONP callback function, if any.
|
private org.slf4j.Logger |
log
Class logger.
|
static String |
METRIC_ID
Flow variable indicating ID of metric or group of metrics to output.
|
private com.codahale.metrics.MetricFilter |
metricFilter
Pre-installed filter to apply alongside dynamically derived filter.
|
private Map<String,com.codahale.metrics.MetricFilter> |
metricFilterMap
Map of custom metric groups to filters.
|
private String |
metricId
Metric ID to operate on.
|
private com.codahale.metrics.MetricRegistry |
metricRegistry
The metric registry.
|
| Constructor and Description |
|---|
OutputMetrics()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
doExecute(org.opensaml.profile.context.ProfileRequestContext profileRequestContext) |
protected void |
doInitialize() |
protected boolean |
doPreExecute(org.opensaml.profile.context.ProfileRequestContext profileRequestContext) |
void |
setAllowedOrigin(String origin)
Set the value of the Access-Control-Allow-Origin CORS header, if any.
|
void |
setDateTimeFormat(String format)
|
void |
setJSONPCallbackName(String callbackName)
Set a JSONP callback function to wrap the result in, if any.
|
void |
setMetricFilter(com.codahale.metrics.MetricFilter filter)
Set the external metric filter to apply.
|
void |
setMetricFilterMap(Map<String,com.codahale.metrics.MetricFilter> map)
Set the map of custom group names to metric filters.
|
void |
setMetricRegistry(com.codahale.metrics.MetricRegistry registry)
Set the registry of metrics.
|
doExecute, execute, getMessage, getMessage, getMessage, getProfileContextLookupStrategy, getRequestContext, getResult, setMessageSource, setProfileContextLookupStrategygetActivationCondition, setActivationConditiondoPostExecute, doPostExecute, execute, getHttpServletRequest, getHttpServletResponse, getLogPrefix, setHttpServletRequest, setHttpServletResponsedestroy, doDestroy, initialize, isDestroyed, isInitializedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinitialize, isInitialized@Nonnull @NotEmpty public static final String ALL_METRICS
@Nonnull @NotEmpty public static final String METRIC_ID
@Nonnull @NotEmpty public static final String DEFAULT_DT_FORMAT
@Nonnull private org.slf4j.Logger log
@Nullable private com.codahale.metrics.MetricFilter metricFilter
@NonnullAfterInit private com.codahale.metrics.MetricRegistry metricRegistry
@Nullable private String allowedOrigin
@Nullable private String jsonpCallbackName
@Nonnull @NonnullElements private Map<String,com.codahale.metrics.MetricFilter> metricFilterMap
public void setMetricFilter(@Nullable com.codahale.metrics.MetricFilter filter)
filter - metric filterpublic void setMetricRegistry(@Nonnull com.codahale.metrics.MetricRegistry registry)
registry - metric registrypublic void setAllowedOrigin(@Nullable String origin)
origin - header valuepublic void setJSONPCallbackName(@Nullable String callbackName)
callbackName - callback function name.public void setDateTimeFormat(@Nullable@NotEmpty String format)
format - formatting stringpublic void setMetricFilterMap(@Nonnull@NonnullElements Map<String,com.codahale.metrics.MetricFilter> map)
map - group to filter mapprotected void doInitialize()
throws ComponentInitializationException
doInitialize in class AbstractInitializableComponentComponentInitializationExceptionprotected boolean doPreExecute(org.opensaml.profile.context.ProfileRequestContext profileRequestContext)
doPreExecute in class org.opensaml.profile.action.AbstractConditionalProfileActionprotected void doExecute(org.opensaml.profile.context.ProfileRequestContext profileRequestContext)
doExecute in class org.opensaml.profile.action.AbstractProfileActionCopyright © 1999–2017 Shibboleth Consortium. All rights reserved.