public class ScaleHandlerFactoryImpl extends AbstractServiceConfigurationFactory<AbstractMasterHandlerImpl>
AbstractServiceConfigurationFactory.Entry<T>
Modifier and Type | Field and Description |
---|---|
static String |
FACTORY_ID |
context
Constructor and Description |
---|
ScaleHandlerFactoryImpl(org.osgi.framework.BundleContext context,
ObjectPoolTracker<MasterItem> poolTracker,
org.osgi.util.tracker.ServiceTracker<ConfigurationAdministrator,ConfigurationAdministrator> caTracker,
int priority) |
Modifier and Type | Method and Description |
---|---|
protected AbstractServiceConfigurationFactory.Entry<AbstractMasterHandlerImpl> |
createService(UserInformation userInformation,
String configurationId,
org.osgi.framework.BundleContext context,
Map<String,String> parameters)
Create a new service instance
|
void |
dispose() |
protected void |
disposeService(UserInformation userInformation,
String id,
AbstractMasterHandlerImpl service)
Dispose a service
|
protected AbstractServiceConfigurationFactory.Entry<AbstractMasterHandlerImpl> |
updateService(UserInformation userInformation,
String configurationId,
AbstractServiceConfigurationFactory.Entry<AbstractMasterHandlerImpl> entry,
Map<String,String> parameters)
Update a service configuration
|
delete, getService, unregisterService, update
public static final String FACTORY_ID
public ScaleHandlerFactoryImpl(org.osgi.framework.BundleContext context, ObjectPoolTracker<MasterItem> poolTracker, org.osgi.util.tracker.ServiceTracker<ConfigurationAdministrator,ConfigurationAdministrator> caTracker, int priority) throws org.osgi.framework.InvalidSyntaxException
org.osgi.framework.InvalidSyntaxException
public void dispose()
dispose
in class AbstractServiceConfigurationFactory<AbstractMasterHandlerImpl>
protected AbstractServiceConfigurationFactory.Entry<AbstractMasterHandlerImpl> createService(UserInformation userInformation, String configurationId, org.osgi.framework.BundleContext context, Map<String,String> parameters) throws Exception
AbstractServiceConfigurationFactory
The 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<AbstractMasterHandlerImpl>
configurationId
- the configuration id for which the service should be createdcontext
- the bundle contextparameters
- the initial parametersnull
Exception
- if anything goes wrongprotected AbstractServiceConfigurationFactory.Entry<AbstractMasterHandlerImpl> updateService(UserInformation userInformation, String configurationId, AbstractServiceConfigurationFactory.Entry<AbstractMasterHandlerImpl> entry, Map<String,String> parameters) throws Exception
AbstractServiceConfigurationFactory
If a new service entry is returned the old one will get disposed after the call returns
updateService
in class AbstractServiceConfigurationFactory<AbstractMasterHandlerImpl>
configurationId
- the configuration to updateentry
- the original service entryparameters
- the new parametersnull
if the entry did not
changeException
- if anything goes wrongprotected void disposeService(UserInformation userInformation, String id, AbstractMasterHandlerImpl service)
AbstractServiceConfigurationFactory
If the service entry contains a service handle, the service is automatically unregistered.
disposeService
in class AbstractServiceConfigurationFactory<AbstractMasterHandlerImpl>
Copyright © 2016 Eclipse NeoSCADA Project. All rights reserved.