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

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


            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)
                linkAttribute = new EmptyLinkAttribute(param[0]);

            else
View Full Code Here


    protected SimpleNotObservableWebservice(String servicePath, String initialStatus, long lifetimeSeconds,
                                            ScheduledExecutorService executor) {
        super(servicePath, initialStatus, lifetimeSeconds, executor);

        this.setLinkAttribute(new LongLinkAttribute(LongLinkAttribute.CONTENT_TYPE, ContentFormat.TEXT_PLAIN_UTF8));
        this.setLinkAttribute(new LongLinkAttribute(LongLinkAttribute.CONTENT_TYPE, ContentFormat.APP_XML));
    }
View Full Code Here

        //Set the update interval, i.e. the frequency of resource updates
        this.updateInterval = updateInterval;
        schedulePeriodicResourceUpdate();

        //Sets the link attributes for supported content types ('ct')
        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.LongLinkAttribute

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.