public final class WindowsFaxClientSpiHelper extends Object
Modifier and Type | Field and Description |
---|---|
static Object |
NATIVE_LOCK
The lock used to synchronize native calls
|
Modifier and Type | Method and Description |
---|---|
static void |
extractNativeResources()
This function extracts the native resources (the fax4j.exe and fax4j.dll) and pushes them to the fax4j temporary
directory.
|
static int |
getFaxJobID(FaxJob faxJob)
This function returns the fax job ID (if valid).
|
static FaxJobStatus |
getFaxJobStatusFromWindowsFaxJobStatusString(String faxJobStatusStr)
This function returns the fax job status based on the windows fax job status string value.
|
static String |
getOutputPart(ProcessExecutorHelper.ProcessOutput processOutput,
String prefix)
This function returns the relevant part from the process output.
|
static String |
getServerNameFromConfiguration(FaxClientSpi faxClientSpi)
This function returns the server name from the SPI configuration.
|
static boolean |
isNativeLibraryLoaded()
This function returns true if the native library was loaded.
|
static void |
loadNativeLibrary(Logger logger)
Loads the native library if not loaded before.
|
static void |
validateFaxJobID(FaxJob faxJob)
This function validates the provided fax job ID (not checking fax server, only format).
|
static void |
validateFaxJobID(int faxJobID)
This function validates the provided fax job ID (not checking fax server, only format).
|
static void |
validateFaxJobID(String faxJobID)
This function validates the provided fax job ID (not checking fax server, only format).
|
public static final Object NATIVE_LOCK
public static void extractNativeResources()
public static void loadNativeLibrary(Logger logger)
logger
- The loggerpublic static boolean isNativeLibraryLoaded()
public static String getServerNameFromConfiguration(FaxClientSpi faxClientSpi)
faxClientSpi
- The fax client SPIpublic static int getFaxJobID(FaxJob faxJob)
faxJob
- The fax job objectpublic static void validateFaxJobID(FaxJob faxJob)
faxJob
- The fax job holding the ID to validatepublic static void validateFaxJobID(String faxJobID)
faxJobID
- The fax job ID to validatepublic static void validateFaxJobID(int faxJobID)
faxJobID
- The fax job ID to validatepublic static FaxJobStatus getFaxJobStatusFromWindowsFaxJobStatusString(String faxJobStatusStr)
faxJobStatusStr
- The fax job status string valuepublic static String getOutputPart(ProcessExecutorHelper.ProcessOutput processOutput, String prefix)
processOutput
- The process outputprefix
- The prefix to look for in the outputCopyright © 2009–2020 fax4j. All rights reserved.