Service Activator Toolkit
Version 1.1.0 (20081206)

org.eclipse.soda.sat.core.record.container.interfaces
Interface IImportServiceRecordContainerOwner

All Known Subinterfaces:
IImportServiceRecordContainerLenientOwner

public interface IImportServiceRecordContainerOwner

When an IImportServiceRecordContainer is created it must be given an owner that will handle call-back notifications. The IImportServiceRecordContainerOwner interface declares the role of a container's owner, which has the following responsibilities:

Strict Container Responsibilities

These responsibilities only apply to a strict container. A strict container only cares when all its import service records are acquired, and then when one of its import service records is released.

Note: Since this abstraction is used internally by the SAT bundle this interface is typically not used directly by bundle developers.


Method Summary
 void acquired(IImportServiceRecordContainer container)
          The owned IImportServiceRecordContainer has been acquired.
 void released(IImportServiceRecordContainer container)
          The owned IImportServiceRecordContainer has been released.
 

Method Detail

acquired

void acquired(IImportServiceRecordContainer container)
The owned IImportServiceRecordContainer has been acquired. If the container is strict this call-back is only sent when all imported services have been acquired. In this case, the call-back is executed on the OSGi notification thread. This call-back will be sent every time the container had at least one released service that is subsequently acquired.

If the container is lenient this call-back is sent only once as a result of calling the IImportServiceRecordContainer method acquire(IImportServiceRecordContainerOwner). In this case, the call-back is executed on the thread that called acquire().

Parameters:
container - The owned IImportServiceRecordContainer.
See Also:
IImportServiceRecordContainer.acquire()

released

void released(IImportServiceRecordContainer container)
The owned IImportServiceRecordContainer has been released. If the container is strict this call-back is only sent when one of the imported services have been released. In this case, the call-back is executed on the OSGi notification thread. This call-back will be sent every time the container has acquired all imported services and an imported service is subsequently released.

Regardless of whether the container is strict or not, this call-back is sent as a result of calling the IImportServiceRecordContainer method release(). In this case, the call-back is executed on the thread that called release().

Parameters:
container - The owned container.
See Also:
IImportServiceRecordContainer.release()

Service Activator Toolkit
Version 1.1.0 (20081206)