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 ItemFactorypublic WriteHandlerItem createOutput(String localId, Map<String,Variant> properties, WriteHandler writeHandler)
createOutput in interface ItemFactorypublic AttributeWriteHandlerItem createOutput(String localId, Map<String,Variant> properties, AttributeWriteHandler writeHandler)
public DataItemCommand createCommand(String localId, Map<String,Variant> properties)
createCommand in interface ItemFactorypublic WriteHandlerItem createInputOutput(String localId, Map<String,Variant> properties, WriteHandler writeHandler)
createInputOutput in interface ItemFactoryprotected void registerItem(DataItem newItem, String localId, Map<String,Variant> properties)
protected void fillProperties(Map<String,Variant> properties, Dictionary<String,String> props)
public void disposeAllItems()
ItemFactoryAfter a call to this method it is still possible to create new items
disposeAllItems in interface ItemFactorypublic void disposeItem(DataItem dataItem)
ItemFactoryIf the item was not created by this factory or was already disposed this is no error and no exception is thrown
disposeItem in interface ItemFactorydataItem - data item to disposepublic void dispose()
ItemFactoryAll 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