Package com.betfair.baseline.v2

Examples of com.betfair.baseline.v2.BaselineSyncClientImpl


  public SimpleResponse kpiTesting(RequestContext ctx, String message, TimeConstraints timeConstraints)
      throws SimpleException {
    ctx.setRequestLogExtension(new BaselineLogExtension(message, null, null));
    ctx.trace("Starting kpiTesting for %s", message);
   
    SimpleResponse response = new SimpleResponse();
    response.setMessage("This method uses KPI testing. Message received : " + message);
    return response;   
 
View Full Code Here


    } catch (NumberFormatException e) {
      throw new SimpleException(ResponseCode.InternalError,SimpleExceptionErrorCodeEnum.GENERIC, e.getMessage());
    } catch (InterruptedException e) {
      throw new SimpleException(ResponseCode.Timeout,SimpleExceptionErrorCodeEnum.TIMEOUT,e.getMessage());
    }
    SimpleResponse response = new SimpleResponse();
    response.setMessage("Waited for " + seconds + " seconds.");
    return response;   
 
View Full Code Here

    ctx.setRequestLogExtension(new BaselineLogExtension(logString, null, null));
    ctx.trace("Starting logMessage for %s", logString);
   
    LOGGER.log(Level.parse(logLevel), logString);
   
    SimpleResponse response = new SimpleResponse();
    response.setMessage(logString + " logged at " + logLevel);
    return response;   
  }
View Full Code Here

      String level, TimeConstraints timeConstraints) throws SimpleException {
 
    ctx.setRequestLogExtension(new BaselineLogExtension(logName + ": " + level, null, null));
    ctx.trace("Starting changeLogLevel to %s", level);
   
    SimpleResponse response = new SimpleResponse();
    if ((logName==null) || (logName.equalsIgnoreCase("")) || (logName.equalsIgnoreCase("service"))) {
            loggingControl.setLogLevel(LOGGER.getLogName(), level, false);
      response.setMessage("Service logging level set at " + level);
    } else {
            loggingControl.setLogLevel(logName, level, false);
      response.setMessage(logName + " logging level set at " + level);
    }

        LOGGER.log(Level.WARNING, "A warning message");
        LOGGER.log(Level.INFO,  "A warning message");
View Full Code Here

    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

      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);
View Full Code Here

    @KPITimedEvent(value = "Baseline.service.testMapsNameClash", catchFailures = true)
    @Override
    public SimpleResponseMap testMapsNameClash(RequestContext ctx, SimpleMap mapParam, TimeConstraints timeConstraints) throws SimpleException {
        ctx.setRequestLogExtension(new BaselineLogExtension(mapParam.getCache().size(), null, null));
        Set<Entry<String, String>> entry = mapParam.getCache().entrySet();
        SimpleResponseMap map = new SimpleResponseMap();
        map.setCache(new HashMap<String, String>());
        for (Entry<String, String> ent : entry) {
            map.getCache().put("RESULT:" + ent.getKey(), "RESULT:" + ent.getValue());
        }
        return map;
    }
View Full Code Here

      else {
        responseSet.add(String.valueOf(object));
      }
    }

    SimpleSetOperationResponseObject response = new SimpleSetOperationResponseObject();
    response.setResponseSet(responseSet);
    return response;
  }
View Full Code Here

    else {

      Map<String,SomeComplexObject> responseMap = new LinkedHashMap<String,SomeComplexObject>();

      for (Object key : requestMapKeys) {
        SomeComplexObject responseComplexObject = new SomeComplexObject();
        SomeComplexObject requestComplexObject = requestMap.get(key.toString());
        responseComplexObject.setDateTimeParameter(requestComplexObject.getDateTimeParameter());
        responseComplexObject.setListParameter(requestComplexObject.getListParameter());
        responseComplexObject.setEnumParameter(requestComplexObject.getEnumParameter());
        responseComplexObject.setStringParameter(requestComplexObject.getStringParameter());
        responseMap.put(key.toString(), responseComplexObject);
      }

      ComplexMapOperationResponseObject response = new ComplexMapOperationResponseObject();
      response.setResponseMap(responseMap);
View Full Code Here

    }

    Arrays.sort(mapKeys);

    for (String key : mapKeys) {
      SomeComplexObject requestComplexObject = requestSetObjectMap.get(key);
      SomeComplexObject responseComplexObject = new SomeComplexObject();
      responseComplexObject.setDateTimeParameter(requestComplexObject.getDateTimeParameter());
      responseComplexObject.setListParameter(requestComplexObject.getListParameter());
      responseComplexObject.setEnumParameter(requestComplexObject.getEnumParameter());
      responseComplexObject.setStringParameter(requestComplexObject.getStringParameter());

      responseSet.add(responseComplexObject);
    }

    ComplexSetOperationResponseObject response = new ComplexSetOperationResponseObject();
View Full Code Here

TOP

Related Classes of com.betfair.baseline.v2.BaselineSyncClientImpl

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.