Examples of ResponseCode


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

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

    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

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

    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

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

      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

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

    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

Examples of com.alibaba.rocketmq.remoting.protocol.RemotingProtos.ResponseCode

        }
    }


    public static String responseCode2String(final int code) {
        ResponseCode rc = ResponseCode.valueOf(code);
        if (rc != null) {
            return rc.toString();
        }

        MQResponseCode mrc = MQResponseCode.valueOf(code);
        if (mrc != null) {
            return mrc.toString();
View Full Code Here

Examples of com.betfair.cougar.api.ResponseCode

        super(faultUnMarshaller);
    }

    public Exception convert(final InputStream inputStream, final ExceptionFactory exceptionFactory, final int httpStatusCode) {
        CougarFault fault = getFaultFromInputStream(inputStream);
        ResponseCode responseCode = ResponseCodeMapper.getResponseCodeFromHttpCode(httpStatusCode, fault);
        return exceptionFactory.parseException(responseCode, fault.getErrorCode(),
                fault.getFaultCode() + " fault received from remote server: "+ ServerFaultCode.getByDetailCode(fault.getErrorCode()), fault.getDetail().getFaultMessages());
  }
View Full Code Here

Examples of com.betfair.cougar.api.ResponseCode

        super(faultUnMarshaller);
    }

    public Exception convert(final InputStream inputStream, final ExceptionFactory exceptionFactory, final int httpStatusCode) {
        CougarFault fault = getFaultFromInputStream(inputStream);
        ResponseCode responseCode = ResponseCodeMapper.getResponseCodeFromHttpCode(httpStatusCode, fault);
        return exceptionFactory.parseException(responseCode, fault.getErrorCode(),
                fault.getFaultCode() + " fault received from remote server: "+ ServerFaultCode.getByDetailCode(fault.getErrorCode()), fault.getDetail().getFaultMessages());
  }
View Full Code Here

Examples of com.betfair.cougar.api.ResponseCode

    @KPITimedEvent(value = "Baseline.service.testException", catchFailures = true)
    @Override
    public SimpleResponse testException(RequestContext ctx, String responseCode, String message, TimeConstraints timeConstraints) throws SimpleException, WotsitException {
        ctx.trace("Starting exception thrower with message %s", message);
        ResponseCode response;
        try {
            response = ResponseCode.valueOf(responseCode);
        }
        catch (IllegalArgumentException e) {
            response = ResponseCode.InternalError;
View Full Code Here

Examples of com.betfair.cougar.api.ResponseCode

    @KPITimedEvent(value = "Baseline.service.testException", catchFailures = true)
    @Override
    public SimpleResponse testException(RequestContext ctx, String responseCode, String message, TimeConstraints timeConstraints) throws SimpleException, WotsitException {
        ctx.trace("Starting exception thrower with message %s", message);
        ResponseCode response;
        try {
            response = ResponseCode.valueOf(responseCode);
        }
        catch (IllegalArgumentException e) {
            response = ResponseCode.InternalError;
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.