public class AdapterFaxClientSpi extends AbstractAdapterFaxClientSpi
Name | Description | Preconfigured Value | Default Value | Mandatory |
org.fax4j.spi.adapter.internal.spi.types | A ';' seperated list of SPI types. This SPI will go over the list one by one based on the configured order and will validate the type conditions. Once an SPI is found for which all conditions are met, the adapter SPI will create an instance of it and use it to proxy all fax operations to. |
mail;http;process;phaxio;hoiio;windows;vbs;linux;mac;hylafax;comm;interfax;nextivafax;send2fax;metrofax;faxage;extremefax;efax;rfax | none | true |
org.fax4j.spi.adapter.internal.spi.condition.xxx | For each type defined in the org.fax4j.spi.adapter.internal.spi.types property, you can define custom conditions
to validate. These conditions include: property - checks a fax4j property is defined and contains a value OS - checks OS name contains the value (case insensitive) java-class - checks that java class can be loaded native-lib - checks that native lib can be loaded executable - checks executable is on system path stable - checks for a fax4j property org.fax4j.spi.xxx.stable is defined and equals true, where xxx is the SPI key (for example: org.fax4j.spi.adapter.stable=true) Conditions are separated by a ';' character and the condition type and value are seperated by the ':' character, for example: org.fax4j.spi.adapter.internal.spi.condition.vbs=OS:windows;executable:cscript.exe The following conditions are always checked (even if not defined):
|
org.fax4j.spi.adapter.internal.spi.condition.windows=OS:windows;native-lib:winfax org.fax4j.spi.adapter.internal.spi.condition.vbs=OS:windows;executable:cscript.exe org.fax4j.spi.adapter.internal.spi.condition.mail=property:org.fax4j.spi.mail.connection.factory.class.name;property:org.fax4j.spi.mail.address.template;property:org.fax4j.spi.mail.subject.template;property:org.fax4j.spi.mail.user.name;property:org.fax4j.spi.mail.password;property:mail.host;java-class:javax.mail.Transport org.fax4j.spi.adapter.internal.spi.condition.http=property:org.fax4j.spi.http.client.class.name;property:org.fax4j.spi.http.host.name;property:org.fax4j.spi.http.faxjob2request.converter.class.name;property:org.fax4j.spi.http.response.handler.class.name org.fax4j.spi.adapter.internal.spi.condition.process=property:org.fax4j.spi.process.submit.template.command org.fax4j.spi.adapter.internal.spi.condition.linux=OS:linux;executable:efax;property:org.fax4j.spi.linux.submit.template.command org.fax4j.spi.adapter.internal.spi.condition.mac=OS:mac;property:org.fax4j.spi.mac.print.queue.name org.fax4j.spi.adapter.internal.spi.condition.hylafax=property:org.fax4j.spi.hylafax.host;property:org.fax4j.spi.hylafax.user;property:org.fax4j.spi.hylafax.mode;property:org.fax4j.spi.hylafax.type;property:org.fax4j.spi.hylafax.connection.factory.class.name;java-class:gnu.hylafax.HylaFAXClient org.fax4j.spi.adapter.internal.spi.condition.comm=property:org.fax4j.spi.comm.port.name;property:org.fax4j.spi.comm.connection.factory.class.name;property:org.fax4j.spi.comm.fax.modem.class.name org.fax4j.spi.adapter.internal.spi.condition.interfax=property:org.fax4j.spi.mail.connection.factory.class.name;property:org.fax4j.spi.mail.user.name;property:org.fax4j.spi.mail.password;property:mail.host;java-class:javax.mail.Transport org.fax4j.spi.adapter.internal.spi.condition.nextivafax=property:org.fax4j.spi.mail.connection.factory.class.name;property:org.fax4j.spi.mail.user.name;property:org.fax4j.spi.mail.password;property:mail.host;java-class:javax.mail.Transport org.fax4j.spi.adapter.internal.spi.condition.send2fax=property:org.fax4j.spi.mail.connection.factory.class.name;property:org.fax4j.spi.mail.user.name;property:org.fax4j.spi.mail.password;property:mail.host;java-class:javax.mail.Transport org.fax4j.spi.adapter.internal.spi.condition.metrofax=property:org.fax4j.spi.mail.connection.factory.class.name;property:org.fax4j.spi.mail.user.name;property:org.fax4j.spi.mail.password;property:mail.host;java-class:javax.mail.Transport org.fax4j.spi.adapter.internal.spi.condition.faxage=property:org.fax4j.spi.mail.connection.factory.class.name;property:org.fax4j.spi.mail.user.name;property:org.fax4j.spi.mail.password;property:mail.host;java-class:javax.mail.Transport org.fax4j.spi.adapter.internal.spi.condition.extremefax=property:org.fax4j.spi.mail.connection.factory.class.name;property:org.fax4j.spi.mail.user.name;property:org.fax4j.spi.mail.password;property:mail.host;java-class:javax.mail.Transport org.fax4j.spi.adapter.internal.spi.condition.efax=property:org.fax4j.spi.mail.connection.factory.class.name;property:org.fax4j.spi.mail.user.name;property:org.fax4j.spi.mail.password;property:mail.host;java-class:javax.mail.Transport org.fax4j.spi.adapter.internal.spi.condition.phaxio=property:org.fax4j.spi.phaxio.api.key;property:org.fax4j.spi.phaxio.api.secret;java-class:org.json.JSONObject org.fax4j.spi.adapter.internal.spi.condition.hoiio=property:org.fax4j.spi.hoiio.app.id;property:org.fax4j.spi.hoiio.access.token;java-class:org.json.JSONObject org.fax4j.spi.adapter.internal.spi.condition.rfax=property:org.fax4j.spi.rfax.port.name;property:org.fax4j.spi.rfax.fax.class;java-class:com.java4less.rfax.FaxModem |
none | true |
org.fax4j.spi.adapter.configuration.override.xxx | The adapter SPI enables to override the fax4j configuration for the internal SPI, by defining org.fax4j.spi.adapter.configuration.override.xxx properties where xxx is the original property name for example: org.fax4j.spi.adapter.configuration.override.org.fax4j.proxy.enabled=false overrides the org.fax4j.proxy.enabled property for the interal SPI. |
org.fax4j.spi.adapter.configuration.override.org.fax4j.proxy.enabled=false | none | false |
Modifier and Type | Class and Description |
---|---|
static class |
AdapterFaxClientSpi.FaxClientSpiConfigurationConstants
This class holds the SPI configuration constants.
|
AbstractFaxClientSpi.FaxJobExtendedPropertyConstants
faxClientSpi
Constructor and Description |
---|
AdapterFaxClientSpi()
This is the default constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
createFaxClientSpi(String type)
This function creates a new fax client SPI based on the provided configuration.
|
protected Properties |
createFaxClientSpiConfiguration()
This function creates and returns the internal fax client SPI configuration.
|
protected void |
initializeChildFaxClientSpi()
This function initializes the fax client SPI.
|
protected boolean |
validateCondition(String key,
String value)
Validates the SPI condition.
|
cancelFaxJobImpl, createFaxJobImpl, getFaxJobStatusImpl, getInternalFaxClientSpi, initializeImpl, isFaxMonitorEventsSupported, pollForFaxJobStatuesImpl, resumeFaxJobImpl, submitFaxJobImpl, suspendFaxJobImpl
getProvider, pollForFaxJobStatues
addFaxClientActionEventListener, addFaxMonitorEventListener, cancelFaxJob, createFaxJob, fireFaxEvent, fireFaxEvent, fireFaxMonitorEvent, getConfiguration, getConfigurationValue, getConfigurationValue, getFaxJobMonitor, getFaxJobStatus, getLogger, getPropertyPart, initialize, invokeFaxJobIDValidation, invokeFaxJobNullValidation, removeAllFaxClientActionEventListeners, removeAllFaxMonitorEventListeners, removeFaxClientActionEventListener, removeFaxMonitorEventListener, resumeFaxJob, submitFaxJob, suspendFaxJob, throwUnsupportedException
public AdapterFaxClientSpi()
protected void initializeChildFaxClientSpi()
initializeChildFaxClientSpi
in class AbstractAdapterFaxClientSpi
protected boolean validateCondition(String key, String value)
key
- The condition key value
- The condition valueprotected void createFaxClientSpi(String type)
type
- The fax client typeprotected Properties createFaxClientSpiConfiguration()
Copyright © 2009–2020 fax4j. All rights reserved.