public abstract class AbstractMonitorFactory extends AbstractServiceConfigurationFactory<DataItemMonitor> implements AknHandler
AbstractServiceConfigurationFactory.Entry<T>| Modifier and Type | Field and Description |
|---|---|
protected org.osgi.framework.BundleContext |
context |
protected EventProcessor |
eventProcessor |
| Constructor and Description |
|---|
AbstractMonitorFactory(org.osgi.framework.BundleContext context,
ManageableObjectPool<MonitorService> servicePool,
EventProcessor eventProcessor) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
acknowledge(String monitorId,
OperationParameters operationParameters,
Date aknTimestamp)
Perform acknowledge of monitor
|
protected abstract DataItemMonitor |
createInstance(String configurationId,
EventProcessor eventProcessor) |
protected AbstractServiceConfigurationFactory.Entry<DataItemMonitor> |
createService(UserInformation userInformation,
String configurationId,
org.osgi.framework.BundleContext context,
Map<String,String> parameters)
Create a new service instance
|
protected void |
disposeService(UserInformation userInformation,
String id,
DataItemMonitor service)
Dispose a service
|
protected AbstractServiceConfigurationFactory.Entry<DataItemMonitor> |
updateService(UserInformation userInformation,
String configurationId,
AbstractServiceConfigurationFactory.Entry<DataItemMonitor> entry,
Map<String,String> parameters)
Update a service configuration
|
delete, dispose, getService, unregisterService, updateprotected final org.osgi.framework.BundleContext context
protected final EventProcessor eventProcessor
public AbstractMonitorFactory(org.osgi.framework.BundleContext context,
ManageableObjectPool<MonitorService> servicePool,
EventProcessor eventProcessor)
protected abstract DataItemMonitor createInstance(String configurationId, EventProcessor eventProcessor)
protected AbstractServiceConfigurationFactory.Entry<DataItemMonitor> createService(UserInformation userInformation, String configurationId, org.osgi.framework.BundleContext context, Map<String,String> parameters) throws Exception
AbstractServiceConfigurationFactoryThe method must also register the service with the OSGi bundle context if needed. The service registration must then be placed into the result that is returned. This is an optional step. There is no need to register the created service.
createService in class AbstractServiceConfigurationFactory<DataItemMonitor>configurationId - the configuration id for which the service should be createdcontext - the bundle contextparameters - the initial parametersnullException - if anything goes wrongprotected void disposeService(UserInformation userInformation, String id, DataItemMonitor service)
AbstractServiceConfigurationFactoryIf the service entry contains a service handle, the service is automatically unregistered.
disposeService in class AbstractServiceConfigurationFactory<DataItemMonitor>protected AbstractServiceConfigurationFactory.Entry<DataItemMonitor> updateService(UserInformation userInformation, String configurationId, AbstractServiceConfigurationFactory.Entry<DataItemMonitor> entry, Map<String,String> parameters) throws Exception
AbstractServiceConfigurationFactoryIf a new service entry is returned the old one will get disposed after the call returns
updateService in class AbstractServiceConfigurationFactory<DataItemMonitor>configurationId - the configuration to updateentry - the original service entryparameters - the new parametersnull if the entry did not
changeException - if anything goes wrongpublic boolean acknowledge(String monitorId, OperationParameters operationParameters, Date aknTimestamp)
AknHandleracknowledge in interface AknHandlermonitorId - the monitor to acknowledgeoperationParameters - the effective operation parametersaknTimestamp - the timestamp until which the state is acknowledgedtrue if the monitor was found and processed,
false otherwiseCopyright © 2015 Eclipse SCADA Project. All rights reserved.