Package net.shibboleth.profile.spring.impl

# Class OpenSAMLConfigBean

java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.profile.spring.impl.OpenSAMLConfigBean

All Implemented Interfaces:
  `Component`, `DestructableComponent`, `InitializableComponent`, `Aware`, `EnvironmentAware`

public class OpenSAMLConfigBean extends AbstractInitializableComponent implements EnvironmentAware
A simple bean that may be used with Spring to initialize the OpenSAML library with injected instances of some critical objects.

## Field Summary

Fields
Modifier and Type
Field
Description
`private Map<String,Class<? extends BaseContext>>`
`contextLookAsideMap`
Optional map of renamed classes for string-based context navigation.
`private ParserPool`
`decryptionParserPool`
Optional decryption `ParserPool` to configure.
`private static final String`
`JAXP_FEATURE_DEFER_NODE_EXPANSION`
JAXP feature name for defer-node-expansion.
`private final org.slf4j.Logger`
`log`
Class logger.
`private com.codahale.metrics.MetricRegistry`
`metricRegistry`
Optional `MetricRegistry` to configure.
`private ParserPool`
`parserPool`
Optional `ParserPool` to configure.
`private Environment`
`springEnvironment`
The Spring environment instance.

## Constructor Summary

Constructors
Constructor
Description
`OpenSAMLConfigBean()`

## Method Summary

Modifier and Type
Method
Description
`private void`
`checkDecryptionParserPool(ParserPool parser)`
Check the supplied decryption parser pool for requirements.
`protected void`
`doInitialize()`
`ParserPool`
`getDecryptionParserPool()`
Get the global decryption `ParserPool` to configure.
`com.codahale.metrics.MetricRegistry`
`getMetricRegistry()`
Get the global `MetricRegistry` to configure.
`ParserPool`
`getParserPool()`
Get the global `ParserPool` to configure.
`void`
`setContextLookAsideMap(Map<String,Class<? extends BaseContext>> map)`
Set the global map of relocated context classes.
`void`
`setDecryptionParserPool(ParserPool newParserPool)`
Set the global decryption `ParserPool` to configure.
`void`
`setEnvironment(Environment environment)`
`void`
`setMetricRegistry(com.codahale.metrics.MetricRegistry registry)`
Set the global `MetricRegistry` to configure.
`void`
`setParserPool(ParserPool newParserPool)`
Set the global `ParserPool` to configure.

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

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

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

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

## Field Details

### JAXP_FEATURE_DEFER_NODE_EXPANSION

private static final String JAXP_FEATURE_DEFER_NODE_EXPANSION
JAXP feature name for defer-node-expansion.

See Also:
  - Constant Field Values

### log

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

### springEnvironment

@Nullable private Environment springEnvironment
The Spring environment instance.

### parserPool

@Nullable private ParserPool parserPool
Optional `ParserPool` to configure.

### decryptionParserPool

@Nullable private ParserPool decryptionParserPool
Optional decryption `ParserPool` to configure.

### metricRegistry

@Nullable private com.codahale.metrics.MetricRegistry metricRegistry
Optional `MetricRegistry` to configure.

### contextLookAsideMap

@Nullable private Map<String,Class<? extends BaseContext>> contextLookAsideMap
Optional map of renamed classes for string-based context navigation.

## Constructor Details

### OpenSAMLConfigBean

public OpenSAMLConfigBean()

## Method Details

### setEnvironment

public void setEnvironment(@Nullable Environment environment)

Specified by:
  `setEnvironment` in interface `EnvironmentAware`

### getParserPool

@Nullable public ParserPool getParserPool()
Get the global `ParserPool` to configure.

Returns:
  the parser pool

### setParserPool

public void setParserPool(@Nullable ParserPool newParserPool)
Set the global `ParserPool` to configure.

Parameters:
  `newParserPool` - the parser pool to set

### getDecryptionParserPool

@Nullable public ParserPool getDecryptionParserPool()
Get the global decryption `ParserPool` to configure.

Returns:
  the decryption parser pool

### setDecryptionParserPool

public void setDecryptionParserPool(@Nullable ParserPool newParserPool)
Set the global decryption `ParserPool` to configure.

Parameters:
  `newParserPool` - the decryption parser pool to set

### getMetricRegistry

@Nullable public com.codahale.metrics.MetricRegistry getMetricRegistry()
Get the global `MetricRegistry` to configure.

Returns:
  the metric registry to use
Since:
  3.3.0

### setMetricRegistry

public void setMetricRegistry(@Nullable com.codahale.metrics.MetricRegistry registry)
Set the global `MetricRegistry` to configure.

Parameters:
  `registry` - the metric registry to use
Since:
  3.3.0

### setContextLookAsideMap

public void setContextLookAsideMap(@Nullable Map<String,Class<? extends BaseContext>> map)
Set the global map of relocated context classes.

Parameters:
  `map` - map of relocated context classes
Since:
  5.0.0

### doInitialize

protected void doInitialize() throws ComponentInitializationException

Overrides:
  `doInitialize` in class `AbstractInitializableComponent`
Throws:
  `ComponentInitializationException`

### checkDecryptionParserPool

private void checkDecryptionParserPool(@Nonnull ParserPool parser)
Check the supplied decryption parser pool for requirements.

Parameters:
  `parser` - the parser pool instance to check