root / import / ext3D / trunk / install-extension3d / IzPack / src / lib / com / izforge / izpack / util / NativeLibraryClient.java @ 15280
History | View | Annotate | Download (2.93 KB)
1 |
/*
|
---|---|
2 |
* $Id: NativeLibraryClient.java,v 1.1 2006/06/14 07:29:07 cesar Exp $
|
3 |
* IzPack
|
4 |
* Copyright (C) 2002 by Elmar Grom
|
5 |
*
|
6 |
* File : NativeLibraryClient.java
|
7 |
* Description : Interface for classes that use native libraries
|
8 |
* Author's email : elmar@grom.net
|
9 |
* Website : http://www.izforge.com
|
10 |
*
|
11 |
* This program is free software; you can redistribute it and/or
|
12 |
* modify it under the terms of the GNU General Public License
|
13 |
* as published by the Free Software Foundation; either version 2
|
14 |
* of the License, or any later version.
|
15 |
*
|
16 |
* This program is distributed in the hope that it will be useful,
|
17 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
18 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
19 |
* GNU General Public License for more details.
|
20 |
*
|
21 |
* You should have received a copy of the GNU General Public License
|
22 |
* along with this program; if not, write to the Free Software
|
23 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
24 |
*/
|
25 |
|
26 |
package com.izforge.izpack.util; |
27 |
|
28 |
/*---------------------------------------------------------------------------*/
|
29 |
/**
|
30 |
* Any class in IzPack that uses native libraries must implement this
|
31 |
* interface. See the package documentation for more details on requirements
|
32 |
* relating to the use of native libraries within IzPack.
|
33 |
*
|
34 |
* @version 0.0.1 / 2/6/2002
|
35 |
* @author Elmar Grom
|
36 |
*/
|
37 |
/*---------------------------------------------------------------------------*/
|
38 |
public interface NativeLibraryClient |
39 |
{ |
40 |
/*--------------------------------------------------------------------------*/
|
41 |
/**
|
42 |
* This method is used to free the library at the end of progam execution.
|
43 |
* After this call, any instance of this calss will not be usable any more!
|
44 |
* <b><i><u>This method is very likely NOT to return!</u></i></b>
|
45 |
* <br><br>
|
46 |
* <b>DO NOT CALL THIS METHOD DIRECTLY!</b><br>
|
47 |
* It is used by the librarian to free a native library before physically
|
48 |
* deleting it from its temporary loaction. A call to this method is
|
49 |
* likely to irrecoverably freeze the application!
|
50 |
* <br><br>
|
51 |
* The contract for this method implementation is that a call will bring the
|
52 |
* native library into a state where it can be deleted. This translates into
|
53 |
* an operation to free the library. Since no libraries should be left
|
54 |
* behind when the installer shuts down, it is necessary that each library
|
55 |
* provides the means to free itself. For instance in a MS-Windows environment
|
56 |
* the library must call <code>FreeLibraryAndExitThread()</code>. This will
|
57 |
* result in a native fuction call that does not return.
|
58 |
*
|
59 |
* @param name the name of the library, without path but with extension
|
60 |
*/
|
61 |
/*--------------------------------------------------------------------------*/
|
62 |
public void freeLibrary (String name); |
63 |
} |
64 |
/*---------------------------------------------------------------------------*/
|