Example usage for org.apache.commons.httpclient CustomMultiThreadedHttpConnectionManager shutdownAll

List of usage examples for org.apache.commons.httpclient CustomMultiThreadedHttpConnectionManager shutdownAll

Introduction

In this page you can find the example usage for org.apache.commons.httpclient CustomMultiThreadedHttpConnectionManager shutdownAll.

Prototype

public static void shutdownAll() 

Source Link

Document

Shuts down and cleans up resources used by all instances of MultiThreadedHttpConnectionManager.

Usage

From source file:org.sonatype.nexus.DefaultNexus.java

protected void stopService() throws Exception {
    applicationStatusSource.getSystemStatus().setState(SystemState.STOPPING);

    // Due to no dependency mechanism in NX for components, we need to fire off a hint about shutdown first
    eventBus.post(new NexusStoppingEvent(this));

    nexusScheduler.shutdown();//from   w  w  w . j a va  2 s .co m

    eventBus.post(new NexusStoppedEvent(this));

    nexusConfiguration.dropInternals();

    securitySystem.stop();

    applicationStatusSource.getSystemStatus().setState(SystemState.STOPPED);

    // Now a cleanup, to kill dangling thread of HttpClients
    CustomMultiThreadedHttpConnectionManager.shutdownAll();

    getLogger().info("Stopped {}", getNexusNameForLogs());
}