1.0.0

org.eclipse.soda.dk.device.bundle
Class DeviceBundle

java.lang.Object
  extended by BaseBundleActivator
      extended by org.eclipse.soda.dk.device.bundle.DeviceBundle
All Implemented Interfaces:
org.osgi.framework.BundleActivator

public abstract class DeviceBundle
extends BaseBundleActivator
implements org.osgi.framework.BundleActivator

The DeviceBundle is the base bundle activator for all device bundle activators.

Version:
1.0.0

Field Summary
static java.lang.String[] OPTIONAL_SERVICES
          Define the optional services (String[]) constant.
 
Constructor Summary
DeviceBundle()
           
 
Method Summary
 void activate()
          Create service and return the Object result.
 java.util.Hashtable createProperties()
          Create the properties.
abstract  DeviceService createService(TransportService transport)
          Create service with the specified transport parameter and return the Object result.
protected  void deactivate()
          Deactivate.
 DeviceService getDevice()
          Return the device.
abstract  java.lang.String[] getExportedServiceNames()
          Gets the exported service names (String[]) value.
 java.lang.String getInterestServiceName()
           
protected  java.lang.String[] getOptionalImportedServiceNames()
          Gets the optional imported service names (String[]) value.
 TransportService getTransport()
          Get the TransportService to be used by the device.
protected  void handleAcquiredOptionalImportedService(java.lang.String serviceName, java.lang.Object service)
          Handle acquired optional imported service with the specified service name and service 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 log(int severity, java.lang.String message)
          Log with the specified severity and message parameters.
 void log(int severity, java.lang.String message, java.lang.Throwable exception)
          Log with the specified severity, message and exception parameters.
 void setDevice(DeviceService device)
          Sets the device value.
 void setTransport(TransportService transport)
          Sets the transport value.
 
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

OPTIONAL_SERVICES

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

Constructor Detail

DeviceBundle

public DeviceBundle()
Method Detail

activate

public void activate()
Create service and return the Object result.


createProperties

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

Returns:
Results of the create properties (Hashtable) value.

createService

public abstract DeviceService createService(TransportService transport)
Create service with the specified transport parameter and return the Object result. The transport (TransportService) parameter.

Parameters:
transport - The transport (TransportService) parameter.
Returns:
Results of the create service (Object) value.
See Also:
handleAcquiredOptionalImportedService(String,Object), handleReleasedOptionalImportedService(String,Object)

deactivate

protected void deactivate()
Deactivate.


getDevice

public DeviceService getDevice()
Return the device.

Returns:
Results of the get device (DeviceService) value.
See Also:
setDevice(DeviceService)

getExportedServiceNames

public abstract java.lang.String[] getExportedServiceNames()
Gets the exported service names (String[]) value.

Returns:
The exported service names (String[]) value.

getInterestServiceName

public java.lang.String getInterestServiceName()
Returns:
Results of the get interest service name (String) value.
See Also:
ServiceInterestBundle.getInterestServiceName()

getOptionalImportedServiceNames

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

Returns:
The optional imported service names (String[]) value.

getTransport

public TransportService getTransport()
Get the TransportService to be used by the device.

Returns:
Results of the get transport (TransportService) value.
See Also:
setTransport(TransportService)

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.

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.

log

public void log(int severity,
                java.lang.String message)
Log with the specified severity and message parameters. The severity (int) parameter. The message (String) parameter.

Parameters:
severity - The severity (int) parameter.
message - The message (String) parameter.
See Also:
log(int,String,Throwable)

log

public void log(int severity,
                java.lang.String message,
                java.lang.Throwable exception)
Log with the specified severity, message and exception parameters. The severity (int) parameter. The message (String) parameter. The exception (Throwable) parameter.

Parameters:
severity - The severity (int) parameter.
message - The message (String) parameter.
exception - The exception (Throwable) parameter.
See Also:
log(int,String)

setDevice

public void setDevice(DeviceService device)
Sets the device value.

Parameters:
device - The device (DeviceService) parameter.
See Also:
getDevice()

setTransport

public void setTransport(TransportService transport)
Sets the transport value.

Parameters:
transport - The transport (TransportService) parameter.
See Also:
getTransport()

1.0.0

Copyright (c) 1999, 2007 IBM