net.sf.lpr.daemon.commands
Class ReceivePrinterJob

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

public class ReceivePrinterJob
extends AbstractDaemonCommand
implements DaemonCommand

Command the LPD server to be ready to receive a print job. Once the LPD server receives this command it will go into subcommand mode that will wait for a job to be sent to it to be printed.

Author:
x_sid

Constructor Summary
ReceivePrinterJob(java.io.PrintStream print, java.io.InputStream serverIn, java.lang.String queue)
          Construct the command that will put the LPD server into subcommand mode for the current session to receive a print job.
 
Method Summary
protected  void printCommand(java.io.PrintStream print)
          This method needs to be implemented for the daemon command that actually sends the request to the LPD server.
 
Methods inherited from class net.sf.lpr.daemon.commands.spi.AbstractDaemonCommand
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

ReceivePrinterJob

public ReceivePrinterJob(java.io.PrintStream print,
                         java.io.InputStream serverIn,
                         java.lang.String queue)
Construct the command that will put the LPD server into subcommand mode for the current session to receive a print job.

Parameters:
print - the stream that the command will be written to.
serverIn - the stream that the response from the server will be read.
queue - the name of the queue that will be put into receive job mode.
Method Detail

printCommand

protected void printCommand(java.io.PrintStream print)
                     throws java.io.IOException
Description copied from class: AbstractDaemonCommand
This method needs to be implemented for the daemon command that actually sends the request to the LPD server. There is no need to check the response from the server because that is handled by the code in the implemented print() method

Specified by:
printCommand in class AbstractDaemonCommand
Throws:
java.io.IOException