KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > services > IDisposable


1 /*******************************************************************************
2  * Copyright (c) 2005, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11
12 package org.eclipse.ui.services;
13
14 /**
15  * <p>
16  * The interface that should be implemented by services that make themselves
17  * available through the <code>IAdaptable</code> mechanism. This is the
18  * interface that drives the majority of services provided at the workbench
19  * level.
20  * </p>
21  * <p>
22  * A service has life-cycle. When the constructor completes, the service must be
23  * fully functional. When it comes time for the service to go away, then the
24  * service will receive a {@link #dispose()} call. At this point, the service
25  * must release all resources and detach all listeners. A service can only be
26  * disposed once; it cannot be reused.
27  * </p>
28  * <p>
29  * This interface has nothing to do with OSGi services.
30  * </p>
31  * <p>
32  * This interface can be extended or implemented by clients.
33  * </p>
34  *
35  * @since 3.2
36  */

37 public interface IDisposable {
38
39     /**
40      * Disposes of this service. All resources must be freed. All listeners must
41      * be detached. Dispose will only be called once during the life cycle of a
42      * service.
43      */

44     public void dispose();
45 }
46
Popular Tags