Package org.opensaml.profile.action.impl

# Class DecodeMessage

java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
org.opensaml.profile.action.AbstractProfileAction
org.opensaml.profile.action.impl.DecodeMessage

All Implemented Interfaces:
  `Component`, `DestructableComponent`, `InitializableComponent`, `ProfileAction`

public class DecodeMessage extends AbstractProfileAction
Action that decodes an incoming request into a `MessageContext`.

Event:
  `EventIds.PROCEED_EVENT_ID`, `EventIds.UNABLE_TO_DECODE`, `EventIds.INVALID_MESSAGE`
Postcondition:
  If decode succeeds, ProfileRequestContext.getInboundMessageContext() != null, The injected `MessageDecoder` is destroyed.

## Field Summary

Fields
Modifier and Type
Field
Description
`private final MessageDecoder`
`decoder`
The `MessageDecoder` instance used to decode the incoming message.
`private final org.slf4j.Logger`
`log`
Class logger.
`private Class<?>`
`messageType`
Optional message type to enforce.

## Constructor Summary

Constructors
Constructor
Description
`DecodeMessage(MessageDecoder messageDecoder)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`protected void`
`doExecute(ProfileRequestContext profileRequestContext)`
Performs this action.
`void`
`setMessageType(Class<?> type)`
Set a message type to enforce after decoding.

### Methods inherited from class org.opensaml.profile.action.AbstractProfileAction

`doPostExecute, doPostExecute, doPreExecute, ensureHttpServletRequest, ensureHttpServletResponse, execute, getHttpServletRequest, getHttpServletRequestSupplier, getHttpServletResponse, getHttpServletResponseSupplier, getLogPrefix, isPreExecuteCalled, setHttpServletRequestSupplier, setHttpServletResponseSupplier`

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

## Field Details

### log

@Nonnull private final org.slf4j.Logger log
Class logger.

### decoder

@Nonnull private final MessageDecoder decoder
The `MessageDecoder` instance used to decode the incoming message.

### messageType

@Nullable private Class<?> messageType
Optional message type to enforce.

## Constructor Details

### DecodeMessage

public DecodeMessage(@Nonnull MessageDecoder messageDecoder)
Constructor.

Parameters:
  `messageDecoder` - the `MessageDecoder` used for the incoming request

## Method Details

### setMessageType

public void setMessageType(@Nullable Class<?> type)
Set a message type to enforce after decoding.

Parameters:
  `type` - message type
Since:
  5.1.0

### doExecute

protected void doExecute(@Nonnull ProfileRequestContext profileRequestContext)
Performs this action. Actions must override this method to perform their work.

Overrides:
  `doExecute` in class `AbstractProfileAction`
Parameters:
  `profileRequestContext` - the current IdP profile request context