Class MessageContextLookupFunctionAdaptor<ResultType>
- java.lang.Object
-
- net.shibboleth.oidc.profile.config.navigate.MessageContextLookupFunctionAdaptor<ResultType>
-
- Type Parameters:
ResultType- the result type of the adapted (composed) function
- All Implemented Interfaces:
Function<MessageContext,ResultType>
@ThreadSafe public class MessageContextLookupFunctionAdaptor<ResultType> extends Object implements Function<MessageContext,ResultType>
Adaptor function that allows a profile request context lookup function to work inside a message handler.
-
-
Field Summary
Fields Modifier and Type Field Description private Function<ProfileRequestContext,ResultType>adaptedFunctionThe adapted function.private Function<MessageContext,ProfileRequestContext>profileRequestContextLookupStrategyStrategy used to locate theProfileRequestContextassociated with a givenMessageContext.
-
Constructor Summary
Constructors Constructor Description MessageContextLookupFunctionAdaptor(Function<ProfileRequestContext,ResultType> function)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResultTypeapply(MessageContext messageContext)private Function<MessageContext,ProfileRequestContext>getProfileRequestContextLookupStrategy()Get the profile request context lookup strategy used to adapt the message context.voidsetProfileRequestContextLookupStrategy(Function<MessageContext,ProfileRequestContext> strategy)Set the strategy used to locate theProfileRequestContextassociated with a givenMessageContext.
-
-
-
Field Detail
-
profileRequestContextLookupStrategy
@Nonnull private Function<MessageContext,ProfileRequestContext> profileRequestContextLookupStrategy
Strategy used to locate theProfileRequestContextassociated with a givenMessageContext.
-
adaptedFunction
@Nonnull private final Function<ProfileRequestContext,ResultType> adaptedFunction
The adapted function.
-
-
Constructor Detail
-
MessageContextLookupFunctionAdaptor
public MessageContextLookupFunctionAdaptor(@Nonnull Function<ProfileRequestContext,ResultType> function)Constructor.- Parameters:
function- the composed function that is adapted to work inside a MessageContext input.
-
-
Method Detail
-
setProfileRequestContextLookupStrategy
public void setProfileRequestContextLookupStrategy(@Nonnull Function<MessageContext,ProfileRequestContext> strategy)Set the strategy used to locate theProfileRequestContextassociated with a givenMessageContext.- Parameters:
strategy- lookup strategy
-
getProfileRequestContextLookupStrategy
private Function<MessageContext,ProfileRequestContext> getProfileRequestContextLookupStrategy()
Get the profile request context lookup strategy used to adapt the message context.- Returns:
- the profile request context lookup strategy
-
apply
public ResultType apply(MessageContext messageContext)
- Specified by:
applyin interfaceFunction<MessageContext,ResultType>
-
-