Package net.shibboleth.idp.profile.impl

# Class ReloadServiceConfiguration

java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
org.opensaml.profile.action.AbstractProfileAction
org.opensaml.profile.action.AbstractConditionalProfileAction
net.shibboleth.idp.profile.AbstractProfileAction
net.shibboleth.idp.profile.impl.ReloadServiceConfiguration

All Implemented Interfaces:
  `Component`, `DestructableComponent`, `InitializableComponent`, `ProfileAction`, `Aware`, `MessageSource`, `MessageSourceAware`, `Action`

public class ReloadServiceConfiguration extends AbstractProfileAction
Action that refreshes a `ReloadableService` manually.

With the default strategy, the service to reload is indicated by supplying `SERVICE_ID` as a flow variable.

On success, a 200 HTTP status with a simple response body is returned. On failure, a non-successful HTTP status is returned.

Event:
  `EventIds.PROCEED_EVENT_ID`, `EventIds.INVALID_MESSAGE`, `EventIds.INVALID_PROFILE_CTX`, `EventIds.IO_ERROR`

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`private final class`
`ReloadServiceConfiguration.WebFlowApplicationContextLookupStrategy`
Default strategy locates a bean identified with a flow-scope parameter in the web flow application context.

## Field Summary

Fields
Modifier and Type
Field
Description
`private org.slf4j.Logger`
`log`
Class logger.
`private ReloadableService<?>`
`service`
The service to reload.
`static final String`
`SERVICE_ID`
Flow variable indicating ID of service bean to reload.
`private Function<ProfileRequestContext,ReloadableService<?>>`
`serviceLookupStrategy`
Lookup function to locate service bean to operate on.

## Constructor Summary

Constructors
Constructor
Description
`ReloadServiceConfiguration()`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`protected void`
`doExecute(ProfileRequestContext profileRequestContext)`
`protected boolean`
`doPreExecute(ProfileRequestContext profileRequestContext)`
`void`
`setServiceLookupStrategy(Function<ProfileRequestContext,ReloadableService<?>> strategy)`
Set the lookup strategy for the service object to reload.

### Methods inherited from class net.shibboleth.idp.profile.AbstractProfileAction

`doExecute, execute, getBean, getBean, getMessage, getMessage, getMessage, getParameter, getParameter, getProfileContextLookupStrategy, getRequestContext, getResult, setMessageSource, setProfileContextLookupStrategy`

### Methods inherited from class org.opensaml.profile.action.AbstractConditionalProfileAction

`getActivationCondition, setActivationCondition`

### Methods inherited from class org.opensaml.profile.action.AbstractProfileAction

`doPostExecute, doPostExecute, ensureHttpServletRequest, ensureHttpServletResponse, execute, getHttpServletRequest, getHttpServletRequestSupplier, getHttpServletResponse, getHttpServletResponseSupplier, getLogPrefix, isPreExecuteCalled, setHttpServletRequestSupplier, setHttpServletResponseSupplier`

### Methods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent

`checkComponentActive, checkSetterPreconditions, destroy, doDestroy, doInitialize, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException, initialize, isDestroyed, isInitialized`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface net.shibboleth.shared.component.InitializableComponent

`initialize, isInitialized`

## Field Details

### SERVICE_ID

@Nonnull @NotEmpty public static final String SERVICE_ID
Flow variable indicating ID of service bean to reload.

See Also:
  - Constant Field Values

### log

@Nonnull private org.slf4j.Logger log
Class logger.

### serviceLookupStrategy

@Nonnull private Function<ProfileRequestContext,ReloadableService<?>> serviceLookupStrategy
Lookup function to locate service bean to operate on.

### service

@NonnullBeforeExec private ReloadableService<?> service
The service to reload.

## Constructor Details

### ReloadServiceConfiguration

public ReloadServiceConfiguration()
Constructor.

## Method Details

### setServiceLookupStrategy

public void setServiceLookupStrategy(@Nonnull Function<ProfileRequestContext,ReloadableService<?>> strategy)
Set the lookup strategy for the service object to reload.

Parameters:
  `strategy` - lookup strategy

### doPreExecute

protected boolean doPreExecute(@Nonnull ProfileRequestContext profileRequestContext)

Overrides:
  `doPreExecute` in class `AbstractConditionalProfileAction`

### doExecute

protected void doExecute(@Nonnull ProfileRequestContext profileRequestContext)

Overrides:
  `doExecute` in class `AbstractProfileAction`