Package org.opensaml.messaging.context.navigate

# Class MessageContextLookup<StartContext extends BaseContext>

java.lang.Object
org.opensaml.messaging.context.navigate.MessageContextLookup<StartContext>

Type Parameters:
  `StartContext` - the starting context type

All Implemented Interfaces:
  `Function<StartContext,MessageContext>`, `ContextDataLookupFunction<StartContext,MessageContext>`

public class MessageContextLookup<StartContext extends BaseContext> extends Object implements ContextDataLookupFunction<StartContext,MessageContext>
A lookup function for resolving either the inbound or outbound `MessageContext` relative to a particular `BaseContext`.

This would usually be used in composing other lookup functions.

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static enum`
`MessageContextLookup.Direction`
Used to indicate the target message context.

## Field Summary

Fields
Modifier and Type
Field
Description
`private MessageContextLookup.Direction`
`dir`
The message context to evaluate as the entityContext parent.
`private Function<BaseContext,InOutOperationContext>`
`opContextLookup`
The operation context lookup.

## Constructor Summary

Constructors
Constructor
Description
`MessageContextLookup(MessageContextLookup.Direction direction)`
Constructor.
`MessageContextLookup(MessageContextLookup.Direction direction, Function<BaseContext,InOutOperationContext> lookup)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`MessageContext`
`apply(BaseContext baseContext)`

### 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

### dir

@Nonnull private MessageContextLookup.Direction dir
The message context to evaluate as the entityContext parent.

### opContextLookup

@Nonnull private Function<BaseContext,InOutOperationContext> opContextLookup
The operation context lookup. Defaults to `RecursiveTypedParentContextLookup`.

## Constructor Details

### MessageContextLookup

public MessageContextLookup(@Nonnull @ParameterName(name="direction") MessageContextLookup.Direction direction)
Constructor.

Parameters:
  `direction` - the direction in which to operate.

### MessageContextLookup

public MessageContextLookup(@Nonnull @ParameterName(name="direction") MessageContextLookup.Direction direction, @Nonnull @ParameterName(name="lookup") Function<BaseContext,InOutOperationContext> lookup)
Constructor.

Parameters:
  `direction` - the direction in which to operate.
  `lookup` - the operation context lookup

## Method Details

### apply

public MessageContext apply(@Nullable BaseContext baseContext)

Specified by:
  `apply` in interface `Function<StartContext extends BaseContext,MessageContext>`