Package org.restlet.ext.sip

Examples of org.restlet.ext.sip.Subscription


        super(header);
    }

    @Override
    public Subscription readValue() throws IOException {
        Subscription result = null;

        skipSpaces();

        if (peek() != -1) {
            String value = readToken();
            if (value != null) {
                result = new Subscription(value);

                // Read subscription parameters.
                if (skipParameterSeparator()) {
                    Parameter param = readParameter();

                    while (param != null) {
                        if ("reason".equals(param.getName())) {
                            result.setReason(param.getValue());
                        } else if ("expires".equals(param.getName())) {
                            result.setExpires(Long.parseLong(param.getValue()));
                        } else if ("retry-after".equals(param.getName())) {
                            result.setRetryAfter(Long.parseLong(param
                                    .getValue()));
                        } else {
                            result.getParameters().add(param);
                        }

                        if (skipParameterSeparator()) {
                            param = readParameter();
                        } else {
View Full Code Here

TOP

Related Classes of org.restlet.ext.sip.Subscription

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.