Package org.opensaml.messaging.handler.impl

# Class BasicMessageHandlerChain

java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
org.opensaml.messaging.handler.AbstractMessageHandler
org.opensaml.messaging.handler.impl.BasicMessageHandlerChain

All Implemented Interfaces:
  `Component`, `DestructableComponent`, `InitializableComponent`, `MessageHandler`, `MessageHandlerChain`

public class BasicMessageHandlerChain extends AbstractMessageHandler implements MessageHandlerChain
A basic implementation of `MessageHandlerChain`.

## Field Summary

Fields
Modifier and Type
Field
Description
`private List<MessageHandler>`
`members`
The list of members of the handler chain.

## Constructor Summary

Constructors
Constructor
Description
`BasicMessageHandlerChain()`

## Method Summary

Modifier and Type
Method
Description
`void`
`doInvoke(MessageContext msgContext)`
Performs the handler logic.
`List<MessageHandler>`
`getHandlers()`
Get the ordered list of message handlers which comprise the handler chain.
`void`
`setHandlers(List<MessageHandler> handlers)`
Set the list of message handler chain members.

### Methods inherited from class org.opensaml.messaging.handler.AbstractMessageHandler

`doPostInvoke, doPostInvoke, doPreInvoke, getActivationCondition, getLogPrefix, invoke, isPreInvokeCalled, setActivationCondition`

### Methods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent

`checkComponentActive, checkSetterPreconditions, destroy, doDestroy, doInitialize, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException, initialize, isDestroyed, isInitialized`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface net.shibboleth.shared.component.InitializableComponent

`initialize, isInitialized`

### Methods inherited from interface org.opensaml.messaging.handler.MessageHandler

`invoke`

## Field Details

### members

@NonnullAfterInit private List<MessageHandler> members
The list of members of the handler chain.

## Constructor Details

### BasicMessageHandlerChain

public BasicMessageHandlerChain()

## Method Details

### getHandlers

@NonnullAfterInit @Unmodifiable @NotLive public List<MessageHandler> getHandlers()
Get the ordered list of message handlers which comprise the handler chain.

The returned list is immutable. Changes to the list should be accomplished through `setHandlers(List)`.

Specified by:
  `getHandlers` in interface `MessageHandlerChain`
Returns:
  the list of members of the handler chain

### setHandlers

public void setHandlers(@Nullable List<MessageHandler> handlers)
Set the list of message handler chain members.

The supplied list is copied before being stored. Later modifications to the originally supplied list will not be reflected in the handler chain membership.

Parameters:
  `handlers` - the list of message handler members

### doInvoke

public void doInvoke(@Nonnull MessageContext msgContext) throws MessageHandlerException
Performs the handler logic.

Specified by:
  `doInvoke` in class `AbstractMessageHandler`
Parameters:
  `msgContext` - the message context on which to invoke the handler
Throws:
  `MessageHandlerException` - if there is an error invoking the handler on the message context