Class RecursiveTypedParentContextLookup<StartContext extends BaseContext,ParentContext extends BaseContext>
- java.lang.Object
-
- org.opensaml.messaging.context.navigate.RecursiveTypedParentContextLookup<StartContext,ParentContext>
-
- Type Parameters:
StartContext- type of starting contextParentContext- type of the parent context
- All Implemented Interfaces:
Function<StartContext,ParentContext>,ContextDataLookupFunction<StartContext,ParentContext>
public class RecursiveTypedParentContextLookup<StartContext extends BaseContext,ParentContext extends BaseContext> extends Object implements ContextDataLookupFunction<StartContext,ParentContext>
AContextDataLookupFunctionthat recurses up the parent chain of the input viaBaseContext.getParent(), and returns the first parent context that is an instance of the specified type.
-
-
Field Summary
Fields Modifier and Type Field Description private Class<ParentContext>parentClassThe target parent class.
-
Constructor Summary
Constructors Constructor Description RecursiveTypedParentContextLookup(Class<ParentContext> targetClass)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ParentContextapply(StartContext input)
-
-
-
Field Detail
-
parentClass
@Nonnull private Class<ParentContext extends BaseContext> parentClass
The target parent class.
-
-
Constructor Detail
-
RecursiveTypedParentContextLookup
public RecursiveTypedParentContextLookup(@Nonnull @ParameterName(name="targetClass") Class<ParentContext> targetClass)Constructor.- Parameters:
targetClass- the target parent class
-
-
Method Detail
-
apply
@Nullable public ParentContext apply(@Nullable StartContext input)
- Specified by:
applyin interfaceFunction<StartContext extends BaseContext,ParentContext extends BaseContext>
-
-