Logo Search packages:      
Sourcecode: jaminid version File versions  Download package

com::prolixtech::jaminid::Daemon::Daemon ( int  serverPort,
int  backLog,
InetAddress  adr,
ContentOracle  cOra 
) [inline]

creates a new daemon and opens on specific port

Parameters:
serverPort the port to open on
backLog maximum queue length. more concurrent connections will be rejected. default: 50
adr the address to bind to. null means any address found.
cOra the content oracle to use

Definition at line 114 of file Daemon.java.

References com::prolixtech::jaminid::ContentOracle::Instance().

                                                                                    {
        super();
        this.setName("HTTP Daemon on " + this.serverPort);
        if (cOra == null) {
            this.printlog("USING STANDARD CONTENTORACLE");
            contentOracle = ContentOracle.Instance();
        } else {
            contentOracle = cOra;
        }
        printlog("Web Server Started, Logger Connected. Using: "
                + cOra.getClass());
        this.serverPort = serverPort;
        this.backLog = backLog;
        this.adr = adr;
        try {
            serverSocket = new ServerSocket(serverPort,backLog,adr);
            RUNNING = true;
            super.start();
        } catch (Exception e) {
            SingletonLogger.Instance().severe("A major error has occured: " + e);
            SingletonLogger.Instance().severe("Perhaps I could not bind port "
                    + serverPort + ". Exiting.");

            serverSocket = null;

        }

    }


Generated by  Doxygen 1.6.0   Back to index