public void setWildCard() { this.setWildCardFlag(true); }
/** * Creates a new wildcard ContactHeader. This is used in Register requests * to indicate to the server that it should remove all locations the * at which the user is currently available. This implies that the * following conditions are met: * <ul> * <li><code>ContactHeader.getAddress.getAddress.getUserInfo() == *;</code> * <li><code>ContactHeader.getAddress.getAddress.isWildCard() == true;</code> * <li><code>ContactHeader.getExpires() == 0;</code> * </ul> * * @return the newly created wildcard ContactHeader. */ public ContactHeader createContactHeader() { Contact contact = new Contact(); contact.setWildCardFlag(true); contact.setExpires(0); return contact; }
public SIPHeader parse() throws ParseException { // past the header name and the colon. headerName(TokenTypes.CONTACT); ContactList retval = new ContactList(); while (true) { Contact contact = new Contact(); if (lexer.lookAhead(0) == '*') { final char next = lexer.lookAhead(1); if (next == ' ' || next == '\t' || next == '\r' || next == '\n') { this.lexer.match('*'); contact.setWildCardFlag(true); } else { super.parse(contact); } } else { super.parse(contact); } retval.add(contact); this.lexer.SPorHT(); char la = lexer.lookAhead(0); if (la == ',') { this.lexer.match(','); this.lexer.SPorHT(); } else if (la == '\n' || la == '\0') break; else throw createParseException("unexpected char"); } return retval; }
public SIPHeader parse() throws ParseException { // past the header name and the colon. headerName(TokenTypes.CONTACT); ContactList retval = new ContactList(); while (true) { Contact contact = new Contact(); if (lexer.lookAhead(0) == '*') { final char next = lexer.lookAhead(1); if (next == ' ' || next == '\t' || next == '\r' || next == '\n') { this.lexer.match('*'); contact.setWildCardFlag(true); } else { super.parse(contact); } } else { super.parse(contact); } retval.add(contact); this.lexer.SPorHT(); char la = lexer.lookAhead(0); if (la == ',') { this.lexer.match(','); this.lexer.SPorHT(); } else if (la == '\n' || la == '\0') break; else throw createParseException("unexpected char"); } return retval; }