public abstract class AbstractFaxBridge extends Object implements FaxBridge
Name | Description | Preconfigured Value | Default Value | Mandatory |
org.fax4j.bridge.vendor.policy.class.name | The vendor policy class name. | org.fax4j.bridge.EmptyVendorPolicy | org.fax4j.bridge.EmptyVendorPolicy | false |
VENDOR_POLICY_CLASS_NAME
Constructor and Description |
---|
AbstractFaxBridge()
This is the class constructor.
|
Modifier and Type | Method and Description |
---|---|
FaxJob |
createFaxJob()
This function creates a new fax job instance to be used by the caller to submit a new fax job and so on.
|
protected abstract VendorPolicy |
createVendorPolicy()
This function returns the vendor policy.
|
Map<String,String> |
getConfiguration()
Returns the configuration.
|
String |
getConfigurationValue(Enum<?> key)
Returns the value from the component configuration based on the provided configuration key.
|
String |
getConfigurationValue(String key)
Returns the value from the component configuration based on the provided configuration key.
|
FaxClient |
getFaxClient()
Returns the internal fax client.
|
Logger |
getLogger()
Returns the internal logger.
|
String |
getPropertyPart()
Returns the property part.
Property parts enables to replace the input request key with the part defined to enable to reuse services with different configuration blocks. Property parts will be replaced with the {0} values in the key, for example org.fax4j.{0}.somekey with part abc will be replaced to org.fax4j.abc.somekey |
VendorPolicy |
getVendorPolicy()
This function returns the vendor policy.
|
void |
initialize(String type,
Properties configuration,
Object flowOwner)
This function initializes the fax bridge.
|
protected void |
initializeImpl()
This function initializes the fax bridge.
|
void |
submitFaxJob(FaxJob faxJob,
FileInfo fileInfo)
This function will submit a new fax job.
The fax job ID may be populated by this method in the provided fax job object. The file information in the provided fax job will be ignored by this method, instead the file data will be taken from the FileInfo. |
protected abstract void |
updateFaxJobWithFileInfo(FaxJob faxJob,
FileInfo fileInfo)
This function stores the file in the local machine and updates the fax job with the new file data.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getProvider
public final void initialize(String type, Properties configuration, Object flowOwner)
initialize
in interface FaxBridge
type
- The fax client type (may be null for default type)configuration
- The fax client configuration (may be null)flowOwner
- The flow owner (servlet, CLI main, ....) to be passed to the vendor policypublic final Logger getLogger()
public String getPropertyPart()
getPropertyPart
in interface ConfigurationHolder
public final Map<String,String> getConfiguration()
getConfiguration
in interface ConfigurationHolder
public final String getConfigurationValue(String key)
getConfigurationValue
in interface ConfigurationHolder
key
- The configuration keypublic final String getConfigurationValue(Enum<?> key)
getConfigurationValue
in interface ConfigurationHolder
key
- The configuration key (toString value will be used)public final FaxClient getFaxClient()
getFaxClient
in interface FaxBridge
public final VendorPolicy getVendorPolicy()
getVendorPolicy
in interface FaxBridge
public FaxJob createFaxJob()
createFaxJob
in interface FaxBridge
public void submitFaxJob(FaxJob faxJob, FileInfo fileInfo)
submitFaxJob
in interface FaxBridge
faxJob
- The fax job object containing the needed information (not including the file information)fileInfo
- The file information of the requested faxprotected void initializeImpl()
protected abstract VendorPolicy createVendorPolicy()
protected abstract void updateFaxJobWithFileInfo(FaxJob faxJob, FileInfo fileInfo)
faxJob
- The fax job object to be updatedfileInfo
- The file information of the requested faxCopyright © 2009–2020 fax4j. All rights reserved.