Package com.caucho.server.host

Examples of com.caucho.server.host.Host


   
    os.write(HmuxRequest.HMUX_CHANNEL);
    os.write(channel >> 8);
    os.write(channel);

    Host host = _server.getHost(hostName, 80);
    if (host == null) {
      HostController controller = _server.getHostController(hostName, 80);
     
      if (controller != null) {
        writeString(os, HMUX_UNAVAILABLE, "");
      }
      else {
        writeString(os, HmuxRequest.HMUX_HEADER, "check-interval");
        writeString(os, HmuxRequest.HMUX_STRING,
                    String.valueOf(_server.getDependencyCheckInterval() / 1000));
      }

      if (isLoggable)
        log.fine(dbgId() + "host '" + hostName + "' not configured");
      return;
    }
    else if (! host.getState().isActive()) {
      writeString(os, HMUX_UNAVAILABLE, "");

      if (isLoggable)
        log.fine(dbgId() + "host '" + host + "' not active");
      return;
    }

    if (host.getConfigETag() == null)
      sendQuery(null, host, hostName, url);

    if (etag == null) {
    }
    else if (etag.equals(host.getConfigETag())) {
      if (isLoggable)
        log.fine(dbgId() + "host '" + host + "' no change");
     
      writeString(os, HMUX_NO_CHANGE, "");
      return;
    }
    else if (etag.equals("h-" + host.getName())) {
      if (isLoggable) {
        log.fine(dbgId() + "host alias '" + hostName + " -> '"
                 + host + "' no change");
      }
     
View Full Code Here


   
    if (request.isSecure())
      return AuthorizationResult.DEFAULT_ALLOW;

    WebApp webApp = (WebApp) application;
    Host host = webApp.getHost();
    String secureHost = host.getSecureHostName();

    if (secureHost != null) {
      String url = ("https://" + secureHost + webApp.getContextPath()
                    + request.getServletPath());
View Full Code Here

      HostContainer hostContainer = _hostContainer;

      if (hostContainer == null)
        return null;

      Host host = hostContainer.getHost(hostName, port);

      if (host == null)
        return null;

      return host.getWebAppContainer().findWebAppByURI(url);
    } catch (Throwable e) {
      log.log(Level.WARNING, e.toString(), e);

      return null;
    }
View Full Code Here

    Server server = Server.getCurrent();

    if (server == null || ! server.isActive())
      return null;
   
    Host host = server.getHost(name, 5222);

    if (host == null)
      return null;

    // jms/3f00 vs server/2e06
    if ("default".equals(host.getHostName())
        && ! "localhost".equals(name)) {
      return null;
    }

    Broker broker = host.getBamBroker();

    synchronized (_brokerMap) {
      _brokerMap.put(name, new WeakReference<Broker>(broker));
    }
View Full Code Here

   * Returns the owning host
   */
  @Override
  public HostMXBean getHost()
  {
    Host host = getController().getHost();

    if (host != null)
      return host.getAdmin();
    else
      return null;
  }
View Full Code Here

    return _isSecure;
  }
 
  public Boolean isRequestSecure()
  {
    Host host = _host;
   
    if (host != null)
      return host.isRequestSecure();
    else
      return null;
  }
View Full Code Here

   * Returns the matching servlet pattern for a URL.
   */
  public String getServletPattern(String hostName, int port, String url)
  {
    try {
      Host host = _hostContainer.getHost(hostName, port);

      if (host == null)
        return null;

      WebApp app = host.findWebAppByURI(url);

      if (app == null)
        return null;

      String pattern = app.getServletPattern(url);
View Full Code Here

      HostContainer hostContainer = _hostContainer;

      if (hostContainer == null)
        return null;

      Host host = hostContainer.getHost(hostName, port);

      if (host == null)
        return null;

      return host.findWebAppByURI(url);
    } catch (Throwable e) {
      log.log(Level.WARNING, e.toString(), e);

      return null;
    }
View Full Code Here

   
    if (request.isSecure())
      return AuthorizationResult.DEFAULT_ALLOW;

    WebApp app = (WebApp) application;
    Host host = (Host) app.getParent();
    String secureHost = host.getSecureHostName();

    if (secureHost != null) {
      String url = ("https://" + secureHost + app.getContextPath() +
        request.getServletPath());
View Full Code Here

  /**
   * Returns the owning host
   */
  public HostMXBean getHost()
  {
    Host host = getController().getHost();

    if (host != null)
      return host.getAdmin();
    else
      return null;
  }
View Full Code Here

TOP

Related Classes of com.caucho.server.host.Host

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.