|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.lpr.daemon.commands.spi.AbstractSendQueueState
public abstract class AbstractSendQueueState
This class houses the shared code that is used for querying the LPD server for it's state. Since the only part of the request to the server that changes is the numeric code all the work can be done here leaving the code for the command to subclasses.
Constructor Summary | |
---|---|
protected |
AbstractSendQueueState(java.io.PrintStream print,
java.io.InputStream serverIn,
java.lang.String queue,
java.io.Writer response)
Constructor for creating the parent class that does the boiler plate work. |
Method Summary | |
---|---|
protected abstract java.lang.String |
getCode()
Concrete subclasses must implement this method to return the two digit code encoded with \0XX |
void |
print()
A call to this method will send the query and read the response from the LPD server that is pointed at by the constructor provided PrintStream |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected AbstractSendQueueState(java.io.PrintStream print, java.io.InputStream serverIn, java.lang.String queue, java.io.Writer response)
print
- stream to write out the query for the state of the queue to.serverIn
- the response stream to read responses from the server.queue
- that is to have it's state queried for.response
- the Writer
to which the response from the server will be written.Method Detail |
---|
protected abstract java.lang.String getCode()
public void print() throws IORuntimeException
PrintStream
print
in interface DaemonCommand
IORuntimeException
- if an IO error occurs or the response from the LPD server is not the expected 2 bytes of 0
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |