Package net.shibboleth.idp.admin.impl
Class OutputMetrics
- All Implemented Interfaces:
Component,DestructableComponent,InitializableComponent,ProfileAction,Aware,MessageSource,MessageSourceAware,Action
Action that outputs one or more
Metric objects.
On success, a 200 HTTP status is returned. On failure, a non-successful HTTP status is returned.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate classMetricFilterthat combines two other filters. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringConstant representing all metrics.private StringValue for Access-Control-Allow-Origin header, if any.private DateTimeFormatterFormatter for date/time fields.private StringName of JSONP callback function, if any.private org.slf4j.LoggerClass logger.static final StringFlow variable indicating ID of metric or group of metrics to output.private com.codahale.metrics.MetricFilterPre-installed filter to apply alongside dynamically derived filter.Map of custom metric groups to filters.private StringMetric ID to operate on.private com.codahale.metrics.MetricRegistryThe metric registry.private booleanConvert date/time fields to default time zone. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoExecute(ProfileRequestContext profileRequestContext) protected voidprotected booleandoPreExecute(ProfileRequestContext profileRequestContext) voidsetAllowedOrigin(String origin) Set the value of the Access-Control-Allow-Origin CORS header, if any.voidsetDateTimeFormat(String format) Set the formatting string to apply when extracting date/time fields.voidsetJSONPCallbackName(String callbackName) Set a JSONP callback function to wrap the result in, if any.voidsetMetricFilter(com.codahale.metrics.MetricFilter filter) Set the external metric filter to apply.voidsetMetricFilterMap(Map<String, com.codahale.metrics.MetricFilter> map) Set the map of custom group names to metric filters.voidsetMetricRegistry(com.codahale.metrics.MetricRegistry registry) Set the registry of metrics.voidsetUseDefaultTimeZone(boolean flag) Convert date/time fields to default time zone.Methods inherited from class net.shibboleth.idp.profile.AbstractProfileAction
doExecute, execute, getBean, getBean, getMessage, getMessage, getMessage, getParameter, getParameter, getProfileContextLookupStrategy, getRequestContext, getResult, setMessageSource, setProfileContextLookupStrategyMethods inherited from class org.opensaml.profile.action.AbstractConditionalProfileAction
getActivationCondition, setActivationConditionMethods inherited from class org.opensaml.profile.action.AbstractProfileAction
doPostExecute, doPostExecute, ensureHttpServletRequest, ensureHttpServletResponse, execute, getHttpServletRequest, getHttpServletRequestSupplier, getHttpServletResponse, getHttpServletResponseSupplier, getLogPrefix, isPreExecuteCalled, setHttpServletRequestSupplier, setHttpServletResponseSupplierMethods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, doDestroy, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException, initialize, isDestroyed, isInitializedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.shibboleth.shared.component.InitializableComponent
initialize, isInitialized
-
Field Details
-
ALL_METRICS
Constant representing all metrics.- See Also:
-
METRIC_ID
Flow variable indicating ID of metric or group of metrics to output.- See Also:
-
log
@Nonnull private org.slf4j.Logger logClass logger. -
metricFilter
@Nullable private com.codahale.metrics.MetricFilter metricFilterPre-installed filter to apply alongside dynamically derived filter. -
metricRegistry
The metric registry. -
allowedOrigin
Value for Access-Control-Allow-Origin header, if any. -
jsonpCallbackName
Name of JSONP callback function, if any. -
dateTimeFormatter
Formatter for date/time fields. -
useDefaultTimeZone
private boolean useDefaultTimeZoneConvert date/time fields to default time zone. -
metricFilterMap
Map of custom metric groups to filters. -
metricId
Metric ID to operate on.
-
-
Constructor Details
-
OutputMetrics
public OutputMetrics()Constructor.
-
-
Method Details
-
setMetricFilter
public void setMetricFilter(@Nullable com.codahale.metrics.MetricFilter filter) Set the external metric filter to apply.- Parameters:
filter- metric filter
-
setMetricRegistry
public void setMetricRegistry(@Nonnull com.codahale.metrics.MetricRegistry registry) Set the registry of metrics.- Parameters:
registry- metric registry
-
setAllowedOrigin
Set the value of the Access-Control-Allow-Origin CORS header, if any.- Parameters:
origin- header value
-
setJSONPCallbackName
Set a JSONP callback function to wrap the result in, if any.- Parameters:
callbackName- callback function name.
-
setDateTimeFormat
Set the formatting string to apply when extracting date/time fields.- Parameters:
format- formatting string
-
setUseDefaultTimeZone
public void setUseDefaultTimeZone(boolean flag) Convert date/time fields to default time zone.- Parameters:
flag- flag to set- Since:
- 4.1.0
-
setMetricFilterMap
Set the map of custom group names to metric filters.- Parameters:
map- group to filter map
-
doInitialize
- Overrides:
doInitializein classAbstractInitializableComponent- Throws:
ComponentInitializationException
-
doPreExecute
- Overrides:
doPreExecutein classAbstractConditionalProfileAction
-
doExecute
- Overrides:
doExecutein classAbstractProfileAction
-