public void addFolderWatcher ( final FolderWatcher watcher ) { addFolderListener ( watcher, watcher.getLocation () ); }
public void removeFolderWatcher ( final FolderWatcher watcher ) { removeFolderListener ( watcher, watcher.getLocation () ); }
@Override public void stateChange ( final org.eclipse.scada.core.client.Connection connection, final ConnectionState state, final Throwable error ) { switch ( state ) { case BOUND: resyncAllFolders (); break; case CLOSED: disconnectAllFolders (); break; default: break; } } }
protected void setFolderManager ( final FolderEntryWrapper parent ) { if ( this.parent != null ) { this.parent.getFolderManager ().removeFolderListener ( this, this.parent.getLocation () ); } this.parent = parent; if ( parent == null ) { this.data.clear (); } else { parent.getFolderManager ().addFolderListener ( this, parent.getLocation () ); } }
public void dispose () { this.connection.removeConnectionStateListener ( this ); disconnectAllFolders (); this.connection = null; }
public ConnectionServiceImpl ( final Connection connection, final Integer autoReconnectController, final boolean lazyActivation ) { super ( autoReconnectController, lazyActivation ); // for now we are using the autoReconnectController timeout as lingering timeout ... this.connection = lazyActivation ? new LazyConnectionWrapper ( connection, autoReconnectController ) { @Override protected void performDisconnect () { setShouldConnect ( false ); } @Override protected void performConnect () { setShouldConnect ( true ); } } : connection; setConnection ( this.connection ); this.itemManager = new CountingItemManager ( new ItemManagerImpl ( this.connection ), this.statistics ); this.folderManager = new FolderManager ( this.connection ); this.statistics.setLabel ( ConnectionServiceImpl.GET_ON_IM, "getItemManager called" ); this.statistics.setLabel ( CountingItemManager.REGISTERED_ITEMS, "Registered items" ); }
public void dispose () { this.connection.removeConnectionStateListener ( this ); disconnectAllFolders (); this.connection = null; }
public ConnectionServiceImpl ( final Connection connection, final Integer autoReconnectController, final boolean lazyActivation ) { super ( autoReconnectController, lazyActivation ); // for now we are using the autoReconnectController timeout as lingering timeout ... this.connection = lazyActivation ? new LazyConnectionWrapper ( connection, autoReconnectController ) { @Override protected void performDisconnect () { setShouldConnect ( false ); } @Override protected void performConnect () { setShouldConnect ( true ); } } : connection; setConnection ( this.connection ); this.itemManager = new CountingItemManager ( new ItemManagerImpl ( this.connection ), this.statistics ); this.folderManager = new FolderManager ( this.connection ); this.statistics.setLabel ( ConnectionServiceImpl.GET_ON_IM, "getItemManager called" ); this.statistics.setLabel ( CountingItemManager.REGISTERED_ITEMS, "Registered items" ); }
@Override public void stateChange ( final org.eclipse.scada.core.client.Connection connection, final ConnectionState state, final Throwable error ) { switch ( state ) { case BOUND: resyncAllFolders (); break; case CLOSED: disconnectAllFolders (); break; default: break; } } }
public void removeFolderWatcher ( final FolderWatcher watcher ) { removeFolderListener ( watcher, watcher.getLocation () ); }
public void addFolderWatcher ( final FolderWatcher watcher ) { addFolderListener ( watcher, watcher.getLocation () ); }
@Override public synchronized void dispose () { logger.debug ( "Disposed" ); if ( this.parent != null ) { this.parent.getFolderManager ().removeFolderListener ( this, this.parent.getLocation () ); } this.data.dispose (); }