Examples of onResult()


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

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

        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

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

        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

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 CougarFrameworkException(ServerFaultCode.JMSTransportCommunicationFailure, "Connection to ActiveMQ has been lost")));
                }
            }
            executionObservers = new HashSet<WeakReference<ExecutionObserver>>();
        }
    }
View Full Code Here

Examples of com.betfair.cougar.core.impl.ev.ServiceExceptionHandlingObserver.onResult()

                try {
                    HealthSummaryResponse result = service.isHealthy((RequestContext)ctx, timeConstraints);
                    observer.onResult(new ExecutionResult(result));
                } catch (CougarException ce) {
                    exceptionHandlingObserver.onResult(new ExecutionResult(ce));
                } catch (HealthException ex) {
                    exceptionHandlingObserver.onResult(new ExecutionResult((CougarApplicationException)ex));
                };
            }
        });
View Full Code Here

Examples of com.betfair.cougar.core.impl.ev.ServiceExceptionHandlingObserver.onResult()

                    HealthSummaryResponse result = service.isHealthy((RequestContext)ctx, timeConstraints);
                    observer.onResult(new ExecutionResult(result));
                } catch (CougarException ce) {
                    exceptionHandlingObserver.onResult(new ExecutionResult(ce));
                } catch (HealthException ex) {
                    exceptionHandlingObserver.onResult(new ExecutionResult((CougarApplicationException)ex));
                };
            }
        });

      executableMap.put(HealthServiceDefinition.getDetailedHealthStatusKey,
View Full Code Here

Examples of com.betfair.cougar.core.impl.ev.ServiceExceptionHandlingObserver.onResult()

                try {
                    HealthDetailResponse result = service.getDetailedHealthStatus((RequestContext)ctx, timeConstraints);
                    observer.onResult(new ExecutionResult(result));
                } catch (CougarException ce) {
                    exceptionHandlingObserver.onResult(new ExecutionResult(ce));
                } catch (HealthException ex) {
                    exceptionHandlingObserver.onResult(new ExecutionResult((CougarApplicationException)ex));
                };
            }
        });
View Full Code Here

Examples of com.betfair.cougar.core.impl.ev.ServiceExceptionHandlingObserver.onResult()

                    HealthDetailResponse result = service.getDetailedHealthStatus((RequestContext)ctx, timeConstraints);
                    observer.onResult(new ExecutionResult(result));
                } catch (CougarException ce) {
                    exceptionHandlingObserver.onResult(new ExecutionResult(ce));
                } catch (HealthException ex) {
                    exceptionHandlingObserver.onResult(new ExecutionResult((CougarApplicationException)ex));
                };
            }
        });

  }
View Full Code Here

Examples of com.betfair.cougar.core.impl.ev.ServiceExceptionHandlingObserver.onResult()

                try {
                    SimpleResponse result = service.testSimpleGet((RequestContext)ctx, (String)args[0], timeConstraints);
                    observer.onResult(new ExecutionResult(result));
                } catch (CougarException ce) {
                    exceptionHandlingObserver.onResult(new ExecutionResult(ce));
                } catch (SimpleException ex) {
                    exceptionHandlingObserver.onResult(new ExecutionResult((CougarApplicationException)ex));
                };
            }
        });
View Full Code Here

Examples of com.betfair.cougar.core.impl.ev.ServiceExceptionHandlingObserver.onResult()

                    SimpleResponse result = service.testSimpleGet((RequestContext)ctx, (String)args[0], timeConstraints);
                    observer.onResult(new ExecutionResult(result));
                } catch (CougarException ce) {
                    exceptionHandlingObserver.onResult(new ExecutionResult(ce));
                } catch (SimpleException ex) {
                    exceptionHandlingObserver.onResult(new ExecutionResult((CougarApplicationException)ex));
                };
            }
        });

  }
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.