Package org.grails.web.servlet.mvc
Class AbstractTokenResponseHandler
- java.lang.Object
-
- org.grails.web.servlet.mvc.AbstractTokenResponseHandler
-
- All Implemented Interfaces:
TokenResponseHandler
public abstract class AbstractTokenResponseHandler extends java.lang.Object implements TokenResponseHandler
Implements the behavior of wasInvoked in the TokenResponseHandler interface.- Since:
- 1.1
- See Also:
TokenResponseHandler.wasInvoked()
-
-
Field Summary
-
Fields inherited from interface org.grails.web.servlet.mvc.TokenResponseHandler
INVALID_TOKEN_ATTRIBUTE, KEY
-
-
Constructor Summary
Constructors Constructor Description AbstractTokenResponseHandler(boolean valid)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.lang.Object
invalidToken(groovy.lang.Closure callable)
Specify behavior in the event of an invalid token.protected abstract java.lang.Object
invalidTokenInternal(groovy.lang.Closure callable)
boolean
wasInvalidToken()
Return whether the token was invalidboolean
wasInvoked()
Return whether the response handle was invoked.
-
-
-
Method Detail
-
invalidToken
public final java.lang.Object invalidToken(groovy.lang.Closure callable)
Description copied from interface:TokenResponseHandler
Specify behavior in the event of an invalid token.- Specified by:
invalidToken
in interfaceTokenResponseHandler
- Parameters:
callable
- The closure to invoke in the event of an invalid token- Returns:
- A Grails model or null
-
invalidTokenInternal
protected abstract java.lang.Object invalidTokenInternal(groovy.lang.Closure callable)
-
wasInvoked
public boolean wasInvoked()
Description copied from interface:TokenResponseHandler
Return whether the response handle was invoked.- Specified by:
wasInvoked
in interfaceTokenResponseHandler
- Returns:
- true if it was
-
wasInvalidToken
public boolean wasInvalidToken()
Description copied from interface:TokenResponseHandler
Return whether the token was invalid- Specified by:
wasInvalidToken
in interfaceTokenResponseHandler
- Returns:
- true if it was
-
-