View Javadoc

1   package net.trajano.twiff;
2   
3   /***
4    * Subclass of {@link net.trajano.twiff.TwiffException} when a token is being
5    * requested that is not valid.
6    * 
7    * @author Archimedes Trajano
8    */
9   public class InvalidTokenException extends TwiffException {
10      /***
11       * Construct a new exception specifying the token value.
12       * 
13       * @param token
14       *                   token being requested
15       */
16      public InvalidTokenException(final String token) {
17          super(token);
18          this.token = token;
19      }
20  
21      /***
22       * Token being requested.
23       */
24      private final String token;
25  
26      /***
27       * Returns the token requested
28       * 
29       * @return the token requested.
30       */
31      public final String getRequestedToken() {
32          return token;
33      }
34  }