2009-01-09 1.2.0

org.eclipse.soda.dk.core.factory
Class CoreFactory

java.lang.Object
  extended by ManagedServiceFactoryBundleActivator
      extended by org.eclipse.soda.dk.core.factory.CoreFactory
All Implemented Interfaces:
org.osgi.service.cm.ManagedServiceFactory
Direct Known Subclasses:
AdapterFactory, AgentFactory, ConnectionFactory, CoreFactoryChild, DeviceFactory, ProfileFactory, TransportFactory

public abstract class CoreFactory
extends ManagedServiceFactoryBundleActivator
implements org.osgi.service.cm.ManagedServiceFactory

The ConnectionBundle is the standard Bundle Activator for all other transport bundle activators to subclass.

Since:
1.0
Version:
1.2.0

Field Summary
static int CHANGES_MAJOR
          Define the changes major (int) constant.
static int CHANGES_MINOR
          Define the changes minor (int) constant.
static int CHANGES_NONE
          Define the changes none (int) constant.
static java.lang.String CONFIGURATION_ADMIN_SERVICE
          Define the configuration admin service (String) constant.
static java.lang.String ID_KEY
          Define the id key (String) constant.
static java.lang.String ID_KEY_FILTER
          Define the id key filter (String) constant.
protected  java.util.Map ids
          Define the ids (Hashtable) field.
static java.lang.String[] IMPORTED_SERVICES
          Define the imported services (String[]) constant.
static java.lang.String METATYPE_SERVICE
          Define the metatype service (String) constant.
static java.lang.String[] OPTIONAL_SERVICES
          Define the optional service (String[]) constant.
 
Constructor Summary
protected CoreFactory()
          Constructs an instance of this class.
 
Method Summary
 int compare(java.util.Dictionary oldProperties, java.util.Dictionary properties, java.util.Dictionary minorProperties)
          Compare with the specified old properties and properties parameters and return the int result.
protected  IManagedServiceFactoryAdvisor createAdvisor()
           
 void createImportedServiceFilters(java.lang.String pid, java.util.Dictionary oldProperties, java.util.Dictionary properties, IBundleActivationManager manager)
          Create imported service filters with the specified pid, old properties, properties and manager parameters.
 java.util.Hashtable createProperties()
          Create the properties.
 void destroy(java.lang.String pid, java.lang.Object object, java.util.Dictionary properties, IBundleActivationManager manager)
          Destroy with the specified pid, object, properties and manager parameters.
abstract  java.lang.String[] getExportedServiceNames(java.lang.String pid, java.util.Dictionary oldProperties, java.util.Dictionary properties, IBundleActivationManager manager)
          Gets the service names (String[]) value.
 java.util.Map getIds()
          Gets the IDs (Map) value.
protected  java.lang.String[] getImportedServiceNames()
          Gets the imported service names (String[]) value.
 java.lang.String[] getImportedServiceNames(java.lang.String arg0, java.util.Dictionary arg1, java.util.Dictionary arg2, IBundleActivationManager manager)
          Get imported service names with the specified arg0, arg1, arg2 and manager parameters and return the String[] result.
 java.lang.String getInterestServiceName()
          Gets the interest service name (String) value.
 java.util.Dictionary getMinorProperties()
          Gets the minor properties (Dictionary) value.
protected  java.lang.String[] getOptionalImportedServiceNames()
          Gets the optional imported service names (String[]) value.
 java.lang.String[] getOptionalImportedServiceNames(java.lang.String arg0, java.util.Dictionary arg1, java.util.Dictionary arg2, IBundleActivationManager arg3)
          Get optional imported service names with the specified arg0, arg1, arg2 and arg3 parameters and return the String[] result.
protected  void handleAcquiredOptionalImportedService(java.lang.String serviceName, java.lang.Object service)
          Handle acquired optional imported service with the specified service name and service parameters.
 void handleAcquiredOptionalImportedService(java.lang.String arg0, java.lang.Object arg1, java.lang.String arg2, java.lang.Object arg3, IBundleActivationManager arg4)
          Handle acquired optional imported service with the specified arg0, arg1, arg2, arg3 and arg4 parameters.
protected  void handleReleasedOptionalImportedService(java.lang.String serviceName, java.lang.Object service)
          Handle released optional imported service with the specified service name and service parameters.
 void handleReleasedOptionalImportedService(java.lang.String arg0, java.lang.Object arg1, java.lang.String arg2, java.lang.Object arg3, IBundleActivationManager arg4)
          Handle released optional imported service with the specified arg0, arg1, arg2, arg3 and arg4 parameters.
 void setIds(java.util.Hashtable ids)
          Sets the IDs value.
 void updateProperties(java.util.Dictionary table, java.util.Dictionary from)
          Update properties with the specified table and from parameters.
 void updateProperties(java.util.Dictionary table, java.util.Map from)
          Update properties with the specified table and from parameters.
 void validateConfiguration(java.lang.String pid, java.util.Dictionary properties)
          Validate configuration with the specified pid and properties parameters.
 void validateConfigurationIds(java.lang.String pid, java.util.Dictionary properties)
          Validate configuration ids with the specified pid and properties parameters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.osgi.service.cm.ManagedServiceFactory
deleted, getName, updated
 

Field Detail

CHANGES_NONE

public static final int CHANGES_NONE
Define the changes none (int) constant.

See Also:
Constant Field Values

CHANGES_MINOR

public static final int CHANGES_MINOR
Define the changes minor (int) constant.

See Also:
Constant Field Values

CHANGES_MAJOR

public static final int CHANGES_MAJOR
Define the changes major (int) constant.

See Also:
Constant Field Values

METATYPE_SERVICE

public static final java.lang.String METATYPE_SERVICE
Define the metatype service (String) constant.


CONFIGURATION_ADMIN_SERVICE

public static final java.lang.String CONFIGURATION_ADMIN_SERVICE
Define the configuration admin service (String) constant.


IMPORTED_SERVICES

public static final java.lang.String[] IMPORTED_SERVICES
Define the imported services (String[]) constant.


OPTIONAL_SERVICES

public static final java.lang.String[] OPTIONAL_SERVICES
Define the optional service (String[]) constant.


ID_KEY_FILTER

public static final java.lang.String ID_KEY_FILTER
Define the id key filter (String) constant.

See Also:
Constant Field Values

ID_KEY

public static final java.lang.String ID_KEY
Define the id key (String) constant.

See Also:
Constant Field Values

ids

protected java.util.Map ids
Define the ids (Hashtable) field.

Constructor Detail

CoreFactory

protected CoreFactory()
Constructs an instance of this class.

Method Detail

compare

public int compare(java.util.Dictionary oldProperties,
                   java.util.Dictionary properties,
                   java.util.Dictionary minorProperties)
Compare with the specified old properties and properties parameters and return the int result.

Parameters:
oldProperties - The old properties (Dictionary) parameter.
properties - The properties (Dictionary) parameter.
minorProperties - The minor properties (Dictionary) parameter.
Returns:
Results of the compare (int) value.

createAdvisor

protected IManagedServiceFactoryAdvisor createAdvisor()
Returns:
Results of the create advisor (IManagedServiceFactoryAdvisor) value.
See Also:
org.eclipse.soda.sat.core.framework.ManagedServiceFactoryBundleActivator#createAdvisor()

createImportedServiceFilters

public void createImportedServiceFilters(java.lang.String pid,
                                         java.util.Dictionary oldProperties,
                                         java.util.Dictionary properties,
                                         IBundleActivationManager manager)
Create imported service filters with the specified pid, old properties, properties and manager parameters.

Parameters:
pid - The PID (String) parameter.
oldProperties - The old properties (Dictionary) parameter.
properties - The properties (Dictionary) parameter.
manager - The manager (IBundleActivationManager) parameter.

createProperties

public java.util.Hashtable createProperties()
Create the properties.

Returns:
Results of the create properties (Hashtable).
See Also:
getMinorProperties(), updateProperties(Dictionary,Dictionary), updateProperties(Dictionary,Map)

destroy

public void destroy(java.lang.String pid,
                    java.lang.Object object,
                    java.util.Dictionary properties,
                    IBundleActivationManager manager)
Destroy with the specified pid, object, properties and manager parameters.

Parameters:
pid - The PID (String) parameter.
object - The object (Object) parameter.
properties - The properties (Dictionary) parameter.
manager - The manager (IBundleActivationManager) parameter.

getExportedServiceNames

public abstract java.lang.String[] getExportedServiceNames(java.lang.String pid,
                                                           java.util.Dictionary oldProperties,
                                                           java.util.Dictionary properties,
                                                           IBundleActivationManager manager)
Gets the service names (String[]) value.

Parameters:
pid - The PID (String) parameter.
oldProperties - The old properties (Dictionary) parameter.
properties - The properties (Dictionary) parameter.
manager - The manager (IBundleActivationManager) parameter.
Returns:
The service names (String[]) value. The manager (IBundleActivationManager) parameter.

getIds

public java.util.Map getIds()
Gets the IDs (Map) value.

Returns:
The ids (Map) value.
See Also:
setIds(Hashtable), validateConfigurationIds(String,Dictionary)

getImportedServiceNames

protected java.lang.String[] getImportedServiceNames()
Gets the imported service names (String[]) value.

Returns:
The imported service names (String[]) value.
See Also:
getImportedServiceNames(String,Dictionary,Dictionary,IBundleActivationManager), getOptionalImportedServiceNames(), getOptionalImportedServiceNames(String,Dictionary,Dictionary,IBundleActivationManager)

getImportedServiceNames

public java.lang.String[] getImportedServiceNames(java.lang.String arg0,
                                                  java.util.Dictionary arg1,
                                                  java.util.Dictionary arg2,
                                                  IBundleActivationManager manager)
Get imported service names with the specified arg0, arg1, arg2 and manager parameters and return the String[] result.

Parameters:
arg0 - The arg0 (String) parameter.
arg1 - The arg1 (Dictionary) parameter.
arg2 - The arg2 (Dictionary) parameter.
manager - The manager (IBundleActivationManager) parameter.
Returns:
Results of the get imported service names (String[]) value.
See Also:
getImportedServiceNames(), getOptionalImportedServiceNames(), getOptionalImportedServiceNames(String,Dictionary,Dictionary,IBundleActivationManager)

getInterestServiceName

public java.lang.String getInterestServiceName()
Gets the interest service name (String) value.

Returns:
The interest service name (String) value.

getMinorProperties

public java.util.Dictionary getMinorProperties()
Gets the minor properties (Dictionary) value.

Returns:
The minor properties (Dictionary) value.

getOptionalImportedServiceNames

protected java.lang.String[] getOptionalImportedServiceNames()
Gets the optional imported service names (String[]) value.

Returns:
The optional imported service names (String[]) value.
See Also:
getOptionalImportedServiceNames(String,Dictionary,Dictionary,IBundleActivationManager)

getOptionalImportedServiceNames

public java.lang.String[] getOptionalImportedServiceNames(java.lang.String arg0,
                                                          java.util.Dictionary arg1,
                                                          java.util.Dictionary arg2,
                                                          IBundleActivationManager arg3)
Get optional imported service names with the specified arg0, arg1, arg2 and arg3 parameters and return the String[] result.

Parameters:
arg0 - The arg0 (String) parameter.
arg1 - The arg1 (Dictionary) parameter.
arg2 - The arg2 (Dictionary) parameter.
arg3 - The arg3 (IBundleActivationManager) parameter.
Returns:
Results of the get optional imported service names (String[]) value.
See Also:
getOptionalImportedServiceNames()

handleAcquiredOptionalImportedService

protected void handleAcquiredOptionalImportedService(java.lang.String serviceName,
                                                     java.lang.Object service)
Handle acquired optional imported service with the specified service name and service parameters.

Parameters:
serviceName - The service name (String) parameter.
service - The service (Object) parameter.
See Also:
handleAcquiredOptionalImportedService(String,Object,String,Object,IBundleActivationManager)

handleAcquiredOptionalImportedService

public void handleAcquiredOptionalImportedService(java.lang.String arg0,
                                                  java.lang.Object arg1,
                                                  java.lang.String arg2,
                                                  java.lang.Object arg3,
                                                  IBundleActivationManager arg4)
Handle acquired optional imported service with the specified arg0, arg1, arg2, arg3 and arg4 parameters.

Parameters:
arg0 - The arg0 (String) parameter.
arg1 - The arg1 (Object) parameter.
arg2 - The arg2 (String) parameter.
arg3 - The arg3 (Object) parameter.
arg4 - The arg4 (IBundleActivationManager) parameter.
See Also:
handleAcquiredOptionalImportedService(String,Object)

handleReleasedOptionalImportedService

protected void handleReleasedOptionalImportedService(java.lang.String serviceName,
                                                     java.lang.Object service)
Handle released optional imported service with the specified service name and service parameters.

Parameters:
serviceName - The service name (String) parameter.
service - The service (Object) parameter.
See Also:
handleReleasedOptionalImportedService(String,Object,String,Object,IBundleActivationManager)

handleReleasedOptionalImportedService

public void handleReleasedOptionalImportedService(java.lang.String arg0,
                                                  java.lang.Object arg1,
                                                  java.lang.String arg2,
                                                  java.lang.Object arg3,
                                                  IBundleActivationManager arg4)
Handle released optional imported service with the specified arg0, arg1, arg2, arg3 and arg4 parameters.

Parameters:
arg0 - The arg0 (String) parameter.
arg1 - The arg1 (Object) parameter.
arg2 - The arg2 (String) parameter.
arg3 - The arg3 (Object) parameter.
arg4 - The arg4 (IBundleActivationManager) parameter.
See Also:
handleReleasedOptionalImportedService(String,Object)

setIds

public void setIds(java.util.Hashtable ids)
Sets the IDs value.

Parameters:
ids - The IDs (Hashtable) parameter.
See Also:
getIds(), validateConfigurationIds(String,Dictionary)

updateProperties

public void updateProperties(java.util.Dictionary table,
                             java.util.Dictionary from)
Update properties with the specified table and from parameters.

Parameters:
table - The table (Dictionary) parameter.
from - The from (Dictionary) parameter.
See Also:
createProperties(), getMinorProperties(), updateProperties(Dictionary,Map)

updateProperties

public void updateProperties(java.util.Dictionary table,
                             java.util.Map from)
Update properties with the specified table and from parameters.

Parameters:
table - The table (Dictionary) parameter.
from - The from (Map) parameter.
See Also:
createProperties(), getMinorProperties(), updateProperties(Dictionary,Dictionary)

validateConfiguration

public void validateConfiguration(java.lang.String pid,
                                  java.util.Dictionary properties)
                           throws org.osgi.service.cm.ConfigurationException
Validate configuration with the specified pid and properties parameters.

Parameters:
pid - The PID (String) parameter.
properties - The properties (Dictionary) parameter.
Throws:
org.osgi.service.cm.ConfigurationException - Configuration Exception.

validateConfigurationIds

public void validateConfigurationIds(java.lang.String pid,
                                     java.util.Dictionary properties)
Validate configuration ids with the specified pid and properties parameters.

Parameters:
pid - The PID (String) parameter.
properties - The properties (Dictionary) parameter.

2009-01-09 1.2.0

Copyright (c) 2009 IBM. See license in Legal section.