Package org.apache.vinci.transport

Examples of org.apache.vinci.transport.BaseServer$PooledThread


    vns.backupThread = new Thread(vns.backupThreadRunnable);
    vns.backupThread.start();

    // Start accepting connections and processing stuff
    Debug.p("Serving on port : " + vns.port);
    BaseServer server = null;
    if (bindAddress != null) {
      server = new BaseServer(vns) {
        protected ServerSocket createServerSocket(int port) throws IOException {
          return new ServerSocket(port, backlog, InetAddress.getByName(bindAddress));
        }
      };
    } else {
      server = new BaseServer(vns) {
        protected ServerSocket createServerSocket(int port) throws IOException {
          return new ServerSocket(port, backlog);
        }
      };
    }
    server.setSocketTimeout(5000);
    exitThread exitT = new exitThread(server);
    exitT.start();
    try {
      server.setThreadPoolSize(5, maxThreads);
      server.serve(vns.port);
    } catch (Throwable e) {
      Debug.reportException(e);
    } finally {
      Debug.p("Exiting.");
      System.exit(0);
View Full Code Here


    vns.backupThread = new Thread(vns.backupThreadRunnable);
    vns.backupThread.start();

    // Start accepting connections and processing stuff
    Debug.p("Serving on port : " + vns.port);
    BaseServer server = null;
    if (bindAddress != null) {
      server = new BaseServer(vns) {
        protected ServerSocket createServerSocket(int port) throws IOException {
          return new ServerSocket(port, backlog, InetAddress.getByName(bindAddress));
        }
      };
    } else {
      server = new BaseServer(vns) {
        protected ServerSocket createServerSocket(int port) throws IOException {
          return new ServerSocket(port, backlog);
        }
      };
    }
    server.setSocketTimeout(5000);
    exitThread exitT = new exitThread(server);
    exitT.start();
    try {
      server.setThreadPoolSize(5, maxThreads);
      server.serve(vns.port);
    } catch (Throwable e) {
      Debug.reportException(e);
    } finally {
      Debug.p("Exitting.");
      System.exit(0);
View Full Code Here

TOP

Related Classes of org.apache.vinci.transport.BaseServer$PooledThread

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.