protected MemoryDataItem ( final String name, final EnumSet<IODirection> ioDirection ) { super ( new DataItemInformationBase ( name, ioDirection ) ); this.attributes = new AttributeManager ( this ); }
public AttributeWriteHandlerItem ( final String itemId, final AttributeWriteHandler writeHandler, final Executor executor ) { super ( new DataItemInformationBase ( itemId ), executor ); this.writeHandler = writeHandler; }
@Override public Map<String, Variant> getAttributes () { return this.attributes.get (); }
@Override public synchronized DataItemCommand createCommand ( final String localId, final Map<String, Variant> properties ) { return registerItem ( new DataItemCommand ( getId ( localId ), this.executor ), properties ); }
protected void addToFolder ( final DataItem item, final String name, final Map<String, Variant> attributes ) { if ( this.folder == null ) { return; } this.folder.add ( name, item.getInformation (), attributes ); }
public DataItemInputCommon ( final DataItemInformation info ) { super ( info ); this.attributes = new AttributeManager ( this ); }
@Override public void run () { item.setListener ( DataItemSubscriptionSource.this ); } } );
/** * Handle all unhandled set attribute requests * * @param writeAttributeResults * the result set * @param attributes * the attributes to set * @return the final result */ protected WriteAttributeResults handleUnhandledAttributes ( final WriteAttributeResults writeAttributeResults, final Map<String, Variant> attributes ) { return WriteAttributesHelper.errorUnhandled ( writeAttributeResults, attributes ); }
@Override public synchronized void setListener ( final ItemListener listener ) { if ( this.listener != listener ) { handleListenerChange ( listener ); } }
@Override public WriteResult call () throws Exception { processWrite ( value ); return null; } } );
/** * Notify a data change without checking for a real change. * <p> * See {@link #notifyData(Variant, Map, boolean)} when and how to use the * method! * * @param value * the value to send * @param attributes * the attributes to send */ protected void notifyData ( final Variant value, final Map<String, Variant> attributes ) { notifyData ( value, attributes, false ); }
@Override protected Map<String, Variant> getCacheAttributes () { return this.secondaryAttributes.get (); }
public DataItemInputCommon ( final String name ) { super ( name ); this.attributes = new AttributeManager ( this ); }
@Override public void run () { item.setListener ( null ); } } );
@Override public NotifyFuture<WriteAttributeResults> startSetAttributes ( final Map<String, Variant> attributes, final OperationParameters operationParameters ) { return new InstantFuture<WriteAttributeResults> ( WriteAttributesHelper.errorUnhandled ( null, attributes ) ); }
@Override protected Map<String, Variant> getCacheAttributes () { return this.attributes.get (); }
@Override protected Map<String, Variant> getCacheAttributes () { return this.attributes.get (); }
@Override public Map<String, Variant> getAttributes () { return this.secondaryAttributes.get (); }
@Override public Map<String, Variant> getAttributes () { return this.attributes.get (); }