net.sf.lpr.daemon.commands
Class SendQueueStateShort
java.lang.Object
net.sf.lpr.daemon.commands.spi.AbstractSendQueueState
net.sf.lpr.daemon.commands.SendQueueStateShort
- All Implemented Interfaces:
- DaemonCommand
public class SendQueueStateShort
- extends AbstractSendQueueState
- implements DaemonCommand
Query the LPD server for it's state in short form. The response from the LPD server seems to vary upon implementation so the users of this class must provide a Writer
that the resonse with the server
will be written to. This then requires that the user do the parsing of the response.
- Author:
- x_sid
Constructor Summary |
SendQueueStateShort(java.io.PrintStream print,
java.io.InputStream serverIn,
java.lang.String queue,
java.io.Writer response)
Construct the request to the server that will request it's current state in short form |
Method Summary |
protected java.lang.String |
getCode()
Concrete subclasses must implement this method to return the two digit code encoded with \0XX |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SendQueueStateShort
public SendQueueStateShort(java.io.PrintStream print,
java.io.InputStream serverIn,
java.lang.String queue,
java.io.Writer response)
- Construct the request to the server that will request it's current state in short form
- Parameters:
print
- the stream that the request will be written to.serverIn
- the stream that the response will be read from once the request has been written to the print streamqueue
- the name of the queue will have it's state in short form requested of itresponse
- the response from the server will be written to this Writer
getCode
protected java.lang.String getCode()
- Description copied from class:
AbstractSendQueueState
- Concrete subclasses must implement this method to return the two digit code encoded with \0XX
- Specified by:
getCode
in class AbstractSendQueueState
- Returns:
- String that is the \0XX code that is to be used to send the request for the state of the queue