Displaying the Status of the Fax Application


The FaxStatusListener.java file sets integer values for the status of the Fax application.

Listing 6-6 shows the FaxStatusListener.java file:

Listing 6-6: The FaxStatusListener.java File

start example
 public interface FaxStatusListener {     public abstract void faxProgress(int i, int j);     public static final int ST_OPEN_PORT = 1;     public static final int ST_INIT_MODEM = 2;     public static final int ST_CONNECTING = 3;     public static final int ST_SEND_PAGE = 4;     public static final int ST_CLOSE = 5;     public static final int ST_CONVERT_FIlES = 6;     public static final int ST_REC_PAGE = 4;     public static final int ST_REC_CALL = 7;     public static final int ST_WAIT_CALL = 8; } 
end example

Download this listing.

In the above listing, the FaxStatusListener.java file declares an abstract method, faxProgress(). This method accepts two integer parameters. The first parameter indicates the status of the fax and the second parameter indicates the page to send as a fax. The PortFax.java file implements the FaxStatusListener interface to display the current status of the Fax application.




Developing Applications Using JCA
Developing Applications Using JCA
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 43

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net