DefaultLiveDataManager implements LiveDataListener, LiveDataManager { @Override public ImmutableLiveDataResults snapshot(final LDListener listener) { Callable<ImmutableLiveDataResults> callable = new Callable<ImmutableLiveDataResults>() { @Override public ImmutableLiveDataResults call() { return doSnapshot(listener); } }; Subject subject = AuthUtils.getSubject(); Future<ImmutableLiveDataResults> future = _commandQueue.submit(subject.associateWith(callable)); try { return future.get(); } catch (InterruptedException e) { throw new OpenGammaRuntimeException("Error waiting on result from future", e); } catch (ExecutionException e) { throw Throwables.propagate(e.getCause()); } } DefaultLiveDataManager(LiveDataClient marketDataConnection);  DefaultLiveDataManager(LiveDataClient marketDataConnection,
                               int unsubscriptionDelay); @Override ImmutableLiveDataResults snapshot(final LDListener listener); @Override void subscribe(final LDListener client,
                        final Set<ExternalIdBundle> tickers); @Override void unsubscribe(final LDListener client,
                        final Set<ExternalIdBundle> tickers); @Override void subscriptionResultReceived(LiveDataSubscriptionResponse subscriptionResult); @Override void subscriptionResultsReceived(final Collection<LiveDataSubscriptionResponse> subscriptionResponses); @Override void waitForAllData(final LDListener listener); @Override void subscriptionStopped(LiveDataSpecification fullyQualifiedSpecification); @Override void valueUpdate(final LiveDataValueUpdate valueUpdate); @Override void unregister(final LDListener listener); static final int DEFAULT_UNSUBSCRIPTION_DELAY_SECONDS; }
@Test(expectedExceptions = IllegalStateException.class) public void testUnknownClientGivesError() { LiveDataManager manager = _manager; manager.snapshot(mock(LDListener.class)); }