Package ch.ethz.inf.vs.californium.coap.CoAP

Examples of ch.ethz.inf.vs.californium.coap.CoAP.ResponseCode


    LinkAttribute attr;
    String endpointIdentifier = "";
    String domain = NetworkConfig.getStandard().getString("RD_DEFAULT_DOMAIN");
    RDNodeResource resource = null;
   
    ResponseCode responseCode;
   
    List<String> query = exchange.getRequestOptions().getURIQueries();
    for (String q:query) {
      // FIXME Do not use Link attributes for URI template variables
      attr = LinkAttribute.parse(q);
View Full Code Here


    if (!enabled) {
      return;
    }

    // only the response with success codes should be cached
    ResponseCode code = response.getCode();
    if (ResponseCode.isSuccess(code)) {
      // get the request
//      Request request = response.getRequest();
      CacheKey cacheKey = null;
      try {
View Full Code Here

    if (incomingResponse == null) {
      throw new IllegalArgumentException("incomingResponse == null");
    }

    // get the status
    ResponseCode status = incomingResponse.getCode();

    // create the response
    Response outgoingResponse = new Response(status);

    // copy payload
View Full Code Here

      throw new IllegalArgumentException("coapRequest == null");
    }

    // get/set the response code
    int httpCode = httpResponse.getStatusLine().getStatusCode();
    ResponseCode coapCode;
    Code coapMethod = coapRequest.getCode();

    // the code 204-"no content" should be managed
    // separately because it can be mapped to different coap codes
    // depending on the request that has originated the response
View Full Code Here

    if (httpResponse == null) {
      throw new IllegalArgumentException("httpResponse == null");
    }

    // get/set the response code
    ResponseCode coapCode = coapResponse.getCode();
    String httpCodeString = HTTP_TRANSLATION_PROPERTIES.getProperty(KEY_COAP_CODE + coapCode.value);

    if (httpCodeString == null || httpCodeString.isEmpty()) {
      LOGGER.warning("httpCodeString == null");
      throw new TranslationException("httpCodeString == null");
View Full Code Here

TOP

Related Classes of ch.ethz.inf.vs.californium.coap.CoAP.ResponseCode

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.