Package ch.ethz.inf.vs.californium

Examples of ch.ethz.inf.vs.californium.CoapClient.observe()


   
    CoapClient client = new CoapClient(uri + "/obs");

    System.out.println("===============\nCO01+06");
    System.out.println("---------------\nGET /obs with Observe");
    CoapObserveRelation relation1 = client.observe(
        new CoapHandler() {
          @Override public void onLoad(CoapResponse response) {
            String content = response.getResponseText();
            System.out.println("-CO01----------");
            System.out.println(content);
View Full Code Here


   
    client.setURI(uri + "/obs-non").useNONs();
   
    System.out.println("===============\nCO02+06");
    System.out.println("---------------\nNON-GET /obs-non with Observe");
    CoapObserveRelation relation2 = client.observe(
        new CoapHandler() {
          @Override public void onLoad(CoapResponse response) {
            String content = response.getResponseText();
            System.out.println("-CO02----------");
            System.out.println(content);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.