Package ch.ethz.inf.vs.californium.observe

Examples of ch.ethz.inf.vs.californium.observe.ObservingEndpoint


    if (request.getOptions().hasObserve() && resource.isObservable()) {
     
      if (request.getOptions().getObserve()==0) {
        // Requests wants to observe and resource allows it :-)
        LOGGER.info("Initiate an observe relation between " + request.getSource() + ":" + request.getSourcePort() + " and resource " + resource.getURI());
        ObservingEndpoint remote = observeManager.findObservingEndpoint(source);
        ObserveRelation relation = new ObserveRelation(remote, resource, exchange);
        remote.addObserveRelation(relation);
        exchange.setRelation(relation);
        // all that's left is to add the relation to the resource which
        // the resource must do itself if the response is successful
      } else if (request.getOptions().getObserve()==1) {
        ObserveRelation relation = observeManager.getRelation(source, request.getToken());
View Full Code Here

TOP

Related Classes of ch.ethz.inf.vs.californium.observe.ObservingEndpoint

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.