Package ch.ethz.inf.vs.californium.network.Exchange

Examples of ch.ethz.inf.vs.californium.network.Exchange.KeyUri


      } else {
        // this endpoint created the Exchange to respond a request
        Request request = exchange.getCurrentRequest();
        if (request != null) {
          // TODO: We can optimize this and only do it, when the request really had blockwise transfer
          KeyUri uriKey = new KeyUri(request.getURI(),
              request.getSource().getAddress(), request.getSourcePort());
//          LOGGER.warning("++++++++++++++++++Remote ongoing completed, cleaning up "+uriKey);
          ongoingExchanges.remove(uriKey);
        }
        // TODO: What if the request is only a block?
View Full Code Here


        response.getDestination().getAddress(), response.getDestinationPort());
    exchangesByMID.put(idByMID, exchange);
   
    if (response.getOptions().hasBlock2()) {
      Request request = exchange.getRequest();
      KeyUri idByUri = new KeyUri(request.getURI(),
          response.getDestination().getAddress(), response.getDestinationPort());
      if (exchange.getResponseBlockStatus()!=null && !response.getOptions().hasObserve()) {
        // Remember ongoing blockwise GET requests
        LOGGER.fine("Ongoing Block2 started, storing "+idByUri + "\nOngoing " + request + "\nOngoing " + response);
        ongoingExchanges.put(idByUri, exchange);
View Full Code Here

        return previous;
      }
     
    } else {
     
      KeyUri idByUri = new KeyUri(request.getURI(),
          request.getSource().getAddress(), request.getSourcePort());
     
      LOGGER.fine("Lookup ongoing exchange for "+idByUri);
      Exchange ongoing = ongoingExchanges.get(idByUri);
      if (ongoing != null) {
View Full Code Here

TOP

Related Classes of ch.ethz.inf.vs.californium.network.Exchange.KeyUri

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.