HTTP client: renamed Request.aborted() to Request.isAborted() to comply with the naming convention.

This commit is contained in:
Simone Bordet 2012-10-31 13:20:52 +01:00
parent 61c607076a
commit 62f8e13397
6 changed files with 8 additions and 8 deletions

View File

@ -248,7 +248,7 @@ public class HttpDestination implements Destination, AutoCloseable, Dumpable
{
final Request request = requestContext.request;
final List<Response.ResponseListener> listeners = requestContext.listeners;
if (request.aborted())
if (request.isAborted())
{
abort(request, listeners, "Aborted");
LOG.debug("Aborted {} before processing", request);

View File

@ -413,7 +413,7 @@ public class HttpRequest implements Request
}
@Override
public boolean aborted()
public boolean isAborted()
{
return aborted;
}

View File

@ -82,7 +82,7 @@ public class HttpSender
}
Request request = exchange.getRequest();
if (request.aborted())
if (request.isAborted())
{
exchange.abort(null);
}
@ -400,7 +400,7 @@ public class HttpSender
Result result = completion.getReference();
boolean notCommitted = current == State.IDLE || current == State.SEND;
if (result == null && notCommitted && !request.aborted())
if (result == null && notCommitted && !request.isAborted())
{
result = exchange.responseComplete(failure).getReference();
exchange.terminateResponse();

View File

@ -126,7 +126,7 @@ public class RedirectProtocolHandler extends Response.Listener.Empty implements
@Override
public void onBegin(Request redirect)
{
if (request.aborted())
if (request.isAborted())
redirect.abort(null);
}
});

View File

@ -316,7 +316,7 @@ public interface Request
/**
* @return whether {@link #abort(String)} was called
*/
boolean aborted();
boolean isAborted();
public interface RequestListener extends EventListener
{

View File

@ -151,7 +151,7 @@ public class HttpClientTimeoutTest extends AbstractHttpClientServerTest
TimeUnit.MILLISECONDS.sleep(2 * timeout);
Assert.assertFalse(request.aborted());
Assert.assertFalse(request.isAborted());
}
@Slow
@ -208,7 +208,7 @@ public class HttpClientTimeoutTest extends AbstractHttpClientServerTest
TimeUnit.MILLISECONDS.sleep(2 * timeout);
Assert.assertFalse(request.aborted());
Assert.assertFalse(request.isAborted());
}
}