Package com.betfair.baseline.v1

Examples of com.betfair.baseline.v1.BaselineSyncClient


/**
*/
public class OldVersionBaselineServiceImpl implements BaselineService {
    @Override
    public SimpleResponse testSimpleGet(RequestContext ctx, String message, TimeConstraints timeConstraints) throws SimpleException {
        SimpleResponse simpleResponse = new SimpleResponse();

        simpleResponse.setMessage(message + " emitted by version 1.0.0 of Baseline");
        return simpleResponse;
    }
View Full Code Here



    @Override
    public TestResults testConnectedObjects(RequestContext ctx, TestConnectedObjectsProtocolEnum protocol, TimeConstraints timeConstraints) {
        ctx.setRequestLogExtension(new BaselineLogExtension(null, null, null));
        BaselineSyncClient client = null;
        if (protocol == TestConnectedObjectsProtocolEnum.IN_PROCESS) {
            client = inProcessSyncClient;
        }
        else if (protocol == TestConnectedObjectsProtocolEnum.SOCKET) {
            client = socketSyncClient;
View Full Code Here


    @Override
    public TestResults testConnectedObjects(RequestContext ctx, TestConnectedObjectsProtocolEnum protocol, TimeConstraints timeConstraints) {
        ctx.setRequestLogExtension(new BaselineLogExtension(null, null, null));
        BaselineSyncClient client = null;
        if (protocol == TestConnectedObjectsProtocolEnum.IN_PROCESS) {
            client = inProcessSyncClient;
        }
        else if (protocol == TestConnectedObjectsProtocolEnum.SOCKET) {
            client = socketSyncClient;
View Full Code Here

    public void run(){
      this.makeCall();
    }
   
    public void makeCall(){
      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){
View Full Code Here

TOP

Related Classes of com.betfair.baseline.v1.BaselineSyncClient

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.