public class ObjectPoolDataItemFactory extends Object implements ItemFactory
| Constructor and Description |
|---|
ObjectPoolDataItemFactory(Executor executor,
ManageableObjectPool<DataItem> objectPool,
String prefix) |
| 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) |
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 String |
getId(String localId) |
protected void |
unregisterItem(DataItem dataItem) |
public ObjectPoolDataItemFactory(Executor executor, ManageableObjectPool<DataItem> objectPool, String prefix)
public DataItemCommand createCommand(String localId, Map<String,Variant> properties)
createCommand in interface ItemFactorypublic DataItemInputChained createInput(String localId, Map<String,Variant> properties)
createInput in interface ItemFactorypublic WriteHandlerItem createInputOutput(String localId, Map<String,Variant> properties, WriteHandler writeHandler)
createInputOutput in interface ItemFactorypublic WriteHandlerItem createOutput(String localId, Map<String,Variant> properties, WriteHandler writeHandler)
createOutput in interface ItemFactoryprotected void unregisterItem(DataItem dataItem)
public 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 ItemFactorypublic 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 dispose