org.apache.struts2.interceptor

## Class MessageStorePreResultListener

- java.lang.Object
- - org.apache.struts2.interceptor.MessageStorePreResultListener

- All Implemented Interfaces:
    PreResultListener

      public class MessageStorePreResultListener
      extends Object
      implements PreResultListener

  This listener is used by `MessageStoreInterceptor` to store messages in HttpSession just before result will be executed. It must be done that way as after result will be executed HttpSession cannot be modified (response was already sent to browser).

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected MessageStoreInterceptor` | `interceptor`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MessageStorePreResultListener()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `beforeResult(ActionInvocation invocation, String resultCode)` This callback method will be called after the `Action` execution and before the `Result` execution.
    `void` | `init(MessageStoreInterceptor interceptor)`
    `protected boolean` | `isCommitted()`
    `protected boolean` | `isInvalidated()`
    `protected boolean` | `isRedirect(ActionInvocation invocation, String resultCode)`

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

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

- - ### Field Detail

    - #### interceptor

          protected MessageStoreInterceptor interceptor

  - ### Constructor Detail

    - #### MessageStorePreResultListener

          public MessageStorePreResultListener()

  - ### Method Detail

    - #### init

          public void init(MessageStoreInterceptor interceptor)

    - #### beforeResult

          public void beforeResult(ActionInvocation invocation,
                          String resultCode)

      Description copied from interface: `PreResultListener`
      This callback method will be called after the `Action` execution and before the `Result` execution.
      Specified by:
        `beforeResult` in interface `PreResultListener`
      Parameters:
        `invocation` - the action invocation
        `resultCode` - the result code returned by the action (eg. `success`).

    - #### isCommitted

          protected boolean isCommitted()

    - #### isInvalidated

          protected boolean isInvalidated()

    - #### isRedirect

          protected boolean isRedirect(ActionInvocation invocation,
                           String resultCode)

Copyright © 2000–2021 Apache Software Foundation. All rights reserved.