Renamed "Empty" inner classes to "Adapter" to comply with the rest of

the codebase.
This commit is contained in:
Simone Bordet 2013-09-04 13:15:23 +02:00
parent 3be5670448
commit 4663fa4992
26 changed files with 70 additions and 75 deletions

View File

@ -25,7 +25,6 @@ import java.util.Map;
import java.util.Queue;
import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.concurrent.atomic.AtomicInteger;
import javax.servlet.AsyncContext;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
@ -163,7 +162,7 @@ public class AsyncRestServlet extends AbstractRestServlet
out.close();
}
private abstract class AsyncRestRequest extends Response.Listener.Empty
private abstract class AsyncRestRequest extends Response.Listener.Adapter
{
final Utf8StringBuilder _content = new Utf8StringBuilder();

View File

@ -22,7 +22,7 @@ import org.eclipse.jetty.client.api.Request;
import org.eclipse.jetty.client.api.Response;
import org.eclipse.jetty.client.api.Result;
public class RedirectProtocolHandler extends Response.Listener.Empty implements ProtocolHandler
public class RedirectProtocolHandler extends Response.Listener.Adapter implements ProtocolHandler
{
private final HttpRedirector redirector;

View File

@ -503,7 +503,7 @@ public interface Request
/**
* An empty implementation of {@link Listener}
*/
public static class Empty implements Listener
public static class Adapter implements Listener
{
@Override
public void onQueued(Request request)

View File

@ -202,7 +202,7 @@ public interface Response
/**
* An empty implementation of {@link Listener}
*/
public static class Empty implements Listener
public static class Adapter implements Listener
{
@Override
public void onBegin(Response response)

View File

@ -35,7 +35,7 @@ import org.eclipse.jetty.http.HttpHeader;
* <p>The content may be retrieved from {@link #onSuccess(Response)} or {@link #onComplete(Result)}
* via {@link #getContent()} or {@link #getContentAsString()}.</p>
*/
public abstract class BufferingResponseListener extends Response.Listener.Empty
public abstract class BufferingResponseListener extends Listener.Adapter
{
private final int maxLength;
private volatile byte[] buffer = new byte[0];

View File

@ -19,7 +19,6 @@
package org.eclipse.jetty.client.util;
import java.io.IOException;
import java.io.InputStream;
import java.io.InterruptedIOException;
import java.nio.ByteBuffer;
@ -72,7 +71,7 @@ import org.eclipse.jetty.util.log.Logger;
* If the consumer is slower than the producer, then the producer will block
* until the client consumes.
*/
public class InputStreamResponseListener extends Response.Listener.Empty
public class InputStreamResponseListener extends Listener.Adapter
{
private static final Logger LOG = Log.getLogger(InputStreamResponseListener.class);
private static final byte[] EOF = new byte[0];

View File

@ -160,7 +160,7 @@ public class ExternalSiteTest
latch.countDown();
}
})
.send(new Response.Listener.Empty()
.send(new Response.Listener.Adapter()
{
@Override
public void onFailure(Response response, Throwable failure)

View File

@ -115,7 +115,7 @@ public class HttpClientAuthenticationTest extends AbstractHttpClientServerTest
AuthenticationStore authenticationStore = client.getAuthenticationStore();
final AtomicReference<CountDownLatch> requests = new AtomicReference<>(new CountDownLatch(1));
Request.Listener.Empty requestListener = new Request.Listener.Empty()
Request.Listener.Adapter requestListener = new Request.Listener.Adapter()
{
@Override
public void onSuccess(Request request)
@ -137,7 +137,7 @@ public class HttpClientAuthenticationTest extends AbstractHttpClientServerTest
authenticationStore.addAuthentication(authentication);
requests.set(new CountDownLatch(2));
requestListener = new Request.Listener.Empty()
requestListener = new Request.Listener.Adapter()
{
@Override
public void onSuccess(Request request)
@ -156,7 +156,7 @@ public class HttpClientAuthenticationTest extends AbstractHttpClientServerTest
client.getRequestListeners().remove(requestListener);
requests.set(new CountDownLatch(1));
requestListener = new Request.Listener.Empty()
requestListener = new Request.Listener.Adapter()
{
@Override
public void onSuccess(Request request)
@ -196,7 +196,7 @@ public class HttpClientAuthenticationTest extends AbstractHttpClientServerTest
client.getAuthenticationStore().addAuthentication(new BasicAuthentication(uri, realm, "basic", "basic"));
final CountDownLatch requests = new CountDownLatch(3);
Request.Listener.Empty requestListener = new Request.Listener.Empty()
Request.Listener.Adapter requestListener = new Request.Listener.Adapter()
{
@Override
public void onSuccess(Request request)
@ -235,7 +235,7 @@ public class HttpClientAuthenticationTest extends AbstractHttpClientServerTest
client.getAuthenticationStore().addAuthentication(new BasicAuthentication(uri, realm, "basic", "basic"));
final CountDownLatch requests = new CountDownLatch(3);
Request.Listener.Empty requestListener = new Request.Listener.Empty()
Request.Listener.Adapter requestListener = new Request.Listener.Adapter()
{
@Override
public void onSuccess(Request request)
@ -262,7 +262,7 @@ public class HttpClientAuthenticationTest extends AbstractHttpClientServerTest
startBasic(new EmptyServerHandler());
final AtomicReference<CountDownLatch> requests = new AtomicReference<>(new CountDownLatch(2));
Request.Listener.Empty requestListener = new Request.Listener.Empty()
Request.Listener.Adapter requestListener = new Request.Listener.Adapter()
{
@Override
public void onSuccess(Request request)

View File

@ -407,7 +407,7 @@ public class HttpClientContinueTest extends AbstractHttpClientServerTest
public Response.Listener getResponseListener()
{
final Response.Listener listener = super.getResponseListener();
return new Response.Listener.Empty()
return new Response.Listener.Adapter()
{
@Override
public void onBegin(Response response)

View File

@ -186,7 +186,7 @@ public class HttpClientLoadTest extends AbstractHttpClientServerTest
}
final CountDownLatch requestLatch = new CountDownLatch(1);
request.send(new Response.Listener.Empty()
request.send(new Response.Listener.Adapter()
{
private final AtomicInteger contentLength = new AtomicInteger();

View File

@ -129,7 +129,7 @@ public class HttpClientProxyTest extends AbstractHttpClientServerTest
URI uri = URI.create(scheme + "://" + proxyHost + ":" + proxyPort);
client.getAuthenticationStore().addAuthentication(new BasicAuthentication(uri, realm, user, password));
final AtomicInteger requests = new AtomicInteger();
client.getRequestListeners().add(new Request.Listener.Empty()
client.getRequestListeners().add(new Request.Listener.Adapter()
{
@Override
public void onSuccess(Request request)

View File

@ -381,7 +381,7 @@ public class HttpClientRedirectTest extends AbstractHttpClientServerTest
private void testMethodRedirect(final HttpMethod requestMethod, final HttpMethod redirectMethod, int redirectCode) throws Exception
{
final AtomicInteger passes = new AtomicInteger();
client.getRequestListeners().add(new org.eclipse.jetty.client.api.Request.Listener.Empty()
client.getRequestListeners().add(new org.eclipse.jetty.client.api.Request.Listener.Adapter()
{
@Override
public void onBegin(org.eclipse.jetty.client.api.Request request)

View File

@ -56,7 +56,7 @@ public class HttpClientSynchronizationTest extends AbstractHttpClientServerTest
synchronized (this)
{
request.send(new Response.Listener.Empty()
request.send(new Response.Listener.Adapter()
{
@Override
public void onFailure(Response response, Throwable failure)
@ -88,7 +88,7 @@ public class HttpClientSynchronizationTest extends AbstractHttpClientServerTest
synchronized (this)
{
request.send(new Response.Listener.Empty()
request.send(new Response.Listener.Adapter()
{
@Override
public void onComplete(Result result)

View File

@ -402,7 +402,7 @@ public class HttpClientTest extends AbstractHttpClientServerTest
}
}
})
.send(new Response.Listener.Empty()
.send(new Response.Listener.Adapter()
{
@Override
public void onSuccess(Response response)
@ -422,7 +422,7 @@ public class HttpClientTest extends AbstractHttpClientServerTest
latch.countDown();
}
})
.send(new Response.Listener.Empty()
.send(new Response.Listener.Adapter()
{
@Override
public void onSuccess(Response response)
@ -449,7 +449,7 @@ public class HttpClientTest extends AbstractHttpClientServerTest
client.newRequest("localhost", connector.getLocalPort())
.scheme(scheme)
.path("/one")
.listener(new Request.Listener.Empty()
.listener(new Request.Listener.Adapter()
{
@Override
public void onBegin(Request request)
@ -530,7 +530,7 @@ public class HttpClientTest extends AbstractHttpClientServerTest
latch.countDown();
}
})
.send(new Response.Listener.Empty()
.send(new Response.Listener.Adapter()
{
@Override
public void onSuccess(Response response)
@ -609,7 +609,7 @@ public class HttpClientTest extends AbstractHttpClientServerTest
};
}
})
.send(new Response.Listener.Empty()
.send(new Response.Listener.Adapter()
{
@Override
public void onComplete(Result result)
@ -640,7 +640,7 @@ public class HttpClientTest extends AbstractHttpClientServerTest
destination.getHttpConnectionPool().getActiveConnections().peek().close();
}
})
.send(new Response.Listener.Empty()
.send(new Response.Listener.Adapter()
{
@Override
public void onComplete(Result result)

View File

@ -98,7 +98,7 @@ public class HttpConnectionLifecycleTest extends AbstractHttpClientServerTest
headersLatch.countDown();
}
})
.send(new Response.Listener.Empty()
.send(new Response.Listener.Adapter()
{
@Override
public void onSuccess(Response response)
@ -139,7 +139,7 @@ public class HttpConnectionLifecycleTest extends AbstractHttpClientServerTest
final CountDownLatch beginLatch = new CountDownLatch(1);
final CountDownLatch failureLatch = new CountDownLatch(2);
client.newRequest(host, port).scheme(scheme).listener(new Request.Listener.Empty()
client.newRequest(host, port).scheme(scheme).listener(new Request.Listener.Adapter()
{
@Override
public void onBegin(Request request)
@ -153,7 +153,7 @@ public class HttpConnectionLifecycleTest extends AbstractHttpClientServerTest
{
failureLatch.countDown();
}
}).send(new Response.Listener.Empty()
}).send(new Response.Listener.Adapter()
{
@Override
public void onComplete(Result result)
@ -191,7 +191,7 @@ public class HttpConnectionLifecycleTest extends AbstractHttpClientServerTest
final CountDownLatch successLatch = new CountDownLatch(3);
client.newRequest(host, port)
.scheme(scheme)
.listener(new Request.Listener.Empty()
.listener(new Request.Listener.Adapter()
{
@Override
public void onBegin(Request request)
@ -206,7 +206,7 @@ public class HttpConnectionLifecycleTest extends AbstractHttpClientServerTest
successLatch.countDown();
}
})
.send(new Response.Listener.Empty()
.send(new Response.Listener.Adapter()
{
@Override
public void onSuccess(Response response)
@ -252,7 +252,7 @@ public class HttpConnectionLifecycleTest extends AbstractHttpClientServerTest
final CountDownLatch successLatch = new CountDownLatch(3);
client.newRequest(host, port)
.scheme(scheme)
.listener(new Request.Listener.Empty()
.listener(new Request.Listener.Adapter()
{
@Override
public void onBegin(Request request)
@ -280,7 +280,7 @@ public class HttpConnectionLifecycleTest extends AbstractHttpClientServerTest
successLatch.countDown();
}
})
.send(new Response.Listener.Empty()
.send(new Response.Listener.Adapter()
{
@Override
public void onSuccess(Response response)
@ -334,7 +334,7 @@ public class HttpConnectionLifecycleTest extends AbstractHttpClientServerTest
failureLatch.countDown();
}
})
.send(new Response.Listener.Empty()
.send(new Response.Listener.Adapter()
{
@Override
public void onComplete(Result result)
@ -377,7 +377,7 @@ public class HttpConnectionLifecycleTest extends AbstractHttpClientServerTest
final CountDownLatch latch = new CountDownLatch(1);
client.newRequest(host, port)
.scheme(scheme)
.send(new Response.Listener.Empty()
.send(new Response.Listener.Adapter()
{
@Override
public void onComplete(Result result)
@ -432,7 +432,7 @@ public class HttpConnectionLifecycleTest extends AbstractHttpClientServerTest
client.newRequest(host, port)
.scheme(scheme)
.content(new ByteBufferContentProvider(buffer))
.send(new Response.Listener.Empty()
.send(new Response.Listener.Adapter()
{
@Override
public void onComplete(Result result)

View File

@ -59,7 +59,7 @@ public class HttpRequestAbortTest extends AbstractHttpClientServerTest
{
client.newRequest("localhost", connector.getLocalPort())
.scheme(scheme)
.listener(new Request.Listener.Empty()
.listener(new Request.Listener.Adapter()
{
@Override
public void onQueued(Request request)
@ -97,7 +97,7 @@ public class HttpRequestAbortTest extends AbstractHttpClientServerTest
{
client.newRequest("localhost", connector.getLocalPort())
.scheme(scheme)
.listener(new Request.Listener.Empty()
.listener(new Request.Listener.Adapter()
{
@Override
public void onBegin(Request request)
@ -137,7 +137,7 @@ public class HttpRequestAbortTest extends AbstractHttpClientServerTest
{
client.newRequest("localhost", connector.getLocalPort())
.scheme(scheme)
.listener(new Request.Listener.Empty()
.listener(new Request.Listener.Adapter()
{
@Override
public void onHeaders(Request request)

View File

@ -47,7 +47,7 @@ public class HttpSenderTest
// Request request = client.newRequest(URI.create("http://localhost/"));
// final CountDownLatch headersLatch = new CountDownLatch(1);
// final CountDownLatch successLatch = new CountDownLatch(1);
// request.listener(new Request.Listener.Empty()
// request.listener(new Request.Listener.Adapter()
// {
// @Override
// public void onHeaders(Request request)
@ -108,7 +108,7 @@ public class HttpSenderTest
// HttpConnection connection = new HttpConnection(client, endPoint, destination);
// Request request = client.newRequest(URI.create("http://localhost/"));
// final CountDownLatch failureLatch = new CountDownLatch(2);
// request.listener(new Request.Listener.Empty()
// request.listener(new Request.Listener.Adapter()
// {
// @Override
// public void onFailure(Request request, Throwable x)
@ -116,7 +116,7 @@ public class HttpSenderTest
// failureLatch.countDown();
// }
// });
// connection.send(request, new Response.Listener.Empty()
// connection.send(request, new Response.Listener.Adapter()
// {
// @Override
// public void onComplete(Result result)
@ -137,7 +137,7 @@ public class HttpSenderTest
// HttpConnection connection = new HttpConnection(client, endPoint, destination);
// Request request = client.newRequest(URI.create("http://localhost/"));
// final CountDownLatch failureLatch = new CountDownLatch(2);
// request.listener(new Request.Listener.Empty()
// request.listener(new Request.Listener.Adapter()
// {
// @Override
// public void onFailure(Request request, Throwable x)
@ -145,7 +145,7 @@ public class HttpSenderTest
// failureLatch.countDown();
// }
// });
// connection.send(request, new Response.Listener.Empty()
// connection.send(request, new Response.Listener.Adapter()
// {
// @Override
// public void onComplete(Result result)
@ -175,7 +175,7 @@ public class HttpSenderTest
// request.content(new ByteBufferContentProvider(ByteBuffer.wrap(content.getBytes("UTF-8"))));
// final CountDownLatch headersLatch = new CountDownLatch(1);
// final CountDownLatch successLatch = new CountDownLatch(1);
// request.listener(new Request.Listener.Empty()
// request.listener(new Request.Listener.Adapter()
// {
// @Override
// public void onHeaders(Request request)
@ -210,7 +210,7 @@ public class HttpSenderTest
// request.content(new ByteBufferContentProvider(ByteBuffer.wrap(content1.getBytes("UTF-8")), ByteBuffer.wrap(content2.getBytes("UTF-8"))));
// final CountDownLatch headersLatch = new CountDownLatch(1);
// final CountDownLatch successLatch = new CountDownLatch(1);
// request.listener(new Request.Listener.Empty()
// request.listener(new Request.Listener.Adapter()
// {
// @Override
// public void onHeaders(Request request)
@ -252,7 +252,7 @@ public class HttpSenderTest
// });
// final CountDownLatch headersLatch = new CountDownLatch(1);
// final CountDownLatch successLatch = new CountDownLatch(1);
// request.listener(new Request.Listener.Empty()
// request.listener(new Request.Listener.Adapter()
// {
// @Override
// public void onHeaders(Request request)

View File

@ -133,7 +133,7 @@ public class Usage
Response response = client.newRequest("localhost", 8080)
// Add a request listener
.listener(new Request.Listener.Empty()
.listener(new Request.Listener.Adapter()
{
@Override
public void onSuccess(Request request)
@ -319,7 +319,7 @@ public class Usage
DeferredContentProvider async = new DeferredContentProvider(ByteBuffer.wrap(new byte[]{0, 1, 2}));
client.newRequest("localhost", 8080)
.content(async)
.send(new Response.Listener.Empty()
.send(new Response.Listener.Adapter()
{
@Override
public void onBegin(Response response)

View File

@ -71,7 +71,7 @@ public interface Connection extends AutoCloseable
public void onClosed(Connection connection);
public static class Empty implements Listener
public static class Adapter implements Listener
{
@Override
public void onOpened(Connection connection)

View File

@ -79,7 +79,7 @@ public interface NetworkTrafficListener
/**
* <p>A commodity class that implements {@link NetworkTrafficListener} with empty methods.</p>
*/
public static class Empty implements NetworkTrafficListener
public static class Adapter implements NetworkTrafficListener
{
public void opened(Socket socket)
{

View File

@ -629,7 +629,7 @@ public class ProxyServlet extends HttpServlet
}
}
private class ProxyResponseListener extends Response.Listener.Empty
private class ProxyResponseListener extends Response.Listener.Adapter
{
private final HttpServletRequest request;
private final HttpServletResponse response;

View File

@ -27,7 +27,6 @@ import java.net.Socket;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@ -41,7 +40,6 @@ import org.eclipse.jetty.toolchain.test.http.SimpleHttpResponse;
import org.eclipse.jetty.util.IO;
import org.eclipse.jetty.util.resource.Resource;
import org.eclipse.jetty.util.ssl.SslContextFactory;
import org.hamcrest.Matchers;
import org.junit.Assert;
import org.junit.Test;
@ -69,7 +67,7 @@ public class ConnectionOpenCloseTest extends AbstractHttpTest
final AtomicInteger callbacks = new AtomicInteger();
final CountDownLatch openLatch = new CountDownLatch(1);
final CountDownLatch closeLatch = new CountDownLatch(1);
connector.addBean(new Connection.Listener.Empty()
connector.addBean(new Connection.Listener.Adapter()
{
@Override
public void onOpened(Connection connection)
@ -119,7 +117,7 @@ public class ConnectionOpenCloseTest extends AbstractHttpTest
final AtomicInteger callbacks = new AtomicInteger();
final CountDownLatch openLatch = new CountDownLatch(1);
final CountDownLatch closeLatch = new CountDownLatch(1);
connector.addBean(new Connection.Listener.Empty()
connector.addBean(new Connection.Listener.Adapter()
{
@Override
public void onOpened(Connection connection)
@ -190,7 +188,7 @@ public class ConnectionOpenCloseTest extends AbstractHttpTest
final AtomicInteger callbacks = new AtomicInteger();
final CountDownLatch openLatch = new CountDownLatch(1);
final CountDownLatch closeLatch = new CountDownLatch(1);
connector.addBean(new Connection.Listener.Empty()
connector.addBean(new Connection.Listener.Adapter()
{
@Override
public void onOpened(Connection connection)

View File

@ -18,10 +18,6 @@
package org.eclipse.jetty.server;
import static org.hamcrest.Matchers.containsString;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
@ -30,6 +26,10 @@ import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import static org.hamcrest.Matchers.containsString;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
public class LocalConnectorTest
{
private Server _server;
@ -59,7 +59,7 @@ public class LocalConnectorTest
{
final CountDownLatch openLatch = new CountDownLatch(1);
final CountDownLatch closeLatch = new CountDownLatch(1);
_connector.addBean(new Connection.Listener.Empty()
_connector.addBean(new Connection.Listener.Adapter()
{
@Override
public void onOpened(Connection connection)

View File

@ -18,9 +18,6 @@
package org.eclipse.jetty.server;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
@ -30,7 +27,6 @@ import java.nio.ByteBuffer;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicReference;
import javax.servlet.ServletException;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletRequest;
@ -45,6 +41,9 @@ import org.junit.After;
import org.junit.Ignore;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@Ignore
public class NetworkTrafficListenerTest
{
@ -82,7 +81,7 @@ public class NetworkTrafficListenerTest
final CountDownLatch openedLatch = new CountDownLatch(1);
final CountDownLatch closedLatch = new CountDownLatch(1);
connector.addNetworkTrafficListener(new NetworkTrafficListener.Empty()
connector.addNetworkTrafficListener(new NetworkTrafficListener.Adapter()
{
public volatile Socket socket;
@ -125,7 +124,7 @@ public class NetworkTrafficListenerTest
final CountDownLatch incomingLatch = new CountDownLatch(1);
final AtomicReference<String> outgoingData = new AtomicReference<String>("");
final CountDownLatch outgoingLatch = new CountDownLatch(1);
connector.addNetworkTrafficListener(new NetworkTrafficListener.Empty()
connector.addNetworkTrafficListener(new NetworkTrafficListener.Adapter()
{
@Override
public void incoming(Socket socket, ByteBuffer bytes)
@ -190,7 +189,7 @@ public class NetworkTrafficListenerTest
final CountDownLatch incomingLatch = new CountDownLatch(1);
final AtomicReference<String> outgoingData = new AtomicReference<String>("");
final CountDownLatch outgoingLatch = new CountDownLatch(2);
connector.addNetworkTrafficListener(new NetworkTrafficListener.Empty()
connector.addNetworkTrafficListener(new NetworkTrafficListener.Adapter()
{
public void incoming(Socket socket, ByteBuffer bytes)
{
@ -257,7 +256,7 @@ public class NetworkTrafficListenerTest
final CountDownLatch incomingLatch = new CountDownLatch(1);
final AtomicReference<String> outgoingData = new AtomicReference<String>("");
final CountDownLatch outgoingLatch = new CountDownLatch(4);
connector.addNetworkTrafficListener(new NetworkTrafficListener.Empty()
connector.addNetworkTrafficListener(new NetworkTrafficListener.Adapter()
{
public void incoming(Socket socket, ByteBuffer bytes)
{
@ -323,7 +322,7 @@ public class NetworkTrafficListenerTest
final CountDownLatch incomingLatch = new CountDownLatch(1);
final AtomicReference<String> outgoingData = new AtomicReference<String>("");
final CountDownLatch outgoingLatch = new CountDownLatch(1);
connector.addNetworkTrafficListener(new NetworkTrafficListener.Empty()
connector.addNetworkTrafficListener(new NetworkTrafficListener.Adapter()
{
public void incoming(Socket socket, ByteBuffer bytes)
{
@ -396,7 +395,7 @@ public class NetworkTrafficListenerTest
final AtomicReference<String> incomingData = new AtomicReference<String>("");
final AtomicReference<String> outgoingData = new AtomicReference<String>("");
final CountDownLatch outgoingLatch = new CountDownLatch(1);
connector.addNetworkTrafficListener(new NetworkTrafficListener.Empty()
connector.addNetworkTrafficListener(new NetworkTrafficListener.Adapter()
{
public void incoming(Socket socket, ByteBuffer bytes)
{

View File

@ -132,7 +132,7 @@ public class HTTPProxyEngine extends ProxyEngine
private void sendRequest(final Stream clientStream, Request request)
{
request.send(new Response.Listener.Empty()
request.send(new Response.Listener.Adapter()
{
private volatile boolean committed;

View File

@ -384,7 +384,7 @@ public class PushStrategyBenchmarkTest extends AbstractHTTPSPDYTest
}
}
private class TestListener extends Response.Listener.Empty
private class TestListener extends Response.Listener.Adapter
{
@Override
public void onComplete(Result result)