public abstract class AbstractCommonHandlerImpl extends AbstractConfigurableMasterHandlerImpl
Modifier and Type | Class and Description |
---|---|
static class |
AbstractCommonHandlerImpl.AbstractConfiguration |
eventAttributes
Constructor and Description |
---|
AbstractCommonHandlerImpl(String configurationId,
ObjectPoolTracker<MasterItem> poolTracker,
int priority,
org.osgi.util.tracker.ServiceTracker<ConfigurationAdministrator,ConfigurationAdministrator> caTracker,
String prefix,
String factoryId) |
Modifier and Type | Method and Description |
---|---|
protected Event.EventBuilder |
createEventBuilder()
Create a pre-filled event builder
|
void |
dataUpdate(Map<String,Object> context,
DataItemValue.Builder builder)
Called when data changed or the handler chain changed.
|
protected void |
injectEventAttributes(Event.EventBuilder builder) |
protected abstract void |
processDataUpdate(Map<String,Object> context,
DataItemValue.Builder builder) |
getPrefixed, handleUpdate, processWrite, updateConfiguration, updateConfiguration
addItem, createTrackers, dispose, getMasterItems, removeItem, reprocess, update
public AbstractCommonHandlerImpl(String configurationId, ObjectPoolTracker<MasterItem> poolTracker, int priority, org.osgi.util.tracker.ServiceTracker<ConfigurationAdministrator,ConfigurationAdministrator> caTracker, String prefix, String factoryId)
protected abstract void processDataUpdate(Map<String,Object> context, DataItemValue.Builder builder) throws Exception
Exception
protected Event.EventBuilder createEventBuilder()
protected void injectEventAttributes(Event.EventBuilder builder)
public void dataUpdate(Map<String,Object> context, DataItemValue.Builder builder)
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
dataUpdate
in class AbstractMasterHandlerImpl
context
- the context objectbuilder
- the changed valueCopyright © 2016 Eclipse NeoSCADA Project. All rights reserved.