Package net.shibboleth.profile.context.logic.messaging

# Class AbstractRelyingPartyPredicate

java.lang.Object
net.shibboleth.profile.context.logic.messaging.AbstractRelyingPartyPredicate

All Implemented Interfaces:
  `Predicate<MessageContext>`

Direct Known Subclasses:
  `ClientTLSArtifactRequestsPredicate`, `ClientTLSSOAPAttributeQueriesPredicate`, `ClientTLSSOAPLogoutRequestsPredicate`, `SignArtifactRequestsPredicate`, `SignSOAPAttributeQueriesPredicate`, `SignSOAPLogoutRequestsPredicate`

public abstract class AbstractRelyingPartyPredicate extends Object implements Predicate<MessageContext>
Abstract base class for a predicate that evaluates a `MessageContext` and which requires a `RelyingPartyContext` obtained via a lookup function, by default a child of the `InOutOperationContext` the parent of the specified `MessageContext`.

## Field Summary

Fields
Modifier and Type
Field
Description
`private Function<MessageContext,RelyingPartyContext>`
`relyingPartyContextLookupStrategy`
Strategy used to locate the `RelyingPartyContext` associated with a given `MessageContext`.

## Constructor Summary

Constructors
Constructor
Description
`AbstractRelyingPartyPredicate()`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`protected RelyingPartyContext`
`getRelyingPartyContext(MessageContext input)`
Return the result of applying the lookup function to obtain the `RelyingPartyContext`.
`Function<MessageContext,RelyingPartyContext>`
`getRelyingPartyContextLookupStrategy()`
Get the strategy used to locate the `RelyingPartyContext` associated with a given `MessageContext`.
`void`
`setRelyingPartyContextLookupStrategy(Function<MessageContext,RelyingPartyContext> strategy)`
Set the strategy used to locate the `RelyingPartyContext` associated with a given `MessageContext`.

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

`and, negate, or, test`

## Field Details

### relyingPartyContextLookupStrategy

@Nonnull private Function<MessageContext,RelyingPartyContext> relyingPartyContextLookupStrategy
Strategy used to locate the `RelyingPartyContext` associated with a given `MessageContext`.

## Constructor Details

### AbstractRelyingPartyPredicate

public AbstractRelyingPartyPredicate()
Constructor.

## Method Details

### setRelyingPartyContextLookupStrategy

public void setRelyingPartyContextLookupStrategy(@Nonnull Function<MessageContext,RelyingPartyContext> strategy)
Set the strategy used to locate the `RelyingPartyContext` associated with a given `MessageContext`.

Parameters:
  `strategy` - lookup strategy

### getRelyingPartyContextLookupStrategy

@Nonnull public Function<MessageContext,RelyingPartyContext> getRelyingPartyContextLookupStrategy()
Get the strategy used to locate the `RelyingPartyContext` associated with a given `MessageContext`.

Returns:
  lookup strategy

### getRelyingPartyContext

@Nullable protected RelyingPartyContext getRelyingPartyContext(@Nullable MessageContext input)
Return the result of applying the lookup function to obtain the `RelyingPartyContext`.

Parameters:
  `input` - message context
Returns:
  the `RelyingPartyContext` or null