Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Cryptix V3.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## cryptix.util.core
Interface LinkStatus

public interface LinkStatus

A class providing information about the linking status of a native library (whether it was loaded successfully, its required and actual version numbers, etc.)

The status of a library used by a particular Cryptix class can be found by calling the static method `getLinkStatus()` on that class.

Copyright © 1997 Systemics Ltd on behalf of the Cryptix Development Team.
All rights reserved.

Since:
  Cryptix 2.2.0a, 2.2.2
Version:
  1.0.1, 1997/07/21
Author:
  David Hopwood

Method Summary
`void` | `checkNative()` Checks that the native library is being used (i.e.
`java.lang.String` | `getLibraryName()` Returns the library name.
`java.lang.String` | `getLinkErrorString()` Returns an error string describing why the library failed to load, or null if there was no error.
`int` | `getMajorVersion()` Returns the actual major version number.
`int` | `getMinorVersion()` Returns the actual minor version number.
`int` | `getRequiredMajorVersion()` Returns the required major version number.
`int` | `getRequiredMinorVersion()` Returns the required minor version number.
`boolean` | `isLibraryCorrect()` Returns true if the library was loaded successfully.
`boolean` | `isLibraryLoaded()` Returns true if the library was loaded.
`void` | `setNative(boolean enable)` Enables or disables the native code.
`boolean` | `useNative()` Returns true if native code is being used.

Method Detail

### getRequiredMajorVersion

    public int getRequiredMajorVersion()

  Returns the required major version number.

### getRequiredMinorVersion

    public int getRequiredMinorVersion()

  Returns the required minor version number.

### getLibraryName

    public java.lang.String getLibraryName()

  Returns the library name.

### getMajorVersion

    public int getMajorVersion()

  Returns the actual major version number.

### getMinorVersion

    public int getMinorVersion()

  Returns the actual minor version number.

### isLibraryLoaded

    public boolean isLibraryLoaded()

  Returns true if the library was loaded. It may or may not be the correct version.

### isLibraryCorrect

    public boolean isLibraryCorrect()

  Returns true if the library was loaded successfully.

### useNative

    public boolean useNative()

  Returns true if native code is being used.

### getLinkErrorString

    public java.lang.String getLinkErrorString()

  Returns an error string describing why the library failed to load, or null if there was no error.
  Returns:
    the error string, or null if no error occured

### checkNative

    public void checkNative()
                     throws java.lang.UnsatisfiedLinkError

  Checks that the native library is being used (i.e. it loaded successfully, has valid version numbers, and has not been disabled).
  Throws:
    java.lang.UnsatisfiedLinkError - if the library is not being used

### setNative

    public void setNative(boolean enable)

  Enables or disables the native code. By default, native code is used whenever its library can be loaded correctly. This method can be used to disable native linking (and re-enable it) for a specific class.
  Parameters:
    `enable` - true if native code should be used.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Cryptix V3.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (C) 1995-2000 The Cryptix Foundation Ltd. All rights reserved.