Package com.betfair.baseline.v2.events

Examples of com.betfair.baseline.v2.events.BaselineJMSServiceBindingDescriptor


    e.execute(ec, testComplexMutatorKey, new Object[] {o,o}, new ExecutionObserver() {

      @Override
      public void onResult(ExecutionResult executionResult) {
        if (!executionResult.isFault()) {
          SimpleResponse response = (SimpleResponse) executionResult.getResult();
          System.out.println("null = 3".equals(response.getMessage()) ? "PASS" : "FAIL");
        }
        else {
          System.out.println("FAIL");
        }
        cl.countDown();
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

  @Override
  public SimpleResponse testSimpleGetQA(RequestContext ctx, String message, TimeConstraints timeConstraints) throws SimpleException {
    ctx.setRequestLogExtension(new BaselineLogExtension(message, null, null));
    ctx.trace("Starting simple get for %s", message);
    if (message.equalsIgnoreCase("GET_CHANNEL_INFO")) {
      SimpleResponse response = new SimpleResponse();
      response.setMessage("ChannelId: " + ctx.getIdentity().toString());
      return response;
    }
    else if (message.equalsIgnoreCase("DELEGATE")) {
      SimpleResponseDelegate delegate = new SimpleResponseDelegateImpl();
      return new SimpleResponse(delegate);     
    }
    else {
      SimpleResponse response = new SimpleResponse();
      response.setMessage("service2-" + message);
      return response;
    }

  }
View Full Code Here

  @Override
  public SimpleResponse testParameterStylesQA(RequestContext ctx,
      TestParameterStylesQAHeaderParamEnum headerParam, String queryParam, Date dateQueryParam, TimeConstraints timeConstraints) {

    ctx.setRequestLogExtension(new BaselineLogExtension(queryParam, null, null));
    SimpleResponse response = new SimpleResponse();
    response.setMessage("headerParam=" + headerParam
                + ",queryParam=" + queryParam + ",dateQueryParam=" + dateQueryParam);
    return response;
  }
View Full Code Here

    @KPITimedEvent(value = "Baseline.service.testComplexMutator", catchFailures = true)
    @Override
    public SimpleResponse testComplexMutator(RequestContext ctx, ComplexObject message, TimeConstraints timeConstraints) throws SimpleException {
        ctx.trace("Starting complex mutator for %s", message.getName());
        ctx.setRequestLogExtension(new BaselineLogExtension(message, "mutate", null));
        SimpleResponse response = new SimpleResponse();
        Integer val2 = message.getValue2();
        if (val2 == null) {
            val2 = 0;
        }
        response.setMessage(message.getName() + " = " + (message.getValue1() + val2));
        return response;
    }
View Full Code Here

    @KPITimedEvent(value = "Baseline.service.testLargePost", catchFailures = true)
    @Override
    public SimpleResponse testLargePost(RequestContext ctx, LargeRequest message, TimeConstraints timeConstraints) throws SimpleException {
        ctx.trace("Starting large post with array size %s", message.getSize());
        ctx.setRequestLogExtension(new BaselineLogExtension(message.getOddOrEven(), "largepost", message.getSize()));
        SimpleResponse response = new SimpleResponse();
        response.setMessage("There were " + message.getSize() + " items specified in the list, " + message.getObjects().size()
                + " actually");
        return response;
    }
View Full Code Here

  @Override
  public SimpleResponse testLargePostQA(RequestContext ctx, LargeRequest message, TimeConstraints timeConstraints)
      throws SimpleException {
    ctx.trace("Starting large post with array size %s", message.getSize());
    ctx.setRequestLogExtension(new BaselineLogExtension(message.getOddOrEven(), "largepostQA", message.getSize()));
    SimpleResponse response = new SimpleResponse();
   
    Boolean returnList = message.getReturnList();
    if ((returnList != null) && (returnList)) {
     
      List<ComplexObject> complexObjects = message.getObjects();
     
      StringBuffer namesBuff = new StringBuffer();
      namesBuff.append("Names: ");     
      StringBuffer value1sBuff = new StringBuffer();
      value1sBuff.append("Value1s: ");
      StringBuffer value2sBuff = new StringBuffer();
      value2sBuff.append("Value2s: ");

      for (ComplexObject complexObject: complexObjects) {
        if (complexObject == null) {
          namesBuff.append("null");         
          value1sBuff.append("null");
          value2sBuff.append("null");
        } else {
          namesBuff.append(complexObject.getName());         
          value1sBuff.append(complexObject.getValue1());
          value2sBuff.append( complexObject.getValue2());
        }
      }
      String names = namesBuff.toString();
      String value1s = value1sBuff.toString();
      String value2s = value2sBuff.toString();
     
      response.setMessage(names + " - " + value1s + " - " + value2s);
    } else {
      response.setMessage("There were " + message.getSize()
          + " items specified in the list, "
          + message.getObjects().size() + " actually");
    }
    return response;
  }
View Full Code Here

    @Override
    public SimpleResponse testBodyParams(RequestContext ctx, String message, Integer value, ComplexObject complex, SimpleValidValue myEnum,
                                         ComplexObject anotherComplex, TimeConstraints timeConstraints) throws SimpleException {
        ctx.setRequestLogExtension(new BaselineLogExtension(message, value, complex));

        SimpleResponse response = new SimpleResponse();
        response.setMessage("message={" + message + "},value={" + value + "},complex={" + complex + "},myEnum={" + myEnum
                + "},anotherComplex={" + anotherComplex + "}");
        return response;
    }
View Full Code Here

        ctx.setRequestLogExtension(new BaselineLogExtension(seed, "List", async));
        List<SimpleResponse> response = new ArrayList<SimpleResponse>();
        Random rnd = new Random(seed);

        for (int i = 0; i < rnd.nextInt(7) + 3; i++) {
            SimpleResponse sr = new SimpleResponse();
            sr.setMessage(String.valueOf(async));
            response.add(sr);
        }
        if (async == AsyncBehaviour.SYNC) {
            return response;
        } else {
View Full Code Here

        ctx.setRequestLogExtension(new BaselineLogExtension(seed, "Map", async));
        Map<String, SimpleResponse> response = new HashMap<String, SimpleResponse>();
        Random rnd = new Random(seed);

        for (int i = 0; i < rnd.nextInt(7) + 3; i++) {
            SimpleResponse sr = new SimpleResponse();
            sr.setMessage(String.valueOf(async));
            response.put(String.valueOf(i), sr);
        }
        if (async == AsyncBehaviour.SYNC) {
            return response;
        } else {
View Full Code Here

TOP

Related Classes of com.betfair.baseline.v2.events.BaselineJMSServiceBindingDescriptor

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.