Code cleanups.

This commit is contained in:
Simone Bordet 2013-07-23 16:47:03 +02:00
parent ff3b36cfb0
commit 1c95bf9876
2 changed files with 1 additions and 26 deletions

View File

@ -19,7 +19,6 @@
package org.eclipse.jetty.client; package org.eclipse.jetty.client;
import java.util.List; import java.util.List;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicReference; import java.util.concurrent.atomic.AtomicReference;
@ -37,7 +36,6 @@ public class HttpExchange
private final AtomicBoolean requestComplete = new AtomicBoolean(); private final AtomicBoolean requestComplete = new AtomicBoolean();
private final AtomicBoolean responseComplete = new AtomicBoolean(); private final AtomicBoolean responseComplete = new AtomicBoolean();
private final AtomicInteger complete = new AtomicInteger(); private final AtomicInteger complete = new AtomicInteger();
private final CountDownLatch terminate = new CountDownLatch(2);
private final AtomicReference<HttpChannel> channel = new AtomicReference<>(); private final AtomicReference<HttpChannel> channel = new AtomicReference<>();
private final HttpConversation conversation; private final HttpConversation conversation;
private final HttpDestination destination; private final HttpDestination destination;
@ -218,28 +216,6 @@ public class HttpExchange
channel.proceed(this, proceed); 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) private String toString(int code)
{ {
String padding = "0000"; String padding = "0000";

View File

@ -70,8 +70,7 @@ public class HttpDestinationOverHTTP extends HttpDestination implements Promise
process(connection, false); process(connection, false);
} }
// TODO: make it protected protected HttpConnectionOverHTTP acquire()
public HttpConnectionOverHTTP acquire()
{ {
return (HttpConnectionOverHTTP)connectionPool.acquire(); return (HttpConnectionOverHTTP)connectionPool.acquire();
} }