net.sf.lpr
Class LPRQueueDepthLong
java.lang.Object
net.sf.lpr.spi.AbstractQueueDepth
net.sf.lpr.LPRQueueDepthLong
- All Implemented Interfaces:
- LPR
public class LPRQueueDepthLong
- extends AbstractQueueDepth
- implements LPR
Concrete implementation that Queries the LPD server for its current depth passing the short code to the server.
The response is provided the caller via a Writer
. This is done to allow for the user to implement a
writer that can be used to parse the response from the LPD server. Due to the lack of standardization
for responses the only way that I could think was to provide a writer that the Socket
response could be written to.
- Author:
- x_sid
Constructor Summary |
LPRQueueDepthLong(java.lang.String serverName,
java.lang.String queue,
java.io.Writer response)
Constructor to create a query for the LPD server to respond with the current depth of the print queue. |
Method Summary |
protected DaemonCommand |
getSendQueueState(java.io.PrintStream print,
java.io.InputStream serverIn,
java.lang.String queue,
java.io.Writer response)
|
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.LPR |
print |
LPRQueueDepthLong
public LPRQueueDepthLong(java.lang.String serverName,
java.lang.String queue,
java.io.Writer response)
- Constructor to create a query for the LPD server to respond with the current depth of the print queue.
- Parameters:
serverName
- the name of the server. This is passed straight to a Socket
in the constructor of new Socket(servername, port) so it will take any thing that this constructor will takequeue
- the queue on the LPD server that is to be queried forresponse
- Writer
that the response from the server will be written to.
getSendQueueState
protected DaemonCommand getSendQueueState(java.io.PrintStream print,
java.io.InputStream serverIn,
java.lang.String queue,
java.io.Writer response)
- Specified by:
getSendQueueState
in class AbstractQueueDepth