Package net.shibboleth.idp.saml.profile.impl

# Class SpringAwareMessageDecoderFactory

java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.idp.saml.profile.impl.SpringAwareMessageDecoderFactory

All Implemented Interfaces:
  `Function<String,MessageDecoder>`, `Component`, `DestructableComponent`, `InitializableComponent`, `Aware`, `ApplicationContextAware`

@ThreadSafeAfterInit public class SpringAwareMessageDecoderFactory extends AbstractInitializableComponent implements Function<String,MessageDecoder>, ApplicationContextAware
A function that returns the correct `MessageDecoder` to use based on a simple map of strings to bean IDs.

## Field Summary

Fields
Modifier and Type
Field
Description
`private ApplicationContext`
`applicationContext`
Application context injected by surroundings.
`private Map<String,String>`
`beanMappings`
Map of strings to bean IDs.
`private final org.slf4j.Logger`
`log`
Class logger.

## Constructor Summary

Constructors
Constructor
Description
`SpringAwareMessageDecoderFactory()`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`MessageDecoder`
`apply(String input)`
`void`
`setApplicationContext(ApplicationContext context)`
`void`
`setBeanMappings(Map<String,String> mappings)`
Set mappings of strings to names of `MessageDecoder` beans.

### 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 java.util.function.Function

`andThen, compose`

## Field Details

### log

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

### applicationContext

@Nullable private ApplicationContext applicationContext
Application context injected by surroundings.

### beanMappings

@Nonnull private Map<String,String> beanMappings
Map of strings to bean IDs.

## Constructor Details

### SpringAwareMessageDecoderFactory

public SpringAwareMessageDecoderFactory()
Constructor.

## Method Details

### setBeanMappings

public void setBeanMappings(@Nonnull Map<String,String> mappings)
Set mappings of strings to names of `MessageDecoder` beans.

Parameters:
  `mappings` - string to bean ID mappings

### setApplicationContext

public void setApplicationContext(@Nullable ApplicationContext context)

Specified by:
  `setApplicationContext` in interface `ApplicationContextAware`

### apply

@Nullable public MessageDecoder apply(@Nullable String input)

Specified by:
  `apply` in interface `Function<String,MessageDecoder>`