Package gov.nist.javax.sip.address

Examples of gov.nist.javax.sip.address.GenericURI


            return;
        String method = requestLine.getMethod();
        // The requestLine may be malformed!
        if (method == null)
            return;
        GenericURI u = requestLine.getUri();
        if (u == null)
            return;
        if (method.compareTo(Request.REGISTER) == 0 || method.compareTo(Request.INVITE) == 0) {
            if (u instanceof SipUri) {
                SipUri sipUri = (SipUri) u;
View Full Code Here


        Object val = getParameterValue(parameterName);
        if (val instanceof GenericURI)
            return (GenericURI) val;
        else {
            try {
                return new GenericURI((String) val);
            } catch (ParseException ex) {
                //catch ( URISyntaxException ex) {
                return null;
            }
        }
View Full Code Here

     * @throws ParseException if there was a problem parsing.
     */
    public GenericURI uriReference( boolean inBrackets ) throws ParseException {
        if (debug)
            dbg_enter("uriReference");
        GenericURI retval = null;
        Token[] tokens = lexer.peekNextToken(2);
        Token t1 = (Token) tokens[0];
        Token t2 = (Token) tokens[1];
        try {

            if (t1.getTokenType() == TokenTypes.SIP ||
                    t1.getTokenType() == TokenTypes.SIPS) {
                if (t2.getTokenType() == ':')
                    retval = sipURL( inBrackets );
                else
                    throw createParseException("Expecting \':\'");
            } else if (t1.getTokenType() == TokenTypes.TEL) {
                if (t2.getTokenType() == ':') {
                    retval = telURL( inBrackets );
                } else
                    throw createParseException("Expecting \':\'");
            } else {
                String urlString = uricString();
                try {
                    retval = new GenericURI(urlString);
                } catch (ParseException ex) {
                    throw createParseException(ex.getMessage());
                }
            }
        } finally {
View Full Code Here

        for ( int i = 0; i < test.length; i++)
        {
            URLParser p  = new URLParser(test[i]);

                GenericURI uri = p.parse();
                System.out.println("uri type returned " + uri.getClass().getName());
                System.out.println(test[i] + " is SipUri? " + uri.isSipURI()
                        + ">" + uri.encode());
        }
    }
View Full Code Here

            while ( (lexer.lookAhead(0) != '\n') && (lineCount < 20) ) {
                do {
                  AlertInfo alertInfo = new AlertInfo();
                    alertInfo.setHeaderName(SIPHeaderNames.ALERT_INFO);
                    URLParser urlParser;
                    GenericURI uri;
                  this.lexer.SPorHT();
                  if (this.lexer.lookAhead(0) == '<') {
                      this.lexer.match('<');
                      urlParser = new URLParser((Lexer) this.lexer);
                      uri = urlParser.uriReference( true );
View Full Code Here

   * @throws ParseException if there was a problem parsing.
   */
  public GenericURI uriReference() throws ParseException {
    if (debug)
      dbg_enter("uriReference");
    GenericURI retval = null;
    Token[] tokens = lexer.peekNextToken(2);
    Token t1 = (Token) tokens[0];
    Token t2 = (Token) tokens[1];
    try {

      if (t1.getTokenType() == TokenTypes.SIP ||
          t1.getTokenType() == TokenTypes.SIPS  ) {
        if (t2.getTokenType() == ':')
          retval = sipURL();
        else
          throw createParseException("Expecting \':\'");
      } else if (t1.getTokenType() == TokenTypes.TEL) {
        if (t2.getTokenType() == ':') {
          retval = telURL();
        } else
          throw createParseException("Expecting \':\'");
      } else {
        String urlString = uricString();
        try {
          retval = new GenericURI(urlString);
        } catch (ParseException ex) {
          throw createParseException(ex.getMessage());
        }
      }
    } finally {
View Full Code Here

   
    for ( int i = 0; i < test.length; i++)
    {
      URLParser p  = new URLParser(test[i]);

        GenericURI uri = p.parse();
        System.out.println("uri type returned " + uri.getClass().getName());
        System.out.println(test[i] + " is SipUri? " + uri.isSipURI()
             + ">" + uri.encode());
    }
  }
View Full Code Here

        Object val = getParameterValue(parameterName);
        if (val instanceof GenericURI)
            return (GenericURI) val;
        else {
            try {
                return new GenericURI((String) val);
            } catch (ParseException ex) {
                //catch ( URISyntaxException ex) {
                return null;
            }
        }
View Full Code Here

            return;
        String method = requestLine.getMethod();
        // The requestLine may be malformed!
        if (method == null)
            return;
        GenericURI u = requestLine.getUri();
        if (u == null)
            return;
        if (method.compareTo(Request.REGISTER) == 0 || method.compareTo(Request.INVITE) == 0) {
            if (u instanceof SipUri) {
                SipUri sipUri = (SipUri) u;
View Full Code Here

        Object val = getParameterValue(parameterName);
        if (val instanceof GenericURI)
            return (GenericURI) val;
        else {
            try {
                return new GenericURI((String) val);
            } catch (ParseException ex) {
                //catch ( URISyntaxException ex) {
                return null;
            }
        }
View Full Code Here

TOP

Related Classes of gov.nist.javax.sip.address.GenericURI

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.