public class MasterFactory extends AbstractServiceConfigurationFactory<ModbusMaster>
| Modifier and Type | Class and Description |
|---|---|
static interface |
MasterFactory.Listener |
AbstractServiceConfigurationFactory.Entry<T>context| Constructor and Description |
|---|
MasterFactory(org.osgi.framework.BundleContext context,
ScheduledExecutorService executor,
org.apache.mina.transport.socket.nio.NioProcessor processor) |
| Modifier and Type | Method and Description |
|---|---|
void |
addMasterListener(MasterFactory.Listener listener) |
protected AbstractServiceConfigurationFactory.Entry<ModbusMaster> |
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 configurationId,
ModbusMaster service)
Dispose a service
|
void |
removeMasterListener(MasterFactory.Listener listener) |
void |
resend(MasterFactory.Listener listener) |
protected AbstractServiceConfigurationFactory.Entry<ModbusMaster> |
updateService(UserInformation userInformation,
String configurationId,
AbstractServiceConfigurationFactory.Entry<ModbusMaster> entry,
Map<String,String> parameters)
Update a service configuration
|
delete, dispose, getService, unregisterService, updatepublic MasterFactory(org.osgi.framework.BundleContext context,
ScheduledExecutorService executor,
org.apache.mina.transport.socket.nio.NioProcessor processor)
protected AbstractServiceConfigurationFactory.Entry<ModbusMaster> 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<ModbusMaster>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 configurationId, ModbusMaster service)
AbstractServiceConfigurationFactoryIf the service entry contains a service handle, the service is automatically unregistered.
disposeService in class AbstractServiceConfigurationFactory<ModbusMaster>protected AbstractServiceConfigurationFactory.Entry<ModbusMaster> updateService(UserInformation userInformation, String configurationId, AbstractServiceConfigurationFactory.Entry<ModbusMaster> 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<ModbusMaster>configurationId - the configuration to updateentry - the original service entryparameters - the new parametersnull if the entry did not
changeException - if anything goes wrongpublic void addMasterListener(MasterFactory.Listener listener)
public void removeMasterListener(MasterFactory.Listener listener)
public void resend(MasterFactory.Listener listener)
Copyright © 2016 Eclipse NeoSCADA Project. All rights reserved.