Code example for ThreadPoolExecutor

Methods: shutdown

0
    /** 
     * To shutdown Agent immediately 
     */ 
    public void shutdownNow() { 
        try { 
            threadPool.shutdown();
            transportPool.close();
        } catch (Exception e) {
            log.warn("Agent forceful shutdown failed",e);
        } 
        AgentHolder.setAgent(null); 
    } 
 
 
    public AgentConfiguration getAgentConfiguration() { 
        return agentConfiguration;
    } 
 
    public GenericKeyedObjectPool getTransportPool() { 
        return transportPool;
    }