2009-10-01 1.2.0

org.eclipse.soda.dk.generic.io.adapter.factory
Class GenericIoAdapterFactory

java.lang.Object
  extended by AdapterFactory
      extended by org.eclipse.soda.dk.generic.io.adapter.factory.GenericIoAdapterFactory
All Implemented Interfaces:
BundleActivator

public class GenericIoAdapterFactory
extends AdapterFactory
implements BundleActivator

Generic Digital and Analog I/O Device.

The device bundle activator class creates and registers the GenericIoAdapter device.

The list of exported services:

Since:
1.0
Version:
1.2.0
See Also:
GenericIoAdapterService, org.eclipse.soda.dk.adapter.service.AdapterService

Field Summary
static java.lang.String CLASS_NAME
          Defines the full class name.
static java.lang.String[] EXPORTED_SERVICE_NAMES
          Defines the service name(s) to be registered by the GenericIoAdapter bundle.
static java.lang.String[] IMPORTED_SERVICE_NAMES
          Defines the imported service name(s) to be registered by the GenericIoAdapter bundle.
 
Constructor Summary
GenericIoAdapterFactory()
           
 
Method Summary
 java.util.Hashtable createProperties()
          Gets the properties to be registered with the service(s).
 AdapterService createService(DeviceService deviceService)
          Creates the adapter using the specified device service.
 java.lang.String[] getExportedServiceNames(java.lang.String pid, java.util.Dictionary oldProperties, java.util.Dictionary properties, IBundleActivationManager manager)
          Return the exported service name(s) to be registered by the GenericIoAdapter bundle.
protected  java.lang.String[] getImportedServiceNames()
          Gets the imported service names (String[]) value.
 java.lang.String[] getImportedServiceNames(java.lang.String pid, java.util.Dictionary oldProperties, java.util.Dictionary properties, IBundleActivationManager manager)
          Return the imported service name(s) to be registered by the GenericIoAdapter bundle.
 java.lang.String getInterestServiceName()
          Return the device service name used by this bundle.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.osgi.framework.BundleActivator
start, stop
 

Field Detail

CLASS_NAME

public static final java.lang.String CLASS_NAME
Defines the full class name.

See Also:
Constant Field Values

EXPORTED_SERVICE_NAMES

public static final java.lang.String[] EXPORTED_SERVICE_NAMES
Defines the service name(s) to be registered by the GenericIoAdapter bundle.
org.eclipse.soda.dk.adapter.service.AdapterService
org.eclipse.soda.dk.generic.io.adapter.service.GenericIoAdapterService


IMPORTED_SERVICE_NAMES

public static final java.lang.String[] IMPORTED_SERVICE_NAMES
Defines the imported service name(s) to be registered by the GenericIoAdapter bundle.
org.eclipse.soda.dk.generic.io.device.service.GenericIoDeviceService
org.eclipse.soda.dk.notification.service.NotificationService

Constructor Detail

GenericIoAdapterFactory

public GenericIoAdapterFactory()
Method Detail

createProperties

public java.util.Hashtable createProperties()
Gets the properties to be registered with the service(s).

Returns:
Hashtable of properties.
org.osgi.framework.Constants.SERVICE_PID GenericIoAdapterService.SERVICE_NAME
org.osgi.framework.Constants.SERVICE_DESCRIPTION GenericIoAdapterService.SERVICE_DESCRIPTION
org.osgi.framework.Constants.SERVICE_VENDOR IBM
org.osgi.framework.Constants.SERVICE_RANKING 6

createService

public AdapterService createService(DeviceService deviceService)
Creates the adapter using the specified device service.

Parameters:
deviceService - The device service to used when creating the adatper service.
Returns:
Object The adapter service created by this bundle.
See Also:
GenericIoAdapter

getExportedServiceNames

public java.lang.String[] getExportedServiceNames(java.lang.String pid,
                                                  java.util.Dictionary oldProperties,
                                                  java.util.Dictionary properties,
                                                  IBundleActivationManager manager)
Return the exported service name(s) to be registered by the GenericIoAdapter bundle.

Parameters:
pid - pid.
oldProperties - old properties.
properties - properties.
manager - manager.
Returns:
String[] The device's service names.

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)

getImportedServiceNames

public java.lang.String[] getImportedServiceNames(java.lang.String pid,
                                                  java.util.Dictionary oldProperties,
                                                  java.util.Dictionary properties,
                                                  IBundleActivationManager manager)
Return the imported service name(s) to be registered by the GenericIoAdapter bundle.

Parameters:
pid - pid.
oldProperties - old properties.
properties - properties.
manager - manager.
Returns:
String[] The imported service names.
See Also:
getImportedServiceNames()

getInterestServiceName

public java.lang.String getInterestServiceName()
Return the device service name used by this bundle.

Returns:
String The interest service name.
See Also:
GenericIoDeviceService

2009-10-01 1.2.0

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