1.0.0

org.eclipse.soda.dk.connection.bundle
Class ServiceBundle

java.lang.Object
  extended by BaseBundleActivator
      extended by org.eclipse.soda.dk.connection.bundle.ServiceBundle
Direct Known Subclasses:
ConnectionBundle, DeviceRegistryBundle, NotificationBundle, ServiceInterestBundle

public abstract class ServiceBundle
extends BaseBundleActivator

The ServiceBundle extends the OAF BaseBundleActivator to create an object and register OSGi service(s).

Version:
1.0.0

Field Summary
static java.lang.String DEVICE_CLASS
          Define the device class (String) constant.
static java.lang.String DEVICE_REVISION
          Define the device revision (String) constant.
 
Constructor Summary
ServiceBundle()
           
 
Method Summary
protected  void activate()
          Create exported services.
 java.util.Hashtable createProperties()
          Create the properties.
 java.lang.Object createService()
          Create the service.
protected  void destroyExportedServices()
          Destroy exported services.
abstract  java.lang.String[] getExportedServiceNames()
          Gets the service names (String[]) value.
 java.lang.Object getService()
          Gets the service (Object) value.
 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 setService(java.lang.Object service)
          Sets the service value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEVICE_REVISION

public static final java.lang.String DEVICE_REVISION
Define the device revision (String) constant.

See Also:
Constant Field Values

DEVICE_CLASS

public static final java.lang.String DEVICE_CLASS
Define the device class (String) constant.

See Also:
Constant Field Values
Constructor Detail

ServiceBundle

public ServiceBundle()
Method Detail

activate

protected void activate()
Create exported services.


createProperties

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

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

createService

public java.lang.Object createService()
Create the service.

Returns:
Results of the create service (Object) value.
See Also:
getService(), setService(Object)

destroyExportedServices

protected void destroyExportedServices()
Destroy exported services.


getExportedServiceNames

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

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

getService

public java.lang.Object getService()
Gets the service (Object) value.

Returns:
The service (Object) value.
See Also:
createService(), setService(Object)

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)

setService

public void setService(java.lang.Object service)
Sets the service value. The service (Object) parameter.

Parameters:
service - The service (Object) parameter.
See Also:
createService(), getService()

1.0.0

Copyright (c) 1999, 2007 IBM