Example usage for com.vaadin.ui ConnectorTracker ConnectorTracker

List of usage examples for com.vaadin.ui ConnectorTracker ConnectorTracker

Introduction

In this page you can find the example usage for com.vaadin.ui ConnectorTracker ConnectorTracker.

Prototype

public ConnectorTracker(UI uI) 

Source Link

Document

Creates a new ConnectorTracker for the given uI.

Usage

From source file:org.ikasan.dashboard.ui.IkasanUI.java

License:BSD License

@Override
public ConnectorTracker getConnectorTracker() {
    if (this.tracker == null) {
        this.tracker = new ConnectorTracker(this) {

            @Override/*from  www  .j a  v a 2s  . co  m*/
            public void registerConnector(ClientConnector connector) {
                try {
                    if (super.getConnector(connector.getConnectorId()) == null) {
                        super.registerConnector(connector);
                    } else {
                        unregisterConnector(connector);
                        super.registerConnector(connector);
                    }
                } catch (RuntimeException e) {
                    logger.info("Failed connector: " + connector.getClass().getSimpleName());
                    throw e;
                }
            }

            /* (non-Javadoc)
             * @see com.vaadin.ui.ConnectorTracker#unregisterConnector(com.vaadin.server.ClientConnector)
             */
            @Override
            public void unregisterConnector(ClientConnector connector) {
                super.unregisterConnector(connector);
            }
        };
    }

    return tracker;
}