Package com.betfair.cougar.core.api.ev

Examples of com.betfair.cougar.core.api.ev.ExecutionObserver.onResult()


    public void notifyObservers(int state) {
        synchronized (executionObservers) {
            for (WeakReference<ExecutionObserver> ref : executionObservers) {
                ExecutionObserver obs = ref.get();
                if (obs != null) {
                    obs.onResult(new ExecutionResult(new CougarServiceException(ServerFaultCode.JMSTransportCommunicationFailure, "Connection to Sonic has been lost")));
                }
            }
            executionObservers = new HashSet<WeakReference<ExecutionObserver>>();
        }
    }
View Full Code Here


        ctx.getLocation().getResolvedAddresses();
        if (longEventNamespacedExecutionObserver.containsKey(eventNamespace)) {
            ExecutionObserver observer = longEventNamespacedExecutionObserver.get(eventNamespace);
            LongEvent longEvent = new LongEvent();
            longEvent.setLongArg(longArg);
            observer.onResult(new ExecutionResult(longEvent));
        } else {
            throw new SimpleException(ResponseCode.BadRequest,  SimpleExceptionErrorCodeEnum.GENERIC,
                    "Unknown event namespace: "+ eventNamespace);
        }
    }
View Full Code Here

        ctx.getLocation().getResolvedAddresses();
        if (longEventNamespacedExecutionObserver.containsKey(eventNamespace)) {
            ExecutionObserver observer = longEventNamespacedExecutionObserver.get(eventNamespace);
            LongEvent longEvent = new LongEvent();
            longEvent.setLongArg(longArg);
            observer.onResult(new ExecutionResult(longEvent));
        } else {
            throw new SimpleException(ResponseCode.BadRequest,  SimpleExceptionErrorCodeEnum.GENERIC,
                    "Unknown event namespace: "+ eventNamespace);
        }
    }
View Full Code Here

    public void notifyObservers(int state) {
        synchronized (executionObservers) {
            for (WeakReference<ExecutionObserver> ref : executionObservers) {
                ExecutionObserver obs = ref.get();
                if (obs != null) {
                    obs.onResult(new ExecutionResult(new CougarFrameworkException(ServerFaultCode.JMSTransportCommunicationFailure, "Connection to ActiveMQ has been lost")));
                }
            }
            executionObservers = new HashSet<WeakReference<ExecutionObserver>>();
        }
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.