cryptix.provider.md
final class NativeLink extends Object implements LinkStatus
SECURITY: this class must be package-private, and not accessible to untrusted code. Therefore the source file must be copied to each package that needs it, with the package statement adjusted accordingly. Make sure that any changes are reflected in all copies.
Copyright © 1997
Systemics Ltd on behalf of the
Cryptix Development Team.
All rights reserved.
$Revision: 1.10 $
Since: Cryptix 2.2.2
Constructor Summary | |
---|---|
NativeLink(String libname, int major, int minor)
Constructs a NativeLink object that can be used to load the given
native library. |
Method Summary | |
---|---|
boolean | attemptLoad()
Tries to load the native library, if it is enabled. |
void | check(String reason)
If reason is null, this method returns silently. |
void | checkNative() |
void | checkVersion(int major, int minor)
Sets the actual major and minor version numbers of the library. |
void | fail(Throwable e)
Marks the library as having failed a test.
|
String | getLibraryName() |
String | getLinkErrorString() |
int | getMajorVersion() |
int | getMinorVersion() |
int | getRequiredMajorVersion() |
int | getRequiredMinorVersion() |
boolean | isLibraryCorrect() |
boolean | isLibraryLoaded() |
void | setNative(boolean wanted) |
boolean | useNative() |
Parameters: libname the library name major the required major version number minor the required minor version number
This is useful for handling native methods that return null on success, or an error String on failure.
Parameters: reason either null or an error message
The major version must match the required major version exactly, and the minor version must be at least the required minor version, in order for the library to be compatible.
Parameters: major the actual major version number minor the actual minor version number
Parameters: e the exception that was thrown to indicate the failure.