Package com.betfair.cougar.core.api.exception

Examples of com.betfair.cougar.core.api.exception.CougarServiceException


                   observer,
                   timeConstraints);

        if (!observer.await(timeConstraints)) {
            // todo: we should really make this a client exception
            throw new CougarServiceException(ServerFaultCode.Timeout, "Operation i32SetSimpleTypeEcho timed out!");
        }

        final ExecutionResult er = observer.getExecutionResult();
        switch (er.getResultType()) {
            case Success:
View Full Code Here


                   observer,
                   timeConstraints);

        if (!observer.await(timeConstraints)) {
            // todo: we should really make this a client exception
            throw new CougarServiceException(ServerFaultCode.Timeout, "Operation i32MapSimpleTypeEcho timed out!");
        }

        final ExecutionResult er = observer.getExecutionResult();
        switch (er.getResultType()) {
            case Success:
View Full Code Here

                   observer,
                   timeConstraints);

        if (!observer.await(timeConstraints)) {
            // todo: we should really make this a client exception
            throw new CougarServiceException(ServerFaultCode.Timeout, "Operation getInferredCountryCode timed out!");
        }

        final ExecutionResult er = observer.getExecutionResult();
        switch (er.getResultType()) {
            case Success:
View Full Code Here

                   observer,
                   timeConstraints);

        if (!observer.await(timeConstraints)) {
            // todo: we should really make this a client exception
            throw new CougarServiceException(ServerFaultCode.Timeout, "Operation emitLongEvent timed out!");
        }

        final ExecutionResult er = observer.getExecutionResult();
        switch (er.getResultType()) {
            case Success:
View Full Code Here

                   observer,
                   timeConstraints);

        if (!observer.await(timeConstraints)) {
            // todo: we should really make this a client exception
            throw new CougarServiceException(ServerFaultCode.Timeout, "Operation subscribeToOwnEvents timed out!");
        }

        final ExecutionResult er = observer.getExecutionResult();
        switch (er.getResultType()) {
            case Success:
View Full Code Here

                   observer,
                   timeConstraints);

        if (!observer.await(timeConstraints)) {
            // todo: we should really make this a client exception
            throw new CougarServiceException(ServerFaultCode.Timeout, "Operation unsubscribeFromOwnEvents timed out!");
        }

        final ExecutionResult er = observer.getExecutionResult();
        switch (er.getResultType()) {
            case Success:
View Full Code Here

                   observer,
                   timeConstraints);

        if (!observer.await(timeConstraints)) {
            // todo: we should really make this a client exception
            throw new CougarServiceException(ServerFaultCode.Timeout, "Operation getReceivedEvents timed out!");
        }

        final ExecutionResult er = observer.getExecutionResult();
        switch (er.getResultType()) {
            case Success:
View Full Code Here

                   observer,
                   timeConstraints);

        if (!observer.await(timeConstraints)) {
            // todo: we should really make this a client exception
            throw new CougarServiceException(ServerFaultCode.Timeout, "Operation updateSimpleConnectedObject timed out!");
        }

        final ExecutionResult er = observer.getExecutionResult();
        switch (er.getResultType()) {
            case Success:
                return;

            case Fault:
                CougarException cex = er.getFault();

                if (cex.getServerFaultCode() == ServerFaultCode.ServiceCheckedException) {
                    List<String[]> exceptionParams = cex.getFault().getDetail().getFaultMessages();
                    String className = cex.getFault().getDetail().getDetailMessage();
                    throw new CougarServiceException(ServerFaultCode.ServiceCheckedException, "Unknown checked exception received", cex);
                } else {
                  throw cex;
                }
            default:
                throw new IllegalArgumentException("The Server returned an illegal result type [" + er.getResultType() + "]");
View Full Code Here

                   observer,
                   timeConstraints);

        if (!observer.await(timeConstraints)) {
            // todo: we should really make this a client exception
            throw new CougarServiceException(ServerFaultCode.Timeout, "Operation simpleConnectedObject timed out!");
        }

        final ExecutionResult er = observer.getExecutionResult();
        switch (er.getResultType()) {
            case Success:
                return (ConnectedResponse) er.getResult();

            case Fault:
                CougarException cex = er.getFault();

                if (cex.getServerFaultCode() == ServerFaultCode.ServiceCheckedException) {
                    List<String[]> exceptionParams = cex.getFault().getDetail().getFaultMessages();
                    String className = cex.getFault().getDetail().getDetailMessage();
                    throw new CougarServiceException(ServerFaultCode.ServiceCheckedException, "Unknown checked exception received", cex);
                } else {
                  throw cex;
                }
            default:
                throw new IllegalArgumentException("The Server returned an illegal result type [" + er.getResultType() + "]");
View Full Code Here

                   observer,
                   timeConstraints);

        if (!observer.await(timeConstraints)) {
            // todo: we should really make this a client exception
            throw new CougarServiceException(ServerFaultCode.Timeout, "Operation appendSimpleConnectedObject timed out!");
        }

        final ExecutionResult er = observer.getExecutionResult();
        switch (er.getResultType()) {
            case Success:
                return;

            case Fault:
                CougarException cex = er.getFault();

                if (cex.getServerFaultCode() == ServerFaultCode.ServiceCheckedException) {
                    List<String[]> exceptionParams = cex.getFault().getDetail().getFaultMessages();
                    String className = cex.getFault().getDetail().getDetailMessage();
                    throw new CougarServiceException(ServerFaultCode.ServiceCheckedException, "Unknown checked exception received", cex);
                } else {
                  throw cex;
                }
            default:
                throw new IllegalArgumentException("The Server returned an illegal result type [" + er.getResultType() + "]");
View Full Code Here

TOP

Related Classes of com.betfair.cougar.core.api.exception.CougarServiceException

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.