|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.java4less.rfax.FaxModem
com.java4less.rfax.FaxReceiverModem
public class FaxReceiverModem
This class is used for receiving faxes. It can be used in the following way:
FaxReceiverModem m= new FaxReceiverModem();
m.ATFlowControlRTSCTS="AT&K3";
m.flowControl=m.FLOWCONTROL_RTSCTS;
m.setPortName("COM3");
m.faxClass=1;
m.debug=true;
m.faxReceiver=this;
m.openReception();
m.waitForFax(); // starts a thread which will wait for an incomming call.
where "this" must implement the IFaxReceiver interface.
In order to stop the FaxReceiverModem thread you must execute:
m.close();
Field Summary | |
---|---|
int |
answerAfterRings
wait this number of rings before answering incomming call. |
IFaxReceiver |
faxReceiver
fax receiver. |
java.lang.String |
inDirectory
directory where incomming faxes (tiff files) will be stored. |
boolean |
retryFRM
some modem can retrun +FCERROR after ATFRM, retry in this case up to 3 times |
Fields inherited from class com.java4less.rfax.FaxModem |
---|
AtFBOR, ATFlowControlNone, ATFlowControlRTSCTS, ATFlowControlXONXOFF, bitRate, BITRATE_12000, BITRATE_14400, BITRATE_2400, BITRATE_4800, BITRATE_7200, BITRATE_9600, debug, dialTone, directBitOrder, disablePortReadTimeout, faxClass, faxFile, flowControl, FLOWCONTROL_NONE, FLOWCONTROL_RTSCTS, FLOWCONTROL_XONXOFF, hangCode, initCommands, lastError, lastResponse, listener, log, logStr, maxRetries, MPSEOPdelay, noEcho, ownId, pageCode, portRate, producer, remoteId, resetCommand, resetDelay, resolution, RESOLUTION_FINE, RESOLUTION_NORMAL, reverseBytes, sendBufferSize, timeout, trainingRetries |
Constructor Summary | |
---|---|
FaxReceiverModem()
constructor |
Method Summary | |
---|---|
boolean |
close()
close port and do not wait for call anymore |
boolean |
openReception()
open port for reception |
boolean |
receiveFax()
wait for Fax |
void |
run()
run thread, wait for call |
void |
serialEvent(javax.comm.SerialPortEvent ev)
event listener |
void |
waitForFax()
wait for fax |
Methods inherited from class com.java4less.rfax.FaxModem |
---|
close, createFaxFiles, getEncoder, getInitString, open, sendFax, setInitString, setPortName, supportsClass1, supportsClass2, supportsClass20, waitFor |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public IFaxReceiver faxReceiver
public int answerAfterRings
public boolean retryFRM
public java.lang.String inDirectory
Constructor Detail |
---|
public FaxReceiverModem()
Method Detail |
---|
public boolean openReception()
public void serialEvent(javax.comm.SerialPortEvent ev)
serialEvent
in interface javax.comm.SerialPortEventListener
public void waitForFax()
public void run()
run
in interface java.lang.Runnable
public boolean close()
close
in class FaxModem
public boolean receiveFax()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |