updated servlet 3 api

git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@1312 7e9141cc-0065-0410-87d8-b60c137991c4
This commit is contained in:
Greg Wilkins 2010-02-28 11:22:01 +00:00
parent 57423b8dd9
commit 27aa1d806d
3 changed files with 26 additions and 6 deletions

View File

@ -32,6 +32,7 @@ jetty-7.0.2-SNAPSHOT
+ JETTY-1184 shrink thread pool even with frequent small jobs
+ COMETD-46 reset ContentExchange response content on resend
+ Added IPAccessHandler
+ Updated Servlet3Continuation to final 3.0.20100224
jetty-7.0.1.v20091125 25 November 2009
+ 274251 DefaultServlet supports exact match mode.

View File

@ -70,7 +70,7 @@
<dependency>
<groupId>org.mortbay.jetty</groupId>
<artifactId>servlet-api</artifactId>
<version>3.0.PFD20090525</version>
<version>3.0.20100224</version>
<scope>provided</scope>
</dependency>
<dependency>

View File

@ -33,9 +33,19 @@ public class Servlet3Continuation implements Continuation
{
}
public void onError(AsyncEvent event) throws IOException
{
}
public void onStartAsync(AsyncEvent event) throws IOException
{
event.getAsyncContext().addListener(this);
}
public void onTimeout(AsyncEvent event) throws IOException
{
_initial=false;
event.getAsyncContext().dispatch();
}
};
@ -48,17 +58,26 @@ public class Servlet3Continuation implements Continuation
{
_request=request;
}
public void addContinuationListener(final ContinuationListener listener)
{
_request.addAsyncListener(new AsyncListener()
_context.addListener(new AsyncListener()
{
public void onComplete(final AsyncEvent event) throws IOException
{
listener.onComplete(Servlet3Continuation.this);
}
public void onError(AsyncEvent event) throws IOException
{
listener.onComplete(Servlet3Continuation.this);
}
public void onStartAsync(AsyncEvent event) throws IOException
{
event.getAsyncContext().addListener(this);
}
public void onTimeout(AsyncEvent event) throws IOException
{
_expired=true;
@ -117,25 +136,25 @@ public class Servlet3Continuation implements Continuation
public void setTimeout(long timeoutMs)
{
_request.setAsyncTimeout(timeoutMs);
_context.setTimeout(timeoutMs);
}
public void suspend(ServletResponse response)
{
_response=response;
_responseWrapped=response instanceof ServletResponseWrapper;
_request.addAsyncListener(_listener);
_resumed=false;
_expired=false;
_context=_request.startAsync();
_context.addListener(_listener);
}
public void suspend()
{
_request.addAsyncListener(_listener);
_resumed=false;
_expired=false;
_context=_request.startAsync();
_context.addListener(_listener);
}
public boolean isResponseWrapped()