Package com.caucho.cloud.network

Examples of com.caucho.cloud.network.NetworkListenSystem


    _server = resin.createServer();
   
    thread.setContextClassLoader(_server.getClassLoader());
   
   
    NetworkListenSystem listenService
      = _system.getService(NetworkListenSystem.class);
   
    _httpPort = new TcpSocketLinkListener();
    _httpPort.setProtocol(new HttpProtocol());

    if (_watchdogPort > 0)
      _httpPort.setPort(_watchdogPort);
    else
      _httpPort.setPort(server.getWatchdogPort());

    _httpPort.setAddress(server.getWatchdogAddress());

    _httpPort.setAcceptThreadMin(2);
    _httpPort.setAcceptThreadMax(3);

    _httpPort.init();

    listenService.addListener(_httpPort);
   
    ClassLoader oldLoader = thread.getContextClassLoader();

    try {
      thread.setContextClassLoader(_system.getClassLoader());
View Full Code Here


      _port.setAddress(getAddress());
     
      _port.init();
     
      ResinSystem system = server.getResinSystem();
      NetworkListenSystem listenService
        = system.getService(NetworkListenSystem.class);
     
      listenService.addListener(_port);
     
      // server.addPort(_port);
    } catch (Exception e) {
      throw ConfigException.create(e);
    }
View Full Code Here

  @Override
  public boolean isBindPortsAfterStart()
  {
   
    ResinSystem resinSystem = _server.getResinSystem();
    NetworkListenSystem listenService
      = resinSystem.getService(NetworkListenSystem.class);
   
    return listenService.isBindPortsAfterStart();
  }
View Full Code Here

      return null;
  }
 
  private Collection<TcpSocketLinkListener> getNetworkListeners()
  {
    NetworkListenSystem listenService
    = _server.getResinSystem().getService(NetworkListenSystem.class);
 
    return listenService.getListeners();
  }
View Full Code Here

    }

    private TcpSocketLinkListener getFirstPort(String protocol, boolean isSSL)
    {
      ResinSystem resinSystem = getResinSystem();
      NetworkListenSystem listenService
        = resinSystem.getService(NetworkListenSystem.class);
     
      for (TcpSocketLinkListener port : listenService.getListeners()) {
        if (protocol.equals(port.getProtocolName()) && (port.isSSL() == isSSL))
          return port;
      }

      return null;
View Full Code Here

      // force a GC on start
      System.gc();

      _servletContainer = createServer();
     
      NetworkListenSystem listenService
        = _resinSystem.getService(NetworkListenSystem.class);

      if (_args != null) {
        for (BoundPort port : _args.getBoundPortList()) {
          listenService.bind(port.getAddress(),
                             port.getPort(),
                             port.getServerSocket());
        }
      }
     
View Full Code Here

      if (server == null)
        return "http://localhost";
     
      ResinSystem resinSystem = server.getResinSystem();
      NetworkListenSystem listenService
        = resinSystem.getService(NetworkListenSystem.class);

      for (TcpSocketLinkListener port : listenService.getListeners()) {
        if ("http".equals(port.getProtocolName())) {
          String address = port.getAddress();

          if (address == null || address.equals(""))
            address = "localhost";

          return "http://" + address + ":" + port.getPort();
        }
      }

      for (TcpSocketLinkListener port : listenService.getListeners()) {
        if ("https".equals(port.getProtocolName())) {
          String address = port.getAddress();
          if (address == null || address.equals(""))
            address = "localhost";
View Full Code Here

TOP

Related Classes of com.caucho.cloud.network.NetworkListenSystem

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.