TokenResponseHandler (Grails 6.0.0)

Package: org.grails.web.servlet.mvc

## [Java] Interface TokenResponseHandler

-     public interface TokenResponseHandler

  Invokes user code that handles double or invalid submits.

  Authors:
    Graeme Rocher
  Since:
    1.1

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `java.lang.String` | `INVALID_TOKEN_ATTRIBUTE` |
    `java.lang.String` | `KEY` |

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public java.lang.Object` | `invalidToken(groovy.lang.Closure callable)` Specify behavior in the event of an invalid token.
    `` | `public boolean` | `wasInvalidToken()` Return whether the token was invalid
    `` | `public boolean` | `wasInvoked()` Return whether the response handle was invoked.

- - ### Field Detail

    - #### java.lang.String INVALID_TOKEN_ATTRIBUTE

    - #### java.lang.String KEY

  - ### Method Detail

    - #### public java.lang.Object invalidToken(@java.lang.SuppressWarnings("rawtypes") groovy.lang.Closure callable)

      Specify behavior in the event of an invalid token.

      Parameters:
        `callable` - The closure to invoke in the event of an invalid token
      Returns:
        A Grails model or null

    - #### public boolean wasInvalidToken()

      Return whether the token was invalid

      Returns:
        true if it was

    - #### public boolean wasInvoked()

      Return whether the response handle was invoked.

      Returns:
        true if it was