net.sf.lpr.daemon.commands
Class SendQueueStateLong

java.lang.Object
  extended by net.sf.lpr.daemon.commands.spi.AbstractSendQueueState
      extended by net.sf.lpr.daemon.commands.SendQueueStateLong
All Implemented Interfaces:
DaemonCommand

public class SendQueueStateLong
extends AbstractSendQueueState
implements DaemonCommand

Query the LPD server for it's state in long 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
SendQueueStateLong(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 long 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 net.sf.lpr.daemon.commands.spi.AbstractSendQueueState
print
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sf.lpr.daemon.DaemonCommand
print
 

Constructor Detail

SendQueueStateLong

public SendQueueStateLong(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 long 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 stream
queue - the name of the queue will have it's state in short form requested of it
response - the response from the server will be written to this Writer
Method Detail

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