/** * Set a Token that is in play for this request. * * @param tokenClass The token type. * @param <T> The type of token. * @return The token instance. */ public <T extends Token> T getToken(Class<T> tokenClass) { return tokens.getInstance(tokenClass); }
/** * Set a Token that is in play for this request. * * @param tokenClass The token type. * @param token The token instance. * @param <T> The type of token. */ public <T extends Token> void setToken(Class<T> tokenClass, T token) { tokens.putInstance(tokenClass, token); }