Class SpringAwareMessageDecoderFactory
- java.lang.Object
-
- net.shibboleth.utilities.java.support.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 correctMessageDecoderto use based on a simple map of strings to bean IDs.
-
-
Field Summary
Fields Modifier and Type Field Description private ApplicationContextapplicationContextApplication context injected by surroundings.private Map<String,String>beanMappingsMap of strings to bean IDs.private org.slf4j.LoggerlogClass logger.
-
Constructor Summary
Constructors Constructor Description SpringAwareMessageDecoderFactory()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MessageDecoderapply(String input)voidsetApplicationContext(ApplicationContext context)voidsetBeanMappings(Map<String,String> mappings)Set mappings of strings to names ofMessageDecoderbeans.-
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
destroy, doDestroy, doInitialize, initialize, isDestroyed, isInitialized
-
-
-
-
Field Detail
-
log
@Nonnull private final org.slf4j.Logger log
Class logger.
-
applicationContext
@Nullable private ApplicationContext applicationContext
Application context injected by surroundings.
-
-
Method Detail
-
setBeanMappings
public void setBeanMappings(@Nonnull Map<String,String> mappings)Set mappings of strings to names ofMessageDecoderbeans.- Parameters:
mappings- string to bean ID mappings
-
setApplicationContext
public void setApplicationContext(@Nullable ApplicationContext context)- Specified by:
setApplicationContextin interfaceApplicationContextAware
-
apply
@Nullable public MessageDecoder apply(@Nullable String input)
- Specified by:
applyin interfaceFunction<String,MessageDecoder>
-
-