org.simoes.lpd.command
Class CommandHandler
java.lang.Object
org.simoes.lpd.command.CommandHandler
- Direct Known Subclasses:
- CommandPrintJob, CommandReceiveJob, CommandRemovePrintJob, CommandReportQueueStateLong, CommandReportQueueStateShort
- public abstract class CommandHandler
- extends java.lang.Object
This class is the super class for any class that handles a lpd command.
- Author:
- Chris Simoes
There will be several subclasses for each top level command of the lpd deamon.
Field Summary |
protected byte[] |
command
|
protected java.io.InputStream |
is
|
protected java.io.OutputStream |
os
|
Constructor Summary |
protected |
CommandHandler(byte[] c,
java.io.InputStream i,
java.io.OutputStream o)
|
Method Summary |
abstract void |
execute()
Processes the command in the concrete subclass. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
command
protected byte[] command
is
protected java.io.InputStream is
os
protected java.io.OutputStream os
CommandHandler
protected CommandHandler(byte[] c,
java.io.InputStream i,
java.io.OutputStream o)
execute
public abstract void execute()
throws LPDException
- Processes the command in the concrete subclass. When a command
is sent by the user a concrete class such as
CommandReceiveJob
runs its execute method to handle the command.
- Throws:
LPDException
- Throws an LPDException if an error occurs.