Examples of shutdown()


Examples of org.apache.http.HttpClientConnection.shutdown()

    public void shutdown() throws IOException {
        final CPoolEntry local = this.poolEntry;
        if (local != null) {
            final HttpClientConnection conn = local.getConnection();
            conn.shutdown();
        }
    }

    public boolean isOpen() {
        final HttpClientConnection conn = getConnection();
View Full Code Here

Examples of org.apache.http.HttpConnection.shutdown()

            public HttpAsyncRequestConsumer<HttpRequest> processRequest(
                    final HttpRequest request,
                    final HttpContext context) throws HttpException, IOException {
                final HttpConnection conn = (HttpConnection) context.getAttribute(
                        HttpCoreContext.HTTP_CONNECTION);
                conn.shutdown();
                return new BasicAsyncRequestConsumer();
            }

            @Override
            public void handle(
View Full Code Here

Examples of org.apache.http.HttpServerConnection.shutdown()

        for (Runnable runnable: runnables) {
            if (runnable instanceof Worker) {
                final Worker worker = (Worker) runnable;
                final HttpServerConnection conn = worker.getConnection();
                try {
                    conn.shutdown();
                } catch (IOException ex) {
                    this.exceptionLogger.log(ex);
                }
            }
        }
View Full Code Here

Examples of org.apache.http.conn.ClientConnectionManager.shutdown()

                @SuppressWarnings("deprecation")
                final ClientConnectionManager connectionManager = cachedBoxClient.getClientConnectionManager();
                if (connectionManager != null) {
                    LOG.debug("Closing connections for {}", cachedBoxClient);

                    connectionManager.shutdown();
                } else {
                    LOG.debug("ConnectionManager not created for {}", cachedBoxClient);
                }
            }
            LOG.debug("Shutdown successful for {}", cachedBoxClient);
View Full Code Here

Examples of org.apache.http.conn.HttpClientConnectionManager.shutdown()

            final HttpClientConnectionManager cm = connManagerCopy;
            closeablesCopy.add(new Closeable() {

                @Override
                public void close() throws IOException {
                    cm.shutdown();
                }

            });
        }
View Full Code Here

Examples of org.apache.http.conn.ManagedClientConnection.shutdown()

        } finally {

            if (conn.isOpen()) {
                System.out.println("shutting down connection");
                try {
                    conn.shutdown();
                } catch (Exception x) {
                    System.out.println("problem during shutdown");
                    x.printStackTrace(System.out);
                }
            }
View Full Code Here

Examples of org.apache.http.conn.OperatedClientConnection.shutdown()

        if (poolEntry != null)
            poolEntry.shutdownEntry();

        OperatedClientConnection conn = getWrappedConnection();
        if (conn != null) {
            conn.shutdown();
        }
    }

   
    // non-javadoc, see interface ManagedClientConnection       
View Full Code Here

Examples of org.apache.http.impl.DefaultHttpClientConnection.shutdown()

                        }
                    }
                    successCount++;
                    totalContentLen += contentLen;
                } catch (IOException ex) {
                    conn.shutdown();
                    failureCount++;
                } finally {
                    instream.close();
                }
            }
View Full Code Here

Examples of org.apache.http.impl.DefaultHttpServerConnection.shutdown()

                                s_logger.trace("I/O error", ex);
                            } catch (HttpException ex) {
                                s_logger.error("Unrecoverable HTTP protocol violation", ex);
                            } finally {
                                try {
                                    conn.shutdown();
                                } catch (IOException ignore) {
                                    s_logger.error("unexpected exception", ignore);
                                }
                            }
                      }
View Full Code Here

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

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

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

    static class StdErrorExceptionLogger implements ExceptionLogger {
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.