public class MailFaxClientSpi extends AbstractMailFaxClientSpi
Name | Description | Preconfigured Value | Default Value | Mandatory |
org.fax4j.spi.mail.address.template | The address template used when sending the mail message. In order to provide the target fax number as part of the email address you must specify {0} in the template. For example: org.fax4j.spi.mail.address.template={0}@myprovider.com |
none | none | true |
org.fax4j.spi.mail.subject.template | The subject template used when sending the mail message. In order to provide the target fax number as part of the email subject line you must specify {0} in the template. For example: org.fax4j.spi.mail.subject.template=fax:{0} |
none | none | true |
org.fax4j.spi.mail.persistent.connection | True to reuse the same mail connection for all fax activites, false to create a new mail connection for each fax activity. | false | false | false |
org.fax4j.spi.mail.connection.factory.class.name | The connection factory class name | org.fax4j.spi.email.MailConnectionFactoryImpl | org.fax4j.spi.email.MailConnectionFactoryImpl | false |
org.fax4j.spi.mail.user.name | The mail account user name. | none | none | false |
org.fax4j.spi.mail.password | The mail account password. | none | none | false |
javax mail properties | Any of the javax mail properties can be defined in the fax4j properties. These properties will be passed to the java mail framework. |
mail.transport.protocol=smtp mail.smtp.port=25 |
none | false |
Modifier and Type | Class and Description |
---|---|
static class |
MailFaxClientSpi.FaxClientSpiConfigurationConstants
This class holds the SPI configuration constants.
|
AbstractFaxClientSpi.FaxJobExtendedPropertyConstants
Modifier and Type | Field and Description |
---|---|
protected String |
mailAddressTemplate
The mail address template
|
protected String |
mailSubjectTemplate
The mail subject template
|
Constructor and Description |
---|
MailFaxClientSpi()
This is the default constructor.
|
Modifier and Type | Method and Description |
---|---|
protected javax.mail.Message |
createCancelFaxJobMessage(FaxJob faxJob,
MailResourcesHolder mailResourcesHolder)
This function will create the message used to invoke the fax job action.
If this method returns null, the SPI will throw an UnsupportedOperationException. |
protected javax.mail.Message |
createResumeFaxJobMessage(FaxJob faxJob,
MailResourcesHolder mailResourcesHolder)
This function will create the message used to invoke the fax job action.
If this method returns null, the SPI will throw an UnsupportedOperationException. |
protected javax.mail.Message |
createSubmitFaxJobMessage(FaxJob faxJob,
MailResourcesHolder mailResourcesHolder)
This function will create the message used to invoke the fax job action.
If this method returns null, the SPI will throw an UnsupportedOperationException. |
protected javax.mail.Message |
createSuspendFaxJobMessage(FaxJob faxJob,
MailResourcesHolder mailResourcesHolder)
This function will create the message used to invoke the fax job action.
If this method returns null, the SPI will throw an UnsupportedOperationException. |
String |
getMailAddressTemplate()
This function returns the mail address template.
|
String |
getMailSubjectTemplate()
This function returns the mail subject template.
|
protected void |
initializeImpl()
This function initializes the fax client SPI.
|
protected void |
initializeMailTemplates()
This function initializes the mail templates.
|
cancelFaxJobImpl, closeMailConnection, createMailConnection, createMailConnectionFactoryImpl, finalize, getMailConnection, resumeFaxJobImpl, sendMail, submitFaxJobImpl, suspendFaxJobImpl
getFaxJobStatusImpl, getProvider, isFaxMonitorEventsSupported, pollForFaxJobStatues, pollForFaxJobStatuesImpl
addFaxClientActionEventListener, addFaxMonitorEventListener, cancelFaxJob, createFaxJob, createFaxJobImpl, fireFaxEvent, fireFaxEvent, fireFaxMonitorEvent, getConfiguration, getConfigurationValue, getConfigurationValue, getFaxJobMonitor, getFaxJobStatus, getLogger, getPropertyPart, initialize, invokeFaxJobIDValidation, invokeFaxJobNullValidation, removeAllFaxClientActionEventListeners, removeAllFaxMonitorEventListeners, removeFaxClientActionEventListener, removeFaxMonitorEventListener, resumeFaxJob, submitFaxJob, suspendFaxJob, throwUnsupportedException
protected String mailAddressTemplate
protected String mailSubjectTemplate
protected void initializeImpl()
initializeImpl
in class AbstractMailFaxClientSpi
protected void initializeMailTemplates()
public final String getMailAddressTemplate()
public final String getMailSubjectTemplate()
protected javax.mail.Message createSubmitFaxJobMessage(FaxJob faxJob, MailResourcesHolder mailResourcesHolder)
createSubmitFaxJobMessage
in class AbstractMailFaxClientSpi
faxJob
- The fax job object containing the needed informationmailResourcesHolder
- The mail resources holderprotected javax.mail.Message createSuspendFaxJobMessage(FaxJob faxJob, MailResourcesHolder mailResourcesHolder)
createSuspendFaxJobMessage
in class AbstractMailFaxClientSpi
faxJob
- The fax job object containing the needed informationmailResourcesHolder
- The mail resources holderprotected javax.mail.Message createResumeFaxJobMessage(FaxJob faxJob, MailResourcesHolder mailResourcesHolder)
createResumeFaxJobMessage
in class AbstractMailFaxClientSpi
faxJob
- The fax job object containing the needed informationmailResourcesHolder
- The mail resources holderprotected javax.mail.Message createCancelFaxJobMessage(FaxJob faxJob, MailResourcesHolder mailResourcesHolder)
createCancelFaxJobMessage
in class AbstractMailFaxClientSpi
faxJob
- The fax job object containing the needed informationmailResourcesHolder
- The mail resources holderCopyright © 2009–2020 fax4j. All rights reserved.