public class PrinterStream
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
ARG_SEPARATOR
Args separated by space in the Unix command line
|
private static java.lang.String |
BACKSLASH
Backslash - escaped symbol for Unix command line
|
private static java.lang.String |
D_KEY
Key for spooler command (Linux) intended for printer name
|
private static java.lang.String |
defSpoolerCmd
The value of progress command line parameter -o for Linux,
which is default print command line string
|
private static java.lang.String |
PRINTER_PARAM
Param in Directory, corresponding to val of -o Progress start param
|
private static java.lang.String |
PROCESS_DMN_IS_NOT_INITED
Error msg, thrown when
processDmn is null when it used |
private static ProcessDaemon |
processDmn
Process launcher with stdio redirecting features
|
Constructor and Description |
---|
PrinterStream() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String[] |
generatePrinterCmd(java.lang.String printer)
Generates the print command line for with specified printer name
suitable only for Linux or Unix
|
static int |
openPrinterStream(java.lang.String printer,
StreamDaemon sd)
Constructs a remote stream instance representing the printer Stream
result of the OUTPUT TO PRINTER statement and registers it in
StreamDaemon.streams cache.
|
static void |
registerProcessDaemon(ProcessDaemon processDaemon)
Registers the
ProcessDaemon process launcher. |
private static final java.lang.String PROCESS_DMN_IS_NOT_INITED
processDmn
is null when it usedprivate static final java.lang.String ARG_SEPARATOR
private static final java.lang.String BACKSLASH
private static final java.lang.String D_KEY
private static final java.lang.String PRINTER_PARAM
private static final java.lang.String defSpoolerCmd
private static ProcessDaemon processDmn
public static int openPrinterStream(java.lang.String printer, StreamDaemon sd)
printer
- name of target printersd
- Stream daemon for remote stream operations.
Used to cache created printer streampublic static java.lang.String[] generatePrinterCmd(java.lang.String printer)
printer
- Name of printer, to generate the command line forpublic static void registerProcessDaemon(ProcessDaemon processDaemon)
ProcessDaemon
process launcher.processDaemon
- The remote process launcher