|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--gnu.inet.ftp.FtpClientProtocol
|
+--gnu.hylafax.HylaFAXClientProtocol
This is the core implementation of the HylaFAX client protocol.
The purpose of this class is to implement the HylaFAX client protocol as simply and straight-forward as possible.
Method names are not my choosing for the most part. They have been largely pulled straight from the protocol and HylaFAX man pages. I expect that convenience classes and methods, with more developer friendly names will be built on top of this raw protocol implementation as time passes.
Most developers should use the higher-level Client to perform some actions rather than this class directly.
| Field Summary | |
static int |
DEFAULT_PORT
default HylaFAX server port. |
static java.lang.String |
TZONE_GMT
use the GMT timezone for date fields. |
static java.lang.String |
TZONE_LOCAL
use the local timezone for date fields. |
| Fields inherited from class gnu.inet.ftp.FtpClientProtocol |
fileType, greeting, istream, MDTM_TIME_FORMAT1, MDTM_TIME_FORMAT2, MODE_BLOCK, MODE_COMPRESSED, MODE_STREAM, MODE_ZLIB, ostream, port, sock, STRU_FILE, STRU_PAGE, STRU_RECORD, STRU_TIFF, TYPE_ASCII, TYPE_EBCDIC, TYPE_IMAGE, TYPE_LOCAL |
| Fields inherited from interface gnu.hylafax.ClientProtocol |
NOTIFY_ALL, NOTIFY_DONE, NOTIFY_NONE, NOTIFY_REQUEUE |
| Constructor Summary | |
HylaFAXClientProtocol()
default constructor. |
|
| Method Summary | |
void |
admin(java.lang.String password)
establish administrator privileges given password |
java.lang.String |
filefmt()
get the FILEFMT string value. |
void |
filefmt(java.lang.String value)
set the FILEFMT string value. |
long |
idle()
get the current idle timeout in seconds |
void |
idle(long timeout)
set the idle timeout value to the given number of seconds |
void |
jdele(long jobid)
delete the given job this can be called on a suspended or done job. |
void |
jintr(long jobid)
interrupt the given job id |
void |
jkill(long jobid)
kill the job with the given job id |
void |
jnew()
create a new job. |
long |
job()
get the current job id 0 indicates the current job id is "default" value |
void |
job(long value)
set the current job id |
java.lang.String |
jobfmt()
get the job format string. |
void |
jobfmt(java.lang.String value)
set the job format string. |
java.lang.String |
jparm(java.lang.String parm)
get job parameters of the current job |
void |
jparm(java.lang.String parm,
int value)
set job parameters on the current job |
void |
jparm(java.lang.String parm,
long value)
set job parameters on the current job |
void |
jparm(java.lang.String parm,
java.lang.Object value)
set job parameters on the current job |
void |
jparm(java.lang.String parm,
java.lang.String value)
set job parameters on the current job |
void |
jrest()
reset the state of the current job. |
long |
jsubm()
submit the current job to the scheduler |
int |
jsubm(long jobid)
submit the given job to the scheduler |
void |
jsusp(long jobid)
Suspend the job with the given job id. |
void |
jwait(long jobid)
Wait for the job with the given job id to complete. |
java.lang.String |
mdmfmt()
get the modem format string value. |
void |
mdmfmt(java.lang.String value)
set the modem format string. |
void |
open()
open a connection to the localhost on the default port |
void |
open(java.lang.String host)
open a connection to a given server at default port this is an alias for connect() |
java.lang.String |
rcvfmt()
get the received file output format string. |
void |
rcvfmt(java.lang.String value)
set the receive file output format string. |
long |
size(java.lang.String pathname)
Returns the size (in bytes) of the given regular file. |
java.lang.String |
stot(java.io.InputStream data)
store temp file, the file is stored in a uniquely named file on the server. |
void |
tzone(java.lang.String value)
set the timezone display format valid tzone values are TZONE_GMT and TZONE_LOCAL |
java.net.InetAddress |
vrfy(java.lang.String dialstring)
verify dialstring handling and/or least-cost routing. |
| Methods inherited from class gnu.inet.ftp.FtpClientProtocol |
abor, abor, cdup, connect, cwd, dele, getDebug, getGreeting, getInetAddress, getType, list, list, mdtm, mode, nlst, nlst, noop, open, pass, pasv, port, pwd, quit, readResponse, retr, rnfr, rnto, setDebug, stat, stat, stor, stou, stru, syst, type, user |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface gnu.hylafax.ClientProtocol |
noop, pass, quit, user |
| Field Detail |
public static int DEFAULT_PORT
public static final java.lang.String TZONE_GMT
public static final java.lang.String TZONE_LOCAL
| Constructor Detail |
public HylaFAXClientProtocol()
| Method Detail |
public void admin(java.lang.String password)
throws java.io.IOException,
ServerResponseException
admin in interface ClientProtocolpassword - administrator passwordjava.io.IOException - io error occurredServerResponseException - server replied with an error code
public long idle()
throws java.io.IOException,
ServerResponseException
idle in interface ClientProtocolidle in class FtpClientProtocoljava.io.IOException - io error occurredServerResponseException - server replied with an error code
public void idle(long timeout)
throws java.io.IOException,
ServerResponseException
idle in interface ClientProtocolidle in class FtpClientProtocoltimeout - new timeout value in seconds (MAX = 7200)java.io.IOException - io error occurredServerResponseException - server replied with an error code
public long job()
throws java.io.IOException,
ServerResponseException
job in interface ClientProtocoljava.io.IOException - io error occurredServerResponseException - server replied with an error code
public void job(long value)
throws java.io.IOException,
ServerResponseException
job in interface ClientProtocolvalue - new current job idjava.io.IOException - io error occurredServerResponseException - server replied with an error code
public java.lang.String jobfmt()
throws java.io.IOException,
ServerResponseException
jobfmt in interface ClientProtocoljava.io.IOException - a socket IO error occurred.ServerResponseException - the server responded with an error code
public void jobfmt(java.lang.String value)
throws java.io.IOException,
ServerResponseException
jobfmt in interface ClientProtocolvalue - new job format stringjava.io.IOException - a socket IO error occurred.ServerResponseException - the server responded with an error
public void mdmfmt(java.lang.String value)
throws java.io.IOException,
ServerResponseException
mdmfmt in interface ClientProtocolvalue - the new modem format string to usejava.io.IOException - a socket IO error occurredServerResponseException - the server responded with an error code
public java.lang.String mdmfmt()
throws java.io.IOException,
ServerResponseException
mdmfmt in interface ClientProtocoljava.io.IOException - a socket IO error occurredServerResponseException - the server responded with an error code
public void rcvfmt(java.lang.String value)
throws java.io.IOException,
ServerResponseException
rcvfmt in interface ClientProtocolvalue - the new format stringjava.io.IOException - a socket IO error occurredServerResponseException - the server responded with an error code
public java.lang.String rcvfmt()
throws java.io.IOException,
ServerResponseException
rcvfmt in interface ClientProtocoljava.io.IOException - a socket IO error occurredServerResponseException - the server responded with an error code
public void filefmt(java.lang.String value)
throws java.io.IOException,
ServerResponseException
filefmt in interface ClientProtocolvalue - the new value of the FILEFMT stringjava.io.IOException - a socket IO error occurredServerResponseException - the server replied with an error code
public java.lang.String filefmt()
throws java.io.IOException,
ServerResponseException
filefmt in interface ClientProtocoljava.io.IOException - a socket IO error occurredServerResponseException - the server replied with an error code
public void jdele(long jobid)
throws java.io.IOException,
ServerResponseException
jdele in interface ClientProtocoljobid - id of the job to deletejava.io.IOException - a socket IO error occurredServerResponseException - server replied with error code
public void jintr(long jobid)
throws java.io.IOException,
ServerResponseException
jintr in interface ClientProtocoljobid - id of the job to interruptjava.io.IOException - a socket IO error occurredServerResponseException - the server replied with an error code
public void jkill(long jobid)
throws java.io.IOException,
ServerResponseException
jkill in interface ClientProtocoljobid - the id of the job to killjava.io.IOException - a socket IO error occurredServerResponseException - the server replied with an error code
public void jnew()
throws java.io.IOException,
ServerResponseException
jnew in interface ClientProtocoljava.io.IOException - a socket IO error occurredServerResponseException - the server replied with an error code
public void jrest()
throws java.io.IOException,
ServerResponseException
jrest in interface ClientProtocoljava.io.IOException - an IO error occurredServerResponseException - the server replied with an error code
public int jsubm(long jobid)
throws java.io.IOException,
ServerResponseException
jsubm in interface ClientProtocoljobid - the id of the job to submitjava.io.IOException - io error occurredServerResponseException - server replied with an error code
public long jsubm()
throws java.io.IOException,
ServerResponseException
jsubm in interface ClientProtocoljava.io.IOException - io error occurredServerResponseException - server replied with an error code
public void jsusp(long jobid)
throws java.io.IOException,
ServerResponseException
jsusp in interface ClientProtocoljobid - id of the job to suspendjava.io.IOException - io error occurredServerResponseException - server replied with an error code
public void jwait(long jobid)
throws java.io.IOException,
ServerResponseException
jwait in interface ClientProtocoljobid - id of the job to wait forjava.io.IOException - io error occurredServerResponseException - server replied with an error code
public void tzone(java.lang.String value)
throws java.io.IOException,
ServerResponseException
tzone in interface ClientProtocolvalue - new timezone display settingjava.io.IOException - io error occurredServerResponseException - server replied with an error code
public void jparm(java.lang.String parm,
java.lang.String value)
throws java.io.IOException,
ServerResponseException
jparm in interface ClientProtocolparm - the name of the job parameter to changevalue - the value of the given parameterjava.io.IOException - io error occurredServerResponseException - server replied with an error code
public void jparm(java.lang.String parm,
java.lang.Object value)
throws java.io.IOException,
ServerResponseException
jparm in interface ClientProtocolparm - the name of the job parameter to changevalue - the value of the given parameter as an Objectjava.io.IOException - io error occurredServerResponseException - server replied with an error code
public void jparm(java.lang.String parm,
int value)
throws java.io.IOException,
ServerResponseException
jparm in interface ClientProtocolparm - the name of the job parameter to changevalue - the value of the given parameterjava.io.IOException - io error occurredServerResponseException - server replied with an error code
public void jparm(java.lang.String parm,
long value)
throws java.io.IOException,
ServerResponseException
jparm in interface ClientProtocolparm - the name of the job parameter to changevalue - the value of the given parameterjava.io.IOException - io error occurredServerResponseException - server replied with an error code
public java.lang.String jparm(java.lang.String parm)
throws java.io.IOException,
ServerResponseException
jparm in interface ClientProtocolparm - the name of the job parameter to changejava.io.IOException - io error occurredServerResponseException - server replied with an error code
public java.lang.String stot(java.io.InputStream data)
throws java.io.IOException,
ServerResponseException
stot in interface ClientProtocolstot in class FtpClientProtocoljava.io.IOException - io error occurred talking to the serverServerResponseException - server replied with error code
public java.net.InetAddress vrfy(java.lang.String dialstring)
throws java.io.IOException,
ServerResponseException
vrfy in interface ClientProtocoldialstring - the dialstring to verifyjava.io.IOException - a socket IO error occurredServerResponseException - the server replied with an error code
public void open(java.lang.String host)
throws java.net.UnknownHostException,
java.io.IOException,
ServerResponseException
open in interface ClientProtocolopen in class FtpClientProtocolhost - the hostname of the HylaFAX serverjava.net.UnknownHostException - cannot resolve the given hostnamejava.io.IOException - IO error occurredServerResponseException - the server replied with an error code
public void open()
throws java.net.UnknownHostException,
java.io.IOException,
ServerResponseException
open in interface ClientProtocolopen in class FtpClientProtocoljava.net.UnknownHostException - cannot resolve the given hostnamejava.io.IOException - IO error occurredServerResponseException - the server replied with an error code
public long size(java.lang.String pathname)
throws java.io.IOException,
java.io.FileNotFoundException,
ServerResponseException
size in interface ClientProtocolsize in class FtpClientProtocolpathname - the name of the file to get the size forjava.io.IOException - caused by a socket IO errorServerResponseException - caused by a server response indicating an errorjava.io.FileNotFoundException - the given path does not exist
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||