Package de.uniluebeck.itm.ncoap.application.server.webservice.linkformat

Examples of de.uniluebeck.itm.ncoap.application.server.webservice.linkformat.StringLinkAttribute


            LinkAttribute linkAttribute;
            int attributeType = LinkAttribute.getAttributeType(param[0]);

            if(attributeType == LinkAttribute.STRING_ATTRIBUTE)
                linkAttribute = new StringLinkAttribute(param[0], param[1]);

            else if(attributeType == LinkAttribute.LONG_ATTRIBUTE)
                linkAttribute = new LongLinkAttribute(param[0], Long.parseLong(param[1]));

            else if(attributeType == LinkAttribute.EMPTY_ATTRIBUTE)
View Full Code Here


        this.setLinkAttribute(new LongLinkAttribute(LongLinkAttribute.CONTENT_TYPE, ContentFormat.TEXT_PLAIN_UTF8));
        this.setLinkAttribute(new LongLinkAttribute(LongLinkAttribute.CONTENT_TYPE, ContentFormat.APP_XML));

        //Sets the link attribute for the resource type ('rt')
        String attributeValue = "The actual UTC time (updated every " + updateInterval + " millis)";
        this.setLinkAttribute(new StringLinkAttribute(StringLinkAttribute.RESOURCE_TYPE, attributeValue));

        //Sets the link attribute for max-size estimation ('sz')
        this.setLinkAttribute(new LongLinkAttribute(LongLinkAttribute.MAX_SIZE_ESTIMATE, 100L));

        //Sets the link attribute for interface description ('if')
        this.setLinkAttribute(new StringLinkAttribute(StringLinkAttribute.INTERFACE, "CoAP GET"));
    }
View Full Code Here

TOP

Related Classes of de.uniluebeck.itm.ncoap.application.server.webservice.linkformat.StringLinkAttribute

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.