/** * Create a new item manager. * <p> * Only one item manager should be created per connection since the item * manager acquires the listeners for data items using * {@link Connection#setItemUpdateListener(String, ItemUpdateListener)} * which directs all further updates to this item manager an disconnects all * other item managers. So item managers should be shared. * </p> * * @param connection * the new connection to use for this item manager */ public ItemManagerImpl ( final org.eclipse.scada.da.client.Connection connection ) { super (); this.connection = connection; synchronized ( this ) { this.connection.addConnectionStateListener ( this ); this.connected = this.connection.getState () == ConnectionState.BOUND; } }
@Override public void removeConnectionStateListener ( final ConnectionStateListener connectionStateListener ) { this.connection.removeConnectionStateListener ( connectionStateListener ); }
public Executor getExecutor () { // we don't cache the executor since it might change on the connection return this.connection.getExecutor (); }
@Override public void addConnectionStateListener ( final ConnectionStateListener connectionStateListener ) { this.connection.addConnectionStateListener ( connectionStateListener ); }
@Override public NotifyFuture<WriteAttributeResults> startWriteAttributes ( final String itemId, final Map<String, Variant> attributes, final OperationParameters operationParameters, final CallbackHandler callbackHandler ) { return this.connection.startWriteAttributes ( itemId, attributes, operationParameters, callbackHandler ); }
@Override public NotifyFuture<WriteResult> startWrite ( final String itemId, final Variant value, final OperationParameters operationParameters, final CallbackHandler callbackHandler ) { return this.connection.startWrite ( itemId, value, operationParameters, callbackHandler ); }
public ItemSyncController ( final org.eclipse.scada.da.client.Connection connection, final ItemManagerImpl itemManager, final String itemId ) { this.connection = connection; this.itemManager = itemManager; this.itemId = itemId; synchronized ( this ) { this.connection.setItemUpdateListener ( this.itemId, this ); } }
public FolderSyncController ( final Connection connection, final Location location ) { super ( location ); this.connection = connection; this.connection.setFolderListener ( location, this ); }
@Override public void subscribeFolder ( final Location location ) throws NoConnectionException, OperationException { this.connection.subscribeFolder ( location ); }
protected synchronized void subscribe () { try { logger.debug ( "Syncing listen state: active" ); this.subscribed = true; this.connection.subscribeItem ( this.itemId ); } catch ( final Throwable e ) { handleError ( e ); } }
@Override public ConnectionState getState () { return this.connection.getState (); }
public FolderManager ( final Connection connection ) { this.connection = connection; this.connection.addConnectionStateListener ( this ); }
@Override public NotifyFuture<WriteAttributeResults> startWriteAttributes ( final String itemId, final Map<String, Variant> attributes, final OperationParameters operationParameters, final CallbackHandler callbackHandler ) { return this.connection.startWriteAttributes ( itemId, attributes, operationParameters, callbackHandler ); }
@Override public NotifyFuture<WriteResult> startWrite ( final String itemId, final Variant value, final OperationParameters operationParameters, final CallbackHandler callbackHandler ) { return this.connection.startWrite ( itemId, value, operationParameters, callbackHandler ); }
public ItemSyncController ( final org.eclipse.scada.da.client.Connection connection, final ItemManagerImpl itemManager, final String itemId ) { this.connection = connection; this.itemManager = itemManager; this.itemId = itemId; synchronized ( this ) { this.connection.setItemUpdateListener ( this.itemId, this ); } }
@Override public FolderListener setFolderListener ( final Location location, final FolderListener listener ) { return this.connection.setFolderListener ( location, listener ); }
@Override public void subscribeFolder ( final Location location ) throws NoConnectionException, OperationException { this.connection.subscribeFolder ( location ); }
protected synchronized void subscribe () { try { logger.debug ( "Syncing listen state: active" ); this.subscribed = true; this.connection.subscribeItem ( this.itemId ); } catch ( final Throwable e ) { handleError ( e ); } }
@Override public ConnectionState getState () { return this.connection.getState (); }
/** * Create a new item manager. * <p> * Only one item manager should be created per connection since the item * manager acquires the listeners for data items using * {@link Connection#setItemUpdateListener(String, ItemUpdateListener)} * which directs all further updates to this item manager an disconnects all * other item managers. So item managers should be shared. * </p> * * @param connection * the new connection to use for this item manager */ public ItemManagerImpl ( final org.eclipse.scada.da.client.Connection connection ) { super (); this.connection = connection; synchronized ( this ) { this.connection.addConnectionStateListener ( this ); this.connected = this.connection.getState () == ConnectionState.BOUND; } }