Service Activator Toolkit
Version 1.0.0

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

All Superinterfaces:
IServiceRecord
All Known Subinterfaces:
IExportProxyServiceRecord

public interface IExportServiceRecord
extends IServiceRecord

An IExportServiceRecord 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_VENDOR_PROPERTY
           
static String BUNDLE_VERSION_PROPERTY
           
static String SERVICE_REGISTRATION_TIMESTAMP_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
getProperty, getPropertyKeys, getService, hasService, setService
 

Field Detail

BUNDLE_VERSION_PROPERTY

public static final String BUNDLE_VERSION_PROPERTY
See Also:
Constant Field Values

BUNDLE_VENDOR_PROPERTY

public static final String BUNDLE_VENDOR_PROPERTY
See Also:
Constant Field Values

SERVICE_REGISTRATION_TIMESTAMP_PROPERTY

public static final String SERVICE_REGISTRATION_TIMESTAMP_PROPERTY
See Also:
Constant Field Values
Method Detail

getNames

public 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

public 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

public ServiceReference getServiceReference()
Answers the ServiceReference for the service.

Returns:
The ServiceReference for the receiver's service.

isProxy

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

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

isRegistered

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

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

register

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


setProperties

public 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

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


Service Activator Toolkit
Version 1.0.0