public abstract class AbstractMasterHandlerImpl extends Object implements MasterItemHandler
Modifier and Type | Field and Description |
---|---|
protected Map<String,Variant> |
eventAttributes |
Constructor and Description |
---|
AbstractMasterHandlerImpl(ObjectPoolTracker<MasterItem> poolTracker) |
AbstractMasterHandlerImpl(ObjectPoolTracker<MasterItem> poolTracker,
int defaultPriority) |
Modifier and Type | Method and Description |
---|---|
protected void |
addItem(MasterItem item) |
protected void |
createTrackers(String[] masterIds) |
abstract void |
dataUpdate(Map<String,Object> context,
DataItemValue.Builder value)
Called when data changed or the handler chain changed.
|
void |
dispose() |
protected Collection<MasterItem> |
getMasterItems()
Get an unmodifiable list of master items
|
WriteRequestResult |
processWrite(WriteRequest request)
Process the write request
|
protected boolean |
removeItem(MasterItem item) |
protected void |
reprocess() |
void |
update(UserInformation userInformation,
Map<String,String> parameters) |
public AbstractMasterHandlerImpl(ObjectPoolTracker<MasterItem> poolTracker)
public AbstractMasterHandlerImpl(ObjectPoolTracker<MasterItem> poolTracker, int defaultPriority)
public void dispose()
public void update(UserInformation userInformation, Map<String,String> parameters) throws Exception
Exception
protected void createTrackers(String[] masterIds)
protected boolean removeItem(MasterItem item)
protected void addItem(MasterItem item)
protected Collection<MasterItem> getMasterItems()
protected void reprocess()
public abstract void dataUpdate(Map<String,Object> context, DataItemValue.Builder value)
MasterItemHandler
The call gets a context object provided which each handler can use to store context information of one calculation run. Each calculation run gets a fresh new context. The context is intended to pass data from one handler to the next.
Although the value parameter is a mutable type, the handler may only make changes inside the dataUpdate method.
dataUpdate
in interface MasterItemHandler
context
- the context objectvalue
- the changed valuepublic WriteRequestResult processWrite(WriteRequest request)
This implementation does nothing and can be overridden by derived implementations.
processWrite
in interface MasterItemHandler
request
- the write request to handleCopyright © 2016 Eclipse NeoSCADA Project. All rights reserved.