Service Activator Toolkit
Version 1.1.0 (20081206)

org.eclipse.soda.sat.core.record.interfaces
Interface IExportServiceRecord

All Superinterfaces:
IServiceRecord
All Known Subinterfaces:
IExportProxyServiceRecord

public interface IExportServiceRecord
extends IServiceRecord

The IExportServiceRecord interface represents a service that is exported by a bundle and registered with the OSGi framework. The following responsibilities are declared:

Note: Since this abstraction is used internally by the SAT bundle this interface is typically not used directly by bundle developers. For cases where subclassing the BaseBundleActivator is not appropriate, instances of this interface can be created using the FactoryUtility class.


Field Summary
static String BUNDLE_ID_PROPERTY
           
static String BUNDLE_VERSION_PROPERTY
           
static String SERVICE_REGISTRATION_TIMESTAMP_PROPERTY
           
static String SERVICE_VENDOR_PROPERTY
           
 
Method Summary
 String[] getNames()
          Get the exported service's service names.
 Dictionary getProperties()
          Get the properties of the exported service.
 ServiceReference getServiceReference()
          Answers the ServiceReference for the service.
 boolean isProxy()
          Query whether the exported service is a proxy.
 boolean isRegistered()
          Query whether the exported services has been registered.
 void register()
          Register the exported service with the OSGi framework.
 void setProperties(Dictionary properties)
          Sets the export service properties.
 void unregister()
          Unregister the exported service with the OSGi framework.
 
Methods inherited from interface org.eclipse.soda.sat.core.record.interfaces.IServiceRecord
basicToString, getBundleContext, getProperty, getPropertyKeys, getService
 

Field Detail

BUNDLE_ID_PROPERTY

static final String BUNDLE_ID_PROPERTY
See Also:
Constant Field Values

BUNDLE_VERSION_PROPERTY

static final String BUNDLE_VERSION_PROPERTY
See Also:
Constant Field Values

SERVICE_REGISTRATION_TIMESTAMP_PROPERTY

static final String SERVICE_REGISTRATION_TIMESTAMP_PROPERTY
See Also:
Constant Field Values

SERVICE_VENDOR_PROPERTY

static final String SERVICE_VENDOR_PROPERTY
See Also:
Constant Field Values
Method Detail

getNames

String[] getNames()
Get the exported service's service names.

Returns:
An array of exported service names. An exported service is always guaranteed to have at least one service name.

getProperties

Dictionary getProperties()
Get the properties of the exported service.

Returns:
The properties of the exported service, or null if the exported service does not have properties.

getServiceReference

ServiceReference getServiceReference()
Answers the ServiceReference for the service.

Returns:
The ServiceReference for the receiver's service.

isProxy

boolean isProxy()
Query whether the exported service is a proxy.

Returns:
True if the exported service is a proxy, otherwise false.

isRegistered

boolean isRegistered()
Query whether the exported services has been registered.

Returns:
True if the exported service has been registered, otherwise false.

register

void register()
Register the exported service with the OSGi framework.


setProperties

void setProperties(Dictionary properties)
Sets the export service properties. This method can be called regardless of whether the exported service is registered with the OSGi framework or not. If the exported service is registered, calling this method will cause an OSGi ServiceEvent.MODIFIED to be fired to registered ServiceListener objects.

Parameters:
properties - The exported service properties.

unregister

void unregister()
Unregister the exported service with the OSGi framework.


Service Activator Toolkit
Version 1.1.0 (20081206)