Class SystemNativeLibraryProperties
- java.lang.Object
-
- com.sedmelluq.lava.common.natives.SystemNativeLibraryProperties
-
- All Implemented Interfaces:
NativeLibraryProperties
public class SystemNativeLibraryProperties extends java.lang.Object implements NativeLibraryProperties
-
-
Constructor Summary
Constructors Constructor Description SystemNativeLibraryProperties(java.lang.String libraryName, java.lang.String propertyPrefix)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetArchitectureName()java.lang.StringgetExtractionPath()java.lang.StringgetLibraryDirectory()java.lang.StringgetLibraryFileNamePrefix()java.lang.StringgetLibraryFileNameSuffix()java.lang.StringgetLibraryPath()java.lang.StringgetSystemName()
-
-
-
Method Detail
-
getLibraryPath
public java.lang.String getLibraryPath()
- Specified by:
getLibraryPathin interfaceNativeLibraryProperties- Returns:
- Explicit filesystem path for the library. If this is set, this is loaded directly and no resource
extraction and/or system name detection is performed. If this returns
null, library directory is checked next.
-
getLibraryDirectory
public java.lang.String getLibraryDirectory()
- Specified by:
getLibraryDirectoryin interfaceNativeLibraryProperties- Returns:
- Explicit directory containing the native library. The specified directory must contain the system name
directories, thus the library to be loaded is actually located at
directory/{systemName}/{libPrefix}{libName}{libSuffix}. If this returnsnull, thenNativeLibraryBinaryProvider.getLibraryStream(SystemType, String)is called to obtain the stream to the library file, which is then written to disk for loading.
-
getExtractionPath
public java.lang.String getExtractionPath()
- Specified by:
getExtractionPathin interfaceNativeLibraryProperties- Returns:
- Base directory where to write the library if it is obtained through
NativeLibraryBinaryProvider.getLibraryStream(SystemType, String). The library file itself will actually be written to a subdirectory with a randomly generated name. The specified directory does not have to exist, but in that case the current process must have privileges to create it. If this returnsnull, then{tmpDir}/lava-jni-nativesis used.
-
getSystemName
public java.lang.String getSystemName()
- Specified by:
getSystemNamein interfaceNativeLibraryProperties- Returns:
- System name. If this is set, no operating system or architecture detection is performed.
-
getArchitectureName
public java.lang.String getArchitectureName()
- Specified by:
getArchitectureNamein interfaceNativeLibraryProperties- Returns:
- Architecture name to use. If this is set, operating system detection is still performed.
-
getLibraryFileNamePrefix
public java.lang.String getLibraryFileNamePrefix()
- Specified by:
getLibraryFileNamePrefixin interfaceNativeLibraryProperties- Returns:
- Library file name prefix to use. Only used when
NativeLibraryProperties.getSystemName()is provided.
-
getLibraryFileNameSuffix
public java.lang.String getLibraryFileNameSuffix()
- Specified by:
getLibraryFileNameSuffixin interfaceNativeLibraryProperties- Returns:
- Library file name suffix to use. Only used when
NativeLibraryProperties.getSystemName()is provided.
-
-