public class DataItemFactory extends Object implements ItemFactory
Constructor and Description |
---|
DataItemFactory(BundleContext context,
Executor executor,
String globalId) |
Modifier and Type | Method and Description |
---|---|
DataItemCommand |
createCommand(String localId,
Map<String,Variant> properties) |
DataItemInputChained |
createInput(String localId,
Map<String,Variant> properties) |
WriteHandlerItem |
createInputOutput(String localId,
Map<String,Variant> properties,
WriteHandler writeHandler) |
AttributeWriteHandlerItem |
createOutput(String localId,
Map<String,Variant> properties,
AttributeWriteHandler writeHandler) |
WriteHandlerItem |
createOutput(String localId,
Map<String,Variant> properties,
WriteHandler writeHandler) |
void |
dispose()
Dispose the factory
|
void |
disposeAllItems()
Dispose all items at once
|
void |
disposeItem(DataItem dataItem)
Dispose an item if it was created by this factory
|
protected void |
fillProperties(Map<String,Variant> properties,
Dictionary<String,String> props) |
protected String |
getId(String localId) |
protected void |
registerItem(DataItem newItem,
String localId,
Map<String,Variant> properties) |
public DataItemFactory(BundleContext context, Executor executor, String globalId)
public DataItemInputChained createInput(String localId, Map<String,Variant> properties)
createInput
in interface ItemFactory
public WriteHandlerItem createOutput(String localId, Map<String,Variant> properties, WriteHandler writeHandler)
createOutput
in interface ItemFactory
public AttributeWriteHandlerItem createOutput(String localId, Map<String,Variant> properties, AttributeWriteHandler writeHandler)
public DataItemCommand createCommand(String localId, Map<String,Variant> properties)
createCommand
in interface ItemFactory
public WriteHandlerItem createInputOutput(String localId, Map<String,Variant> properties, WriteHandler writeHandler)
createInputOutput
in interface ItemFactory
protected void registerItem(DataItem newItem, String localId, Map<String,Variant> properties)
protected void fillProperties(Map<String,Variant> properties, Dictionary<String,String> props)
public void disposeAllItems()
ItemFactory
After a call to this method it is still possible to create new items
disposeAllItems
in interface ItemFactory
public void disposeItem(DataItem dataItem)
ItemFactory
If the item was not created by this factory or was already disposed this is no error and no exception is thrown
disposeItem
in interface ItemFactory
dataItem
- data item to disposepublic void dispose()
ItemFactory
All items that where created by this factory and where not disposed up to now are being disposed
After a call to this method it is not possible to create new items.
Multiple calls to ItemFactory.dispose()
or calls to
ItemFactory.disposeAllItems()
are possible.
dispose
in interface ItemFactory