Class FaxJobBase

Description

In BBj 10.0 and higher, this class is a base class for fax jobs to be inherited and extended. FaxJobBase implements the FaxJob interface and provides functionality for maintaining a list of phone numbers associated with a fax job.

When inheriting this class, the following methods need to be overridden:


addDocument

One reason FaxJobBase would be overridden is to support a different document type than BASIS provides support for. Override this method to properly identify documents and maintain a list of documents associated with the fax. Some libraries for interfacing with fax hardware support the list of documents themselves or a BBjVector can be maintained within the child class (the class created by inheriting FaxJobBase).

sendToOneRecipient

Another reason to override FaxJobBase is that the hardware interface to the modem or fax service is different than what BASIS provides. With this method, invoke the third party library that sends faxes. This library may send faxes with a serial/USB modem, via email, use a fax web service or send a fax by some other means. The send() method calls sendToOneRecipient() in a loop for each phone number in the recipient list. Note that sendToOneRecipient() is never invoked directly.

close

Closing a fax job may be necessary and is fax library/hardware dependent.

For an example of how to extend FaxJobBase, peruse the code for PDFFaxJob.

Constructors

FaxJobBase has a protected default constructor for initializing the list of phone numbers and setting the initial states of Port$ and Closed.


Access

Method

protected

faxJobBase()

Fields

Access

Name

Type

Initial Value

Description

protected

port$

BBjString

COM1

The name of a hardware port on which the modem resides

protected

phoneNos!

BBjVector

 

List of recipients’ phone numbers

protected

closed

BBjNumber

0

Indicates whether fax job is closed

Methods

Access

Return Value

Method

public

void

addDocument(BBjString documentPath$)

public

void

addDocuments(BBjVector documents!)

public

void

addPhoneNumber(BBjString phoneNo$)

public

void

addPhoneNumbers(BBjVector phoneNos!)

public

void

close()

public

BBjNumber

getClosed()

public

void

send()

protected

void

sendToOneRecipient(BBjString phoneNo$)

See Also

Fax Utility

PDFFaxJob

FaxJob


Note:

The BASIS Fax Utility uses a third-party library from Java4Less called RFax. Any faxes sent will include a banner stating that the RFax library is being used until the customer obtains a license from Java4Less here.