Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* Copyright 2014-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.glowroot.local.ui;
import java.lang.instrument.Instrumentation;
import java.util.List;
import java.util.Map;
import java.util.concurrent.Executors;
import java.util.regex.Pattern;
import javax.annotation.Nullable;
import org.glowroot.shaded.google.common.base.Stopwatch;
import org.glowroot.shaded.google.common.collect.Maps;
import org.glowroot.shaded.slf4j.Logger;
import org.glowroot.shaded.slf4j.LoggerFactory;
import static java.util.concurrent.TimeUnit.SECONDS;
class LazyHttpServer {
private static final Logger logger = LoggerFactory.getLogger(LazyHttpServer.class);
// log startup messages using logger name "org.glowroot"
private static final Logger startupLogger = LoggerFactory.getLogger("org.glowroot");
// default two http worker threads to keep # of threads down
private static final int NUM_WORKER_THREADS =
Integer.getInteger("glowroot.internal.ui.workerThreads", 2);
private final String bindAddress;
private final int port;
private final HttpSessionManager httpSessionManager;
private final IndexHtmlHttpService indexHtmlHttpService;
private final LayoutHttpService layoutHttpService;
private final LayoutService layoutService;
private final TraceDetailHttpService traceDetailHttpService;
private final TraceExportHttpService traceExportHttpService;
private final GlowrootLogHttpService glowrootLogHttpService;
private final List