Package org.opensaml.messaging.context.navigate

# Class MessageLookup<T>

java.lang.Object
org.opensaml.messaging.context.navigate.MessageLookup<T>

Type Parameters:
  `T` - type of message

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

public class MessageLookup<T> extends Object implements ContextDataLookupFunction<MessageContext,T>
A `ContextDataLookupFunction` that returns the message from a `MessageContext`.

## Field Summary

Fields
Modifier and Type
Field
Description
`private final Class<T>`
`messageType`
Child context type to look up.

## Constructor Summary

Constructors
Constructor
Description
`MessageLookup(Class<T> type)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`T`
`apply(MessageContext input)`

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

### messageType

@Nonnull private final Class<T> messageType
Child context type to look up.

## Constructor Details

### MessageLookup

public MessageLookup(@Nonnull @ParameterName(name="type") Class<T> type)
Constructor.

Parameters:
  `type` - message type to look up

## Method Details

### apply

@Nullable public T apply(@Nullable MessageContext input)

Specified by:
  `apply` in interface `Function<MessageContext,T>`