public final class FaxClientFactory extends Object
// get new instance of a fax client (based on internal + external fax4j.properties file data) FaxClient faxClient = FaxClientFactory.createFaxClient(); // create a new fax job FaxJob faxJob = faxClient.createFaxJob(); // set fax job values faxJob.setFile(new File("./my_document.txt")); faxJob.setPriority(FaxJobPriority.HIGH_PRIORITY); faxJob.setTargetAddress("555-555"); faxJob.setTargetName("YourName"); faxJob.setSenderEmail("myemail@mycompany.com"); faxJob.setSenderName("MyName"); // submit fax job faxClient.submitFaxJob(faxJob); // print submitted fax job ID (may not be supported by all SPIs) System.out.println("Fax job submitted, ID: " + faxJob.getID());The engine behind the fax client is the fax client SPI which is used internally.
Name | Description | Preconfigured Value | Default Value | Mandatory |
org.fax4j.spi.type.map.xxx | For each SPI type, there is a property that (with prefix: org.fax4j.spi.type.map. and type name for example:
org.fax4j.spi.type.map.adapter) which defines the SPI class name for the given SPI type. For example: org.fax4j.spi.type.map.adapter=org.fax4j.spi.adapter.AdapterFaxClientSpi Means that for SPI type adapter, the SPI class to be used is org.fax4j.spi.adapter.AdapterFaxClientSpi |
org.fax4j.spi.type.map.adapter=org.fax4j.spi.adapter.AdapterFaxClientSpi org.fax4j.spi.type.map.windows=org.fax4j.spi.windows.WindowsFaxClientSpi org.fax4j.spi.type.map.vbs=org.fax4j.spi.vbs.VBSFaxClientSpi org.fax4j.spi.type.map.mail=org.fax4j.spi.email.MailFaxClientSpi org.fax4j.spi.type.map.http=org.fax4j.spi.http.HTTPFaxClientSpi org.fax4j.spi.type.map.process=org.fax4j.spi.process.ProcessFaxClientSpi org.fax4j.spi.type.map.linux=org.fax4j.spi.linux.LinuxFaxClientSpi org.fax4j.spi.type.map.mac=org.fax4j.spi.mac.MacFaxClientSpi org.fax4j.spi.type.map.hylafax=org.fax4j.spi.hylafax.HylaFaxClientSpi org.fax4j.spi.type.map.comm=org.fax4j.spi.comm.CommFaxClientSpi org.fax4j.spi.type.map.interfax=org.fax4j.spi.interfax.InterfaxMailFaxClientSpi org.fax4j.spi.type.map.nextivafax=org.fax4j.spi.nextivafax.NextivafaxMailFaxClientSpi org.fax4j.spi.type.map.send2fax=org.fax4j.spi.send2fax.Send2FaxMailFaxClientSpi org.fax4j.spi.type.map.metrofax=org.fax4j.spi.metrofax.MetroFaxMailFaxClientSpi org.fax4j.spi.type.map.faxage=org.fax4j.spi.faxage.FaxAgeMailFaxClientSpi org.fax4j.spi.type.map.extremefax=org.fax4j.spi.extremefax.ExtremeFaxMailFaxClientSpi org.fax4j.spi.type.map.efax=org.fax4j.spi.efax.EFaxMailFaxClientSpi org.fax4j.spi.type.map.phaxio=org.fax4j.spi.phaxio.PhaxioFaxClientSpi org.fax4j.spi.type.map.hoiio=org.fax4j.spi.hoiio.HoiioFaxClientSpi org.fax4j.spi.type.map.rfax=org.fax4j.spi.java4less.RFaxFaxClientSpi |
NA | NA |
org.fax4j.spi.default.type | In case the SPI type was not provided in the createFaxClientSpi method, the type will be taken from this property value. | adapter | none | false |
org.fax4j.logger.class.name | Defines the internal fax4j logger class name. The logger must implement the org.fax4j.common.Logger interface and have an empty constructor. This property can only be set in the internal fax4j.properties and the fax4j.properties on the classpath, providing these values as part of the java.util.Properties input of the createFaxClientSpi will have no affect. |
org.fax4j.common.SimpleLogger | org.fax4j.common.SimpleLogger | false |
org.fax4j.logger.log.level | Defines the internal fax4j logger log level. The possible values are: DEBUG, INFO and ERROR. This property can only be set in the internal fax4j.properties and the fax4j.properties on the classpath, providing these values as part of the java.util.Properties input of the createFaxClientSpi will have no effect. |
ERROR | ERROR | false |
org.fax4j.client.class.name | Defines the fax client class name. Since the fax client redirects the operations to the SPI (the engine) classes, creating a custom fax client is not required. |
org.fax4j.FaxClient | org.fax4j.FaxClient | false |
Modifier and Type | Field and Description |
---|---|
static String |
FAX_CLIENT_CLASS_NAME_PROPERTY_KEY
The fax client class name property key
|
Modifier and Type | Method and Description |
---|---|
static FaxClient |
createFaxClient()
This function creates a new fax client based on the default configuration.
|
static FaxClient |
createFaxClient(String type,
Properties configuration)
This function creates a new fax client based on the provided configuration.
|
public static final String FAX_CLIENT_CLASS_NAME_PROPERTY_KEY
public static FaxClient createFaxClient()
public static FaxClient createFaxClient(String type, Properties configuration)
type
- The fax client type (may be null for default type)configuration
- The fax client configuration (may be null)Copyright © 2009–2020 fax4j. All rights reserved.