01: /*******************************************************************************
02: * Copyright (c) 2005, 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.ui.services;
11:
12: /**
13: * <p>
14: * The interface that should be implemented by services that make themselves
15: * available through the <code>IAdaptable</code> mechanism. This is the
16: * interface that drives the majority of services provided at the workbench
17: * level.
18: * </p>
19: * <p>
20: * A service has life-cycle. When the constructor completes, the service must be
21: * fully functional. When it comes time for the service to go away, then the
22: * service will receive a {@link #dispose()} call. At this point, the service
23: * must release all resources and detach all listeners. A service can only be
24: * disposed once; it cannot be reused.
25: * </p>
26: * <p>
27: * This interface has nothing to do with OSGi services.
28: * </p>
29: * <p>
30: * This interface can be extended or implemented by clients.
31: * </p>
32: *
33: * @since 3.2
34: */
35: public interface IDisposable {
36:
37: /**
38: * Disposes of this service. All resources must be freed. All listeners must
39: * be detached. Dispose will only be called once during the life cycle of a
40: * service.
41: */
42: public void dispose();
43: }
|