FileDocCategorySizeDatePackage
SimpleServer.javaAPI DocExample784Thu Nov 08 00:22:46 GMT 2001com.ora.rmibook.chapter12.printer.applications

SimpleServer

public class SimpleServer extends Object implements NetworkConstants

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] args)

        try {
            File logfile = new File("C:\\temp\\serverLogfile");
            OutputStream outputStream = new FileOutputStream(logfile);
            Printer realPrinter = new NullPrinter(outputStream);
            Printer batchingPrinter = new BatchingPrinter(realPrinter);

            Naming.rebind(DEFAULT_PRINTER_NAME, batchingPrinter);
        } catch (Exception e) {
            e.printStackTrace();
        }