public class BlockHandlerImpl extends AbstractCommonHandlerImpl
AbstractCommonHandlerImpl.AbstractConfiguration
eventAttributes
Constructor and Description |
---|
BlockHandlerImpl(String configurationId,
EventProcessor eventProcessor,
ObjectPoolTracker<MasterItem> poolTracker,
int priority,
org.osgi.util.tracker.ServiceTracker<ConfigurationAdministrator,ConfigurationAdministrator> caTracker) |
Modifier and Type | Method and Description |
---|---|
protected Event.EventBuilder |
createEvent(UserInformation user,
String message,
Object value) |
protected WriteAttributeResults |
handleUpdate(Map<String,Variant> attributes,
OperationParameters operationParameters)
This method will be called on write request that have attributes which
match our prefix.
|
protected void |
injectAttributes(DataItemValue.Builder builder) |
protected void |
processDataUpdate(Map<String,Object> context,
DataItemValue.Builder builder) |
WriteRequestResult |
processWrite(WriteRequest request)
Process the write request
|
protected void |
publishEvent(UserInformation user,
String message,
Object value,
String eventType) |
void |
update(UserInformation userInformation,
Map<String,String> parameters) |
protected <T> T |
updateValue(UserInformation userInformation,
String message,
T newValue,
T oldValue) |
createEventBuilder, dataUpdate, injectEventAttributes
getPrefixed, updateConfiguration, updateConfiguration
addItem, createTrackers, dispose, getMasterItems, removeItem, reprocess
public BlockHandlerImpl(String configurationId, EventProcessor eventProcessor, ObjectPoolTracker<MasterItem> poolTracker, int priority, org.osgi.util.tracker.ServiceTracker<ConfigurationAdministrator,ConfigurationAdministrator> caTracker)
protected void processDataUpdate(Map<String,Object> context, DataItemValue.Builder builder) throws Exception
processDataUpdate
in class AbstractCommonHandlerImpl
Exception
public WriteRequestResult processWrite(WriteRequest request)
AbstractMasterHandlerImpl
This implementation does nothing and can be overridden by derived implementations.
processWrite
in interface MasterItemHandler
processWrite
in class AbstractConfigurableMasterHandlerImpl
request
- the write request to handlepublic void update(UserInformation userInformation, Map<String,String> parameters) throws Exception
update
in class AbstractMasterHandlerImpl
Exception
protected <T> T updateValue(UserInformation userInformation, String message, T newValue, T oldValue)
protected void injectAttributes(DataItemValue.Builder builder)
protected WriteAttributeResults handleUpdate(Map<String,Variant> attributes, OperationParameters operationParameters) throws Exception
AbstractConfigurableMasterHandlerImpl
All attributes that are processed must be returned in the result
handleUpdate
in class AbstractConfigurableMasterHandlerImpl
attributes
- the filtered attributes that match our prefixException
- if anything goes wrongprotected void publishEvent(UserInformation user, String message, Object value, String eventType)
protected Event.EventBuilder createEvent(UserInformation user, String message, Object value)
Copyright © 2016 Eclipse NeoSCADA Project. All rights reserved.