Examples of JettyIoPoolManager


Examples of com.proofpoint.http.client.AsyncHttpClientModule.JettyIoPoolManager

    @SafeVarargs
    private final void assertPrivatePools(Injector injector, Class<? extends Annotation>... privateClientAnnotations)
            throws Exception
    {
        JettyIoPoolManager sharedPool = injector.getInstance(Key.get(JettyIoPoolManager.class));
        // pool should not be destroyed yet
        assertFalse(sharedPool.isDestroyed());

        Set<JettyIoPoolManager> privatePools = Collections.newSetFromMap(new IdentityHashMap<JettyIoPoolManager, Boolean>());
        for (Class<? extends Annotation> privateClientAnnotation : privateClientAnnotations) {
            assertNotNull(injector.getExistingBinding(Key.get(JettyIoPoolManager.class, privateClientAnnotation)));
            JettyIoPoolManager privatePool = injector.getInstance(Key.get(JettyIoPoolManager.class, privateClientAnnotation));

            // pool should not be the same as any other pool
            assertNotSame(privatePool, sharedPool);
            assertFalse(privatePools.contains(privatePool));
            privatePools.add(privatePool);
View Full Code Here

Examples of com.proofpoint.http.client.AsyncHttpClientModule.JettyIoPoolManager

    @SafeVarargs
    private final void assertPoolsDestroyProperly(Injector injector, Class<? extends Annotation>... privateClientAnnotations)
            throws Exception
    {
        JettyIoPoolManager sharedPool = injector.getInstance(Key.get(JettyIoPoolManager.class));
        assertFalse(sharedPool.isDestroyed());

        Set<JettyIoPoolManager> privatePools = Collections.newSetFromMap(new IdentityHashMap<JettyIoPoolManager, Boolean>());
        for (Class<? extends Annotation> privateClientAnnotation : privateClientAnnotations) {
            JettyIoPoolManager privatePool = injector.getInstance(Key.get(JettyIoPoolManager.class, privateClientAnnotation));
            assertFalse(privatePool.isDestroyed());
        }

        injector.getInstance(LifeCycleManager.class).stop();

        assertTrue(sharedPool.isDestroyed());
        for (JettyIoPoolManager privatePool : privatePools) {
            assertTrue(privatePool.isDestroyed());
        }
    }
View Full Code Here

Examples of io.airlift.http.client.HttpClientModule.JettyIoPoolManager

    @SafeVarargs
    private final void assertPrivatePools(Injector injector, Class<? extends Annotation>... privateClientAnnotations)
            throws Exception
    {
        JettyIoPoolManager sharedPool = injector.getInstance(Key.get(JettyIoPoolManager.class));
        // pool should not be destroyed yet
        assertFalse(sharedPool.isDestroyed());

        Set<JettyIoPoolManager> privatePools = Collections.newSetFromMap(new IdentityHashMap<JettyIoPoolManager, Boolean>());
        for (Class<? extends Annotation> privateClientAnnotation : privateClientAnnotations) {
            assertNotNull(injector.getExistingBinding(Key.get(JettyIoPoolManager.class, privateClientAnnotation)));
            JettyIoPoolManager privatePool = injector.getInstance(Key.get(JettyIoPoolManager.class, privateClientAnnotation));

            // pool should not be the same as any other pool
            assertNotSame(privatePool, sharedPool);
            assertFalse(privatePools.contains(privatePool));
            privatePools.add(privatePool);
View Full Code Here

Examples of io.airlift.http.client.HttpClientModule.JettyIoPoolManager

    @SafeVarargs
    private final void assertPoolsDestroyProperly(Injector injector, Class<? extends Annotation>... privateClientAnnotations)
            throws Exception
    {
        JettyIoPoolManager sharedPool = injector.getInstance(Key.get(JettyIoPoolManager.class));
        assertFalse(sharedPool.isDestroyed());

        Set<JettyIoPoolManager> privatePools = Collections.newSetFromMap(new IdentityHashMap<JettyIoPoolManager, Boolean>());
        for (Class<? extends Annotation> privateClientAnnotation : privateClientAnnotations) {
            JettyIoPoolManager privatePool = injector.getInstance(Key.get(JettyIoPoolManager.class, privateClientAnnotation));
            assertFalse(privatePool.isDestroyed());
        }

        injector.getInstance(LifeCycleManager.class).stop();

        assertTrue(sharedPool.isDestroyed());
        for (JettyIoPoolManager privatePool : privatePools) {
            assertTrue(privatePool.isDestroyed());
        }
    }
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.