Package com.betfair.baseline.v2.to

Examples of com.betfair.baseline.v2.to.BodyParamBoolObject



    @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 void updateSimpleConnectedObject(RequestContext ctx, SimpleConnectedObject updatedObject, TimeConstraints timeConstraints) {
        ctx.setRequestLogExtension(new BaselineLogExtension(null, null, null));
        simpleConnectedObjectHeap.beginUpdate();
        try {
            SimpleConnectedObjectCO root = SimpleConnectedObjectServerCO.rootFrom(simpleConnectedObjectHeap);
            root.setId(updatedObject.getId());
            root.setMessage(updatedObject.getMessage());
        }
        finally {
            simpleConnectedObjectHeap.endUpdate();
        }
    }
View Full Code Here

    public void appendSimpleConnectedObject(RequestContext ctx, SimpleConnectedObject object, TimeConstraints timeConstraints) {
        ctx.setRequestLogExtension(new BaselineLogExtension(null, null, null));
        simpleConnectedListHeap.beginUpdate();
        try {
            HListComplex<SimpleConnectedObjectServerCO> root = SimpleConnectedObjectServerCO.rootFromAsList(simpleConnectedListHeap);
            SimpleConnectedObjectCO newObject = root.addLast();
            newObject.setId(object.getId());
            newObject.setMessage(object.getMessage());
        } finally {
            simpleConnectedListHeap.endUpdate();
        }
    }
View Full Code Here

    @Override
    public void updateComplexConnectedObject(RequestContext ctx, VeryComplexObject updatedObject, TimeConstraints timeConstraints) {
        ctx.setRequestLogExtension(new BaselineLogExtension(null, null, null));
        complexConnectedObjectHeap.beginUpdate();
        try {
            VeryComplexObjectCO root = VeryComplexObjectServerCO.rootFrom(complexConnectedObjectHeap);
            root.setEnumParameter(updatedObject.getEnumParameter() != null ? updatedObject.getEnumParameter().getCode() : null);
            ConnectedObjectTestingUtils.updateList(updatedObject.getList(), root.getList(), ConnectedObjectTestingUtils.lessComplexObjectConverter, ConnectedObjectTestingUtils.lessComplexObjectIdSource, ConnectedObjectTestingUtils.lessComplexObjectProjectionIdSource);
            ConnectedObjectTestingUtils.updateMap(updatedObject.getMap(), root.getMap(), ConnectedObjectTestingUtils.lessComplexObjectConverter);
            ConnectedObjectTestingUtils.updateList(updatedObject.getSet(), root.getSet(), ConnectedObjectTestingUtils.lessComplexObjectConverter, ConnectedObjectTestingUtils.lessComplexObjectIdSource, ConnectedObjectTestingUtils.lessComplexObjectProjectionIdSource);
        }
        finally {
            complexConnectedObjectHeap.endUpdate();
        }
    }
View Full Code Here

  public SimpleResponse setHealthStatusInfo(RequestContext ctx,
      HealthStatusInfoRequest message, TimeConstraints timeConstraints) throws SimpleException {

    ctx.setRequestLogExtension(new BaselineLogExtension(message, null, null));
   
    CougarComponentStatuses cacheAccessStatusDetail = message
        .getCacheAccessStatusDetail();
    CougarComponentStatuses dbConnectionStatusDetail = message
        .getDBConnectionStatusDetail();
    CougarComponentStatuses serviceStatusDetail = message
        .getServiceStatusDetail();
    Boolean initialiseHealthStatusDetail = message.getInitialiseHealthStatusObject();

        // reset the status
    if ((initialiseHealthStatusDetail != null) && (initialiseHealthStatusDetail)) {
      ((BaselineMonitor)monitorRegistry.getMonitor("DB"+instance)).setStatus(Status.OK);
      ((BaselineMonitor)monitorRegistry.getMonitor("Cache"+instance)).setStatus(Status.OK);
      ((BaselineMonitor)monitorRegistry.getMonitor("Service"+instance)).setStatus(Status.OK);
    }

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

    if (cacheAccessStatusDetail != null) {
      ((BaselineMonitor)monitorRegistry.getMonitor("Cache"+instance)).setStatus(toStatus(cacheAccessStatusDetail.toString()));
    }
View Full Code Here

        if (message.equals("throwRuntime")) {
            throw new RuntimeException("Requested");
        } else {
            try {
                SimpleExceptionErrorCodeEnum errCode = SimpleExceptionErrorCodeEnum.valueOf(message.toUpperCase(Locale.ENGLISH));
                throw new SimpleException(response, errCode, message);
            }
            catch (IllegalArgumentException e) {
                try {
                    WotsitExceptionErrorCodeEnum errCode = WotsitExceptionErrorCodeEnum.valueOf(message.toUpperCase(Locale.ENGLISH));
View Full Code Here

      throws SimpleException, WotsitException {
    ctx.trace("Starting exception thrower with message %s", message);
    ctx.setRequestLogExtension(new BaselineLogExtension(null, null, null));
   
    try {
      SimpleExceptionErrorCodeEnum errCode = SimpleExceptionErrorCodeEnum
          .valueOf(message);
      throw new SimpleException(ResponseCode.Unauthorised, errCode,
          message);
    } catch (IllegalArgumentException e) {
      try {
View Full Code Here

                SimpleExceptionErrorCodeEnum errCode = SimpleExceptionErrorCodeEnum.valueOf(message.toUpperCase(Locale.ENGLISH));
                throw new SimpleException(response, errCode, message);
            }
            catch (IllegalArgumentException e) {
                try {
                    WotsitExceptionErrorCodeEnum errCode = WotsitExceptionErrorCodeEnum.valueOf(message.toUpperCase(Locale.ENGLISH));
                    throw new WotsitException(e,
                            response,
                            errCode, (message.hashCode() % 2) != 0 ? WotsitExceptionTypeEnum.CHEESY : WotsitExceptionTypeEnum.SPICY,
                            String.valueOf(responseCode));
                }
View Full Code Here

          .valueOf(message);
      throw new SimpleException(ResponseCode.Unauthorised, errCode,
          message);
    } catch (IllegalArgumentException e) {
      try {
        WotsitExceptionErrorCodeEnum errCode = WotsitExceptionErrorCodeEnum
            .valueOf(message);
        throw new WotsitException(e,
            ResponseCode.Forbidden,
            errCode,
            (message.hashCode() % 2 != 0) ? WotsitExceptionTypeEnum.CHEESY
View Full Code Here

        String message = builder.toString();

        ctx.trace("Emitting message list [ " + message +" ]");
        ctx.setRequestLogExtension(new BaselineLogExtension(message, null, null));

        ListEvent lEvent = new ListEvent();
        lEvent.setMessageList(messageList);

        try {
            listMessageObserver.onResult(new ExecutionResult(lEvent));
        } catch (Throwable ex) {
          LOGGER.log(Level.SEVERE, "An exception occurred emitting the message list event:", ex);
View Full Code Here

TOP

Related Classes of com.betfair.baseline.v2.to.BodyParamBoolObject

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.