Interface IDisposable

All Known Subinterfaces:
IBindingService, ICommandImageService, ICommandService, IContextService, IEvaluationService, IHandlerService, IMenuService, IServiceWithSources
All Known Implementing Classes:
EditorSiteDragAndDropServiceImpl, PluginActionSetBuilder.Binding, SaveablesProvider, SlavePageService, SlavePartService, SlaveSelectionService, StructureRootNode

public interface IDisposable

The interface that should be implemented by services that make themselves available through the IAdaptable mechanism. This is the interface that drives the majority of services provided at the workbench level.

A service has life-cycle. When the constructor completes, the service must be fully functional. When it comes time for the service to go away, then the service will receive a dispose() call. At this point, the service must release all resources and detach all listeners. A service can only be disposed once; it cannot be reused.

This interface has nothing to do with OSGi services.

This interface can be extended or implemented by clients.

Since:
3.2
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Disposes of this service.
  • Method Details

    • dispose

      void dispose()
      Disposes of this service. All resources must be freed. All listeners must be detached. Dispose will only be called once during the life cycle of a service.