org.simoes.lpd.command
Class CommandReceiveJob
java.lang.Object
org.simoes.lpd.command.CommandHandler
org.simoes.lpd.command.CommandReceiveJob
- public class CommandReceiveJob
- extends CommandHandler
This class handles the Receive a printer job Command in RFC1179.
The RFC description is below:
5.2 02 - Receive a printer job
+----+-------+----+
| 02 | Queue | LF |
+----+-------+----+
Command code - 2
Operand - Printer queue name
Receiving a job is controlled by a second level of commands. The
daemon is given commands by sending them over the same connection.
The commands are described in the next section (6).
After this command is sent, the client must read an acknowledgement
octet from the daemon. A positive acknowledgement is an octet of
zero bits. A negative acknowledgement is an octet of any other
pattern.
- Author:
- Chris Simoes
Constructor Summary |
CommandReceiveJob(byte[] command,
java.io.InputStream is,
java.io.OutputStream os)
Constructor for CommandReceiveJob. |
Method Summary |
void |
execute()
Receives the print job and adds it to the queue. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CommandReceiveJob
public CommandReceiveJob(byte[] command,
java.io.InputStream is,
java.io.OutputStream os)
- Constructor for CommandReceiveJob.
- Parameters:
command
- the lpr client command,
it should start with a 0x2 if this command was calledis
- the InputStream from the lpr clientos
- the OutputStream to the lpr client
execute
public void execute()
throws LPDException
- Receives the print job and adds it to the queue.
- Specified by:
execute
in class CommandHandler
- Throws:
LPDException
- thrown when an error occurs