Package com.caucho.network.listen

Examples of com.caucho.network.listen.SocketLinkListener


  }
 
  public SocketLinkListener createHttp()
    throws ConfigException
  {
    SocketLinkListener port = new SocketLinkListener();
   
    applyPortDefaults(port);

    HttpProtocol protocol = new HttpProtocol();
    port.setProtocol(protocol);

    _ports.add(port);

    return port;
  }
View Full Code Here


    }
  }

  public void add(ProtocolPort protocolPort)
  {
    SocketLinkListener port = new SocketLinkListener();

    AbstractProtocol protocol = protocolPort.getProtocol();
    port.setProtocol(protocol);

    applyPortDefaults(port);

    protocolPort.getConfigProgram().configure(port);
View Full Code Here

    Thread thread = Thread.currentThread();
    ClassLoader oldLoader = thread.getContextClassLoader();
    try {
      thread.setContextClassLoader(_classLoader);

      SocketLinkListener port = _clusterPort;

      if (port != null && port.getPort() != 0) {
        log.info("");
        port.bind();
        port.start();
        log.info("");
      }
    } finally {
      thread.setContextClassLoader(oldLoader);
    }
View Full Code Here

  {
    if ("null".equals(address))
      address = null;

    for (int i = 0; i < _ports.size(); i++) {
      SocketLinkListener serverPort = _ports.get(i);

      if (port != serverPort.getPort())
        continue;

      if ((address == null) != (serverPort.getAddress() == null))
        continue;
      else if (address == null || address.equals(serverPort.getAddress())) {
        serverPort.bind(ss);

        return;
      }
    }
View Full Code Here

          && (ports.get(0) != _clusterPort
              || ports.size() > 1)) {
        log.info("");

        for (int i = 0; i < ports.size(); i++) {
          SocketLinkListener port = ports.get(i);

          port.bind();
        }

        log.info("");
      }
    } finally {
View Full Code Here

    try {
      thread.setContextClassLoader(_classLoader);

      ArrayList<SocketLinkListener> ports = _ports;
      for (int i = 0; i < ports.size(); i++) {
        SocketLinkListener port = ports.get(i);

        port.start();
      }
    } finally {
      thread.setContextClassLoader(oldLoader);
    }
  }
View Full Code Here

      try {
        ArrayList<SocketLinkListener> ports = _ports;

        for (int i = 0; i < ports.size(); i++) {
          SocketLinkListener port = ports.get(i);

          if (port.isClosed()) {
            log.severe("Resin restarting due to closed port: " + port);
            // destroy();
            //_controller.restart();
          }
        }
View Full Code Here

      if (getSelectManager() != null)
        getSelectManager().stop();

      ArrayList<SocketLinkListener> ports = _ports;
      for (int i = 0; i < ports.size(); i++) {
        SocketLinkListener port = ports.get(i);

        try {
          if (port != _clusterPort)
            port.close();
        } catch (Throwable e) {
          log.log(Level.WARNING, e.toString(), e);
        }
      }
View Full Code Here

TOP

Related Classes of com.caucho.network.listen.SocketLinkListener

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.