From 1c95bf9876e817284e3ce75a4fef38ef77974827 Mon Sep 17 00:00:00 2001 From: Simone Bordet Date: Tue, 23 Jul 2013 16:47:03 +0200 Subject: [PATCH] Code cleanups. --- .../eclipse/jetty/client/HttpExchange.java | 24 ------------------- .../client/http/HttpDestinationOverHTTP.java | 3 +-- 2 files changed, 1 insertion(+), 26 deletions(-) diff --git a/jetty-client/src/main/java/org/eclipse/jetty/client/HttpExchange.java b/jetty-client/src/main/java/org/eclipse/jetty/client/HttpExchange.java index 102004da17f..4e13c0b785b 100644 --- a/jetty-client/src/main/java/org/eclipse/jetty/client/HttpExchange.java +++ b/jetty-client/src/main/java/org/eclipse/jetty/client/HttpExchange.java @@ -19,7 +19,6 @@ package org.eclipse.jetty.client; import java.util.List; -import java.util.concurrent.CountDownLatch; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicReference; @@ -37,7 +36,6 @@ public class HttpExchange private final AtomicBoolean requestComplete = new AtomicBoolean(); private final AtomicBoolean responseComplete = new AtomicBoolean(); private final AtomicInteger complete = new AtomicInteger(); - private final CountDownLatch terminate = new CountDownLatch(2); private final AtomicReference channel = new AtomicReference<>(); private final HttpConversation conversation; private final HttpDestination destination; @@ -218,28 +216,6 @@ public class HttpExchange channel.proceed(this, proceed); } - public void terminateRequest() - { - terminate.countDown(); - } - - public void terminateResponse() - { - terminate.countDown(); - } - - public void awaitTermination() - { - try - { - terminate.await(); - } - catch (InterruptedException x) - { - LOG.ignore(x); - } - } - private String toString(int code) { String padding = "0000"; diff --git a/jetty-client/src/main/java/org/eclipse/jetty/client/http/HttpDestinationOverHTTP.java b/jetty-client/src/main/java/org/eclipse/jetty/client/http/HttpDestinationOverHTTP.java index 20030695650..19e35de9428 100644 --- a/jetty-client/src/main/java/org/eclipse/jetty/client/http/HttpDestinationOverHTTP.java +++ b/jetty-client/src/main/java/org/eclipse/jetty/client/http/HttpDestinationOverHTTP.java @@ -70,8 +70,7 @@ public class HttpDestinationOverHTTP extends HttpDestination implements Promise process(connection, false); } - // TODO: make it protected - public HttpConnectionOverHTTP acquire() + protected HttpConnectionOverHTTP acquire() { return (HttpConnectionOverHTTP)connectionPool.acquire(); }