Added capability of sending a request without waiting for the response, to test async requests.

git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@832 7e9141cc-0065-0410-87d8-b60c137991c4
This commit is contained in:
Simone Bordet 2009-09-08 20:04:18 +00:00
parent cbcbb96be1
commit dc2a817cd1
1 changed files with 8 additions and 1 deletions

View File

@ -78,6 +78,12 @@ public class LocalConnector extends AbstractConnector
return -1; return -1;
} }
public void executeRequest(String rawRequest) throws IOException
{
Request request = new Request(new ByteArrayBuffer(rawRequest, "UTF-8"), true, null);
requests.add(request);
}
private class Request implements Runnable private class Request implements Runnable
{ {
private final ByteArrayBuffer requestsBuffer; private final ByteArrayBuffer requestsBuffer;
@ -115,6 +121,7 @@ public class LocalConnector extends AbstractConnector
if (!leaveOpen) if (!leaveOpen)
connectionClosed(connection); connectionClosed(connection);
responsesBuffer = endPoint.getOut(); responsesBuffer = endPoint.getOut();
if (latch != null)
latch.countDown(); latch.countDown();
} }
} }