Package com.betfair.baseline.v1.to

Examples of com.betfair.baseline.v1.to.SimpleResponse


    if (dbConnectionStatusDetail != null) {
      ((BaselineMonitor)monitorRegistry.getMonitor("DB"+instance)).setStatus(toStatus(dbConnectionStatusDetail.toString()));
    }

    SimpleResponse response = new SimpleResponse();
    response.setMessage("Health Status Info set for Baseline app.");
    return response;

  }
View Full Code Here


        ctx.trace("Starting simple get for %s", message);
        ctx.setRequestLogExtension(new BaselineLogExtension(message, null, null));
        if (message.startsWith("FORWARD:")) {
            return baselineAsClient.testSimpleGet(ctx, "FORWARDED:"+ message.substring(8));
        } else {
            SimpleResponse response = new SimpleResponse();
            response.setMessage(message);
            return response;
        }
    }
View Full Code Here

    //Set up request wrapper
    CougarClientWrapper simpleWrapper = CougarClientWrapper.getInstance(transport);
        Executor simpleExecutor = new Executor("testSimpleGet", simpleWrapper);
   
    //Set up expected response object
    SimpleResponse expectedResponse = new SimpleResponse();
    expectedResponse.setMessage("foo");
   
    JSONObject jsonObject = new JSONObject(expectedResponse.toString());
    simpleExecutor.setExpectedResponse(jsonObject);
   
    return simpleExecutor;
  }
View Full Code Here

      BaselineSyncClient client = wrapper.getClient();
      ExecutionContext ctx = wrapper.getCtx();
     
      if("testSimpleGet".equals(methodToExecute)){
        try{
          SimpleResponse response = client.testSimpleGet(ctx, "foo");
          this.actualResponse = new JSONObject(response.toString());
        } catch(SimpleException e){
          this.actualResponse = null;
                    this.exceptionResponse = e;
        } catch(JSONException j){
          this.actualResponse = null;
                    this.exceptionResponse = j;
        }
      }
      else if("i32Operation".equals(methodToExecute)){
        BodyParamI32Object body = new BodyParamI32Object();
        body.setBodyParameter(I32_BODY);
        try {
          I32OperationResponseObject response = client.i32Operation(ctx, I32_HEADER, I32_QUERY, body);
          this.actualResponse = new JSONObject(response.toString());
        } catch(SimpleException e) {
                    this.actualResponse = null;
                    this.exceptionResponse = e;
                } catch(JSONException j){
                    this.actualResponse = null;
                    this.exceptionResponse = j;
        }
      }
      else if("boolOperation".equals(methodToExecute)){
        BodyParamBoolObject body = new BodyParamBoolObject();
        body.setBodyParameter(true);
        try {
           BoolOperationResponseObject response = client.boolOperation(ctx, false, true, body);
           this.actualResponse = new JSONObject(response.toString());
        } catch(SimpleException e) {
                    this.actualResponse = null;
                    this.exceptionResponse = e;
                } catch(JSONException j){
                    this.actualResponse = null;
View Full Code Here

TOP

Related Classes of com.betfair.baseline.v1.to.SimpleResponse

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.