Examples of Host


Examples of org.apache.catalina.Host

        if (!logged && useDefault) {
            AccessLog newDefaultAccessLog = defaultAccessLog.get();
            if (newDefaultAccessLog == null) {
                // If we reached this point, this Engine can't have an AccessLog
                // Look in the defaultHost
                Host host = (Host) findChild(getDefaultHost());
                Context context = null;
                boolean checkHost = (host != null);
                if (checkHost && host instanceof ContainerBase) {
                    checkHost = ((ContainerBase) host).started;
                }
                if (checkHost) {
                    newDefaultAccessLog = host.getAccessLog();

                    if (newDefaultAccessLog != null) {
                        if (defaultAccessLog.compareAndSet(null,
                                newDefaultAccessLog)) {
                            AccessLogListener l = new AccessLogListener(this,
                                    host, null);
                            l.install();
                        }
                    } else {
                        // Try the ROOT context of default host
                        context = (Context) host.findChild("");
                        boolean checkContext = (context != null);
                        if (checkContext && context instanceof ContainerBase) {
                            checkContext = ((ContainerBase) context).started;
                        }
                        if (checkContext) {
View Full Code Here

Examples of org.apache.catalina.Host

        Iterator<Map.Entry<String,String>> iterator =
            sortedHostNamesMap.entrySet().iterator();
        while (iterator.hasNext()) {
            Map.Entry<String,String> entry = iterator.next();
            String hostName = (String) entry.getKey();
            Host host = (Host) engine.findChild(hostName);

            if (host != null ) {
                args = new Object[2];
                args[0] = RequestUtil.filter(hostName);
                String[] aliases = host.findAliases();
                StringBuffer buf = new StringBuffer();
                if (aliases.length > 0) {
                    buf.append(aliases[0]);
                    for (int j = 1; j < aliases.length; j++) {
                        buf.append(", ").append(aliases[j]);
View Full Code Here

Examples of org.apache.catalina.Host

        if ((uri == null) || (!uri.startsWith("/")))
            return (null);

        Context child = null;
        try {
            Host host = (Host) context.getParent();
            String mapuri = uri;
            while (true) {
                child = (Context) host.findChild(mapuri);
                if (child != null)
                    break;
                int slash = mapuri.lastIndexOf('/');
                if (slash < 0)
                    break;
View Full Code Here

Examples of org.apache.catalina.Host

                        ",name=" + quotedResourceName);
        } else if (container instanceof Context) {                   
            String path = ((Context)container).getPath();
            if (path.length() < 1)
                path = "/";
            Host host = (Host) ((Context)container).getParent();
            Engine engine = (Engine) host.getParent();
            Service service = engine.getService();
            name = new ObjectName(domain + ":type=DataSource" +
                        ",path=" + path +
                        ",host=" + host.getName() +
                        ",class=" + resource.getType() +
                        ",name=" + quotedResourceName);
        }
       
        return (name);
View Full Code Here

Examples of org.apache.hadoop.gateway.util.urltemplate.Host

      results = new ArrayList<String>( parameters.size() );
      for( String parameter : parameters ) {
        String url = lookupServiceUrl( parameter );
        if( url != null ) {
          Template template = Parser.parse( url );
          Host host = template.getHost();
          if( host != null ) {
            String hostStr = host.getFirstValue().getPattern();
            if( hostmap != null ) {
              switch( context.getDirection() ) {
                case IN:
                  parameter = hostmap.resolveInboundHostName( hostStr );
                  break;
View Full Code Here

Examples of org.apache.hive.ptest.execution.conf.Host

    if(!hostsToTerminate.isEmpty()) {
      LOG.info("Replacing " + hostsToTerminate);
      terminate(hostsToTerminate, true);
      Set<NodeMetadata> nodes = createNodes(hostsToTerminate.size());
      for (NodeMetadata node : nodes) {
        executionContext.addHost(new Host(publicIp(node), mUser, mSlaveLocalDirs,
            mNumThreads));
      }
    }
    Preconditions.checkState(hostsNotRemoved.isEmpty(),
        "Host " + hostsNotRemoved + " was in bad hosts but could not be removed");
View Full Code Here

Examples of org.apache.nutch.storage.Host

        // Create a new queue
        if (useHostSettings) {
          // Use host specific queue settings (if defined in the host table)
          try {
            String hostname = id.substring(id.indexOf("://")+3);
            Host host = hostDb.getByHostName(hostname);
            if (host != null) {
              fiq = new FetchItemQueue(conf,
                                       host.getInt("q_mt", maxThreads),
                                       host.getLong("q_cd", crawlDelay),
                                       host.getLong("q_mcd", minCrawlDelay));
            }
           
          } catch (IOException e) {
            LOG.error("Error while trying to access host settings", e);
          }
View Full Code Here

Examples of org.apache.oodt.cas.resource.monitor.ganglia.configuration.Host

    /**
     * test the "<HOST>" tag data
     * <HOST NAME="" IP="" REPORTED="" TN="" TMAX="" DMAX="" LOCATION="" GMOND_STARTED="">
     */
    public void testHostTag() {
        Host host = ((gridConfiguration.get(0)).getHosts()).get(0);
        assertEquals("localhost", host.getName());
        assertEquals("127.0.0.1", host.getIp());
        assertEquals("1370187637", host.getReported());
        assertEquals("10", host.getTn());
        assertEquals("20", host.getTmax());
        assertEquals("0", host.getDmax());
        assertEquals("0,0,0", host.getLocation());
        assertEquals("1370186237", host.getGmondstarted());
    }
View Full Code Here

Examples of org.apache.tomcat.Host

  throws IOException, ServletException {

  StandardEngine engine = (StandardEngine) getContainer();

  // Select the host to be used for this request
  Host host = engine.map(request);
  if (host == null) {
      response.getResponse().sendError
    (HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
     sm.getString("standardEngine.noHost"));
      return;
  }

  // Ask this Host to process this request
  host.invoke(request, response);

    }
View Full Code Here

Examples of org.apache.tomcat.Host

      server = defaultHost;
  if (server == null)
      return (null);

  // Find the matching child Host
  Host host = (Host) findChild(server);
  if ((host == null) && (unknownHost != null))
      host = (Host) findChild(unknownHost);
  return (host);

    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.