Lines Matching refs:token
81 Token token = (Token) tokens[0];
82 if (token.getTokenType() == INVITE
83 || token.getTokenType() == ACK
84 || token.getTokenType() == OPTIONS
85 || token.getTokenType() == BYE
86 || token.getTokenType() == REGISTER
87 || token.getTokenType() == CANCEL
88 || token.getTokenType() == SUBSCRIBE
89 || token.getTokenType() == NOTIFY
90 || token.getTokenType() == PUBLISH
91 || token.getTokenType() == MESSAGE
92 || token.getTokenType() == ID) {
94 return token.getTokenValue();
105 * Verifies that a given string matches the 'token' production in RFC3261
107 * @param token
112 public static final void checkToken( String token ) throws ParseException {
114 if (token == null || token.length()==0 ) {
115 throw new ParseException("null or empty token", -1 );
117 // JvB: check that it is a valid token
118 for ( int i=0; i<token.length(); ++i ) {
119 if ( !LexerCore.isTokenChar( token.charAt(i) )) {
120 throw new ParseException( "Invalid character(s) in string (not allowed in 'token')", i );
132 * added a method to check strings for valid token characters