Examples of shutdown()


Examples of org.apache.http.impl.conn.BasicClientConnectionManager.shutdown()

            LOG.error(e);
            return null;
        } finally {
            // Release httpclient resources
            uploadRequest.abort();
            httpConnectionManager.shutdown();
            // Delete cache file
            deleteCacheFile();
        }
    }
View Full Code Here

Examples of org.apache.http.impl.conn.PoolingClientConnectionManager.shutdown()

        connreq = mgr.requestConnection(new HttpRoute(target), null);
        ManagedClientConnection conn = connreq.getConnection(250, TimeUnit.MILLISECONDS);

        mgr.releaseConnection(conn, -1, null);

        mgr.shutdown();
    }

    @Test
    public void testReleaseOnEntityWriteTo() throws Exception {
        PoolingClientConnectionManager mgr = new PoolingClientConnectionManager();
View Full Code Here

Examples of org.apache.http.impl.conn.PoolingHttpClientConnectionManager.shutdown()

        Assert.assertEquals("wrong length of third response entity",
                     rsplen, data.length);
        // ignore data, but it must be read

        mgr.releaseConnection(conn, null, -1, null);
        mgr.shutdown();
    }

    /**
     * Tests releasing with time limits.
     */
 
View Full Code Here

Examples of org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager.shutdown()

                          threads[i].getResponseData());
            assertEquals("wrong length of data in thread" + i, rsplen,
                         threads[i].getResponseData().length);
        }

        mgr.shutdown();
    }

    private static ManagedClientConnection getConnection(
            final ClientConnectionManager mgr,
            final HttpRoute route,
View Full Code Here

Examples of org.apache.http.impl.nio.bootstrap.HttpServer.shutdown()

        server.awaitTermination(Long.MAX_VALUE, TimeUnit.DAYS);

        Runtime.getRuntime().addShutdownHook(new Thread() {
            @Override
            public void run() {
                server.shutdown(5, TimeUnit.SECONDS);
            }
        });

    }
View Full Code Here

Examples of org.apache.http.impl.nio.client.DefaultHttpAsyncClient.shutdown()

            } else {
                System.out.println("Request failed");
            }
            System.out.println("Shutting down");
        } finally {
            httpclient.shutdown();
        }
        System.out.println("Done");
    }

    static class MyRequestProducer implements HttpAsyncRequestProducer {
View Full Code Here

Examples of org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.shutdown()

            }
        }

        System.out.println("Shutting down I/O reactor");
       
        ioReactor.shutdown();
       
        System.out.println("Done");
    }
   
    static class MyHttpRequestExecutionHandler implements HttpRequestExecutionHandler {
View Full Code Here

Examples of org.apache.http.impl.nio.reactor.DefaultListeningIOReactor.shutdown()

                    System.err.println("Interrupted");
                } catch (IOException ex) {
                    ex.printStackTrace();
                } finally {
                    try {
                        listeningIOReactor.shutdown();
                    } catch (IOException ex2) {
                        ex2.printStackTrace();
                    }
                }
            }
View Full Code Here

Examples of org.apache.http.impl.nio.reactor.SSLIOSession.shutdown()

        try {
            sslSession.bind(SSLMode.SERVER, this.params);
        } catch (SSLException ex) {
            this.handler.exception(conn, ex);
            sslSession.shutdown();
        }
    }

    public void disconnected(final IOSession session) {
        NHttpServerIOTarget conn =
View Full Code Here

Examples of org.apache.http.nio.IOControl.shutdown()

            if (proxyTask != null) {
                synchronized (proxyTask) {
                    IOControl ioControl = proxyTask.getOriginIOControl();
                    if (ioControl != null) {
                        try {
                            ioControl.shutdown();
                        } catch (IOException ex) {
                            // ignore
                        }
                    }
                }
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.