2009-01-09 1.2.0

org.eclipse.soda.dk.adapter.factory
Class AdapterFactory

java.lang.Object
  extended by ManagedServiceFactoryBundleActivator
      extended by org.eclipse.soda.dk.core.factory.CoreFactory
          extended by org.eclipse.soda.dk.adapter.factory.AdapterFactory
All Implemented Interfaces:
org.osgi.service.cm.ManagedServiceFactory

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

Since:
1.0
Version:
1.2.0

Field Summary
static java.lang.String[] IMPORTED_SERVICES
          Define the imported services (String[]) constant.
static java.lang.String[] OPTIONAL_SERVICE
          Define the optional service (String[]) constant.
 
Fields inherited from class org.eclipse.soda.dk.core.factory.CoreFactory
CHANGES_MAJOR, CHANGES_MINOR, CHANGES_NONE, CONFIGURATION_ADMIN_SERVICE, ID_KEY, ID_KEY_FILTER, ids, METATYPE_SERVICE, OPTIONAL_SERVICES
 
Constructor Summary
AdapterFactory()
           
 
Method Summary
 java.lang.Object create(java.lang.String pid, java.util.Dictionary properties, IBundleActivationManager manager)
          Create with the specified pid, properties and manager parameters and return the Object result.
 AdapterService createService(DeviceService device)
          Create service with the specified device parameter and return the AdapterService result.
 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.
 java.lang.String getDeviceServiceName()
          Method getDeviceServiceName.
 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.
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.
 java.lang.String getServiceName()
          Return the service name.
 java.lang.String[] getServiceNames()
          Gets the service names (String[]) value.
 java.lang.Object update(java.lang.String pid, java.lang.Object object, java.util.Dictionary oldProperties, java.util.Dictionary properties, IBundleActivationManager manager)
          Update with the specified PID, object, old properties, properties and manager parameters and return the Object result.
 
Methods inherited from class org.eclipse.soda.dk.core.factory.CoreFactory
compare, createAdvisor, createImportedServiceFilters, createProperties, getExportedServiceNames, getIds, getImportedServiceNames, getMinorProperties, handleAcquiredOptionalImportedService, handleAcquiredOptionalImportedService, handleReleasedOptionalImportedService, handleReleasedOptionalImportedService, setIds, updateProperties, updateProperties, validateConfiguration, validateConfigurationIds
 
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

IMPORTED_SERVICES

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


OPTIONAL_SERVICE

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

Constructor Detail

AdapterFactory

public AdapterFactory()
Method Detail

create

public java.lang.Object create(java.lang.String pid,
                               java.util.Dictionary properties,
                               IBundleActivationManager manager)
Create with the specified pid, properties and manager parameters and return the Object result. The pid (String) parameter. The properties (Dictionary) parameter. The manager (IBundleActivationManager) parameter.

Parameters:
pid - The PID (String) parameter.
properties - The properties (Dictionary) parameter.
manager - The manager (IBundleActivationManager) parameter.
Returns:
Results of the create (Object) value.

createService

public AdapterService createService(DeviceService device)
Create service with the specified device parameter and return the AdapterService result.

Parameters:
device - The device (DeviceService) parameter.
Returns:
Results of the create service (Object) value.
See Also:
#createService(IBundleActivationManager)

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.

Overrides:
destroy in class CoreFactory
Parameters:
pid - The PID (String) parameter.
object - The object (Object) parameter.
properties - The properties (Dictionary) parameter.
manager - The manager (IBundleActivationManager) parameter.

getDeviceServiceName

public java.lang.String getDeviceServiceName()
Method getDeviceServiceName.

Returns:
Results of the get transport service name (String) value.

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.

Overrides:
getImportedServiceNames in class CoreFactory
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:
getOptionalImportedServiceNames(), getOptionalImportedServiceNames(String,Dictionary,Dictionary,IBundleActivationManager)

getInterestServiceName

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

Overrides:
getInterestServiceName in class CoreFactory
Returns:
The interest service name (String) value.

getOptionalImportedServiceNames

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

Overrides:
getOptionalImportedServiceNames in class CoreFactory
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.

Overrides:
getOptionalImportedServiceNames in class CoreFactory
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()

getServiceName

public java.lang.String getServiceName()
Return the service name.

Returns:
Results of the get service name (String) value.
See Also:
getDeviceServiceName(), getInterestServiceName()

getServiceNames

public java.lang.String[] getServiceNames()
Gets the service names (String[]) value.

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

update

public java.lang.Object update(java.lang.String pid,
                               java.lang.Object object,
                               java.util.Dictionary oldProperties,
                               java.util.Dictionary properties,
                               IBundleActivationManager manager)
Update with the specified PID, object, old properties, properties and manager parameters and return the Object result.

Parameters:
pid - The PID (String) parameter.
object - The object (Object) parameter.
oldProperties - The old properties (Dictionary) parameter.
properties - The properties (Dictionary) parameter.
manager - The manager (IBundleActivationManager) parameter.
Returns:
Results of the update (Object) value.

2009-01-09 1.2.0

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