Examples of AsyncMultiWriter


Examples of org.lightfish.presentation.publication.AsyncMultiWriter

    public void onNewSnapshot(@Observes @Severity(Severity.Level.HEARTBEAT) Snapshot snapshot) {
        LOG.info("SnapshotEventBroker.oneNewSnapshot: " + snapshot.getId());
        List<BrowserWindow> currentBrowsers = new ArrayList<>(browsers);
        List<BrowserWindow> staging = new ArrayList<>(browsers.size());
        AsyncMultiWriter multiWriter = new AsyncMultiWriter();
        for (BrowserWindow browserWindow : currentBrowsers) {
            if (browserWindow.getChannel() == null || browserWindow.getChannel().trim().isEmpty()) {
                LOG.log(Level.INFO, "Found a browser window({0}) with no channel", browserWindow.hashCode());
            }
            if (snapshot.getInstanceName().equals(browserWindow.getChannel())) {
                LOG.log(Level.FINEST, "Staging {0}", browserWindow.hashCode());
                Writer writer = browserWindow.getWriter();
                if (writer != null) {
                    multiWriter.addWriter(writer);
                    staging.add(browserWindow);
                } else {
                    browsers.remove(browserWindow);
                }
            }
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.