diff --git a/jetty-continuation/src/main/java/org/eclipse/jetty/continuation/Continuation.java b/jetty-continuation/src/main/java/org/eclipse/jetty/continuation/Continuation.java index 8eb512b7736..03a3e0ca602 100644 --- a/jetty-continuation/src/main/java/org/eclipse/jetty/continuation/Continuation.java +++ b/jetty-continuation/src/main/java/org/eclipse/jetty/continuation/Continuation.java @@ -19,7 +19,6 @@ package org.eclipse.jetty.continuation; import javax.servlet.FilterChain; -import javax.servlet.Servlet; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import javax.servlet.ServletResponseWrapper; @@ -138,8 +137,10 @@ import javax.servlet.ServletResponseWrapper; * * @see ContinuationSupport * @see ContinuationListener - * + * + * @deprecated use Servlet 3.0 {@link javax.servlet.AsyncContext} instead */ +@Deprecated public interface Continuation { public final static String ATTRIBUTE = "org.eclipse.jetty.continuation"; diff --git a/jetty-continuation/src/main/java/org/eclipse/jetty/continuation/ContinuationFilter.java b/jetty-continuation/src/main/java/org/eclipse/jetty/continuation/ContinuationFilter.java index 82ed4762bed..cdc9daf3f51 100644 --- a/jetty-continuation/src/main/java/org/eclipse/jetty/continuation/ContinuationFilter.java +++ b/jetty-continuation/src/main/java/org/eclipse/jetty/continuation/ContinuationFilter.java @@ -48,7 +48,9 @@ import javax.servlet.ServletResponse; * {@link Continuation#complete()} is called.

*

Faux continuations are not threadless continuations (they are "faux" - fake - for this reason) * and as such they will scale less than proper continuations.

+ * @deprecated use Servlet 3.0 {@link javax.servlet.AsyncContext} instead */ +@Deprecated public class ContinuationFilter implements Filter { static boolean _initialized; @@ -60,6 +62,7 @@ public class ContinuationFilter implements Filter public void init(FilterConfig filterConfig) throws ServletException { + filterConfig.getServletContext().log("WARNING: " + this.getClass().getName() + " is now DEPRECATED, use Servlet 3.0 AsyncContext instead."); boolean jetty_7_or_greater="org.eclipse.jetty.servlet".equals(filterConfig.getClass().getPackage().getName()); _context = filterConfig.getServletContext(); diff --git a/jetty-continuation/src/main/java/org/eclipse/jetty/continuation/ContinuationListener.java b/jetty-continuation/src/main/java/org/eclipse/jetty/continuation/ContinuationListener.java index 4c9574e9a57..56ef5c89cdc 100644 --- a/jetty-continuation/src/main/java/org/eclipse/jetty/continuation/ContinuationListener.java +++ b/jetty-continuation/src/main/java/org/eclipse/jetty/continuation/ContinuationListener.java @@ -27,7 +27,9 @@ import javax.servlet.ServletRequestListener; *

* A ContinuationListener may be registered with a call to * {@link Continuation#addContinuationListener(ContinuationListener)}. + * @deprecated use Servlet 3.0 {@link javax.servlet.AsyncContext} instead */ +@Deprecated public interface ContinuationListener extends EventListener { /* ------------------------------------------------------------ */ diff --git a/jetty-continuation/src/main/java/org/eclipse/jetty/continuation/ContinuationSupport.java b/jetty-continuation/src/main/java/org/eclipse/jetty/continuation/ContinuationSupport.java index 4d1270b24ec..ab377be5c52 100644 --- a/jetty-continuation/src/main/java/org/eclipse/jetty/continuation/ContinuationSupport.java +++ b/jetty-continuation/src/main/java/org/eclipse/jetty/continuation/ContinuationSupport.java @@ -29,7 +29,9 @@ import javax.servlet.ServletResponse; * * Factory class for accessing Continuation instances, which with either be * a servlet 3.0 or a faux continuation. + * @deprecated use Servlet 3.0 {@link javax.servlet.AsyncContext} instead */ +@Deprecated public class ContinuationSupport { static final boolean __servlet3; diff --git a/jetty-continuation/src/main/java/org/eclipse/jetty/continuation/ContinuationThrowable.java b/jetty-continuation/src/main/java/org/eclipse/jetty/continuation/ContinuationThrowable.java index 8044dcbbbe6..9f67ef3203e 100644 --- a/jetty-continuation/src/main/java/org/eclipse/jetty/continuation/ContinuationThrowable.java +++ b/jetty-continuation/src/main/java/org/eclipse/jetty/continuation/ContinuationThrowable.java @@ -41,7 +41,9 @@ package org.eclipse.jetty.continuation; * to be uncaught (or rethrown) by a Filter/Servlet. A ContinuationThrowable * does not represent and error condition. *

+ * @deprecated use Servlet 3.0 {@link javax.servlet.AsyncContext} instead */ +@Deprecated public class ContinuationThrowable extends Error { public ContinuationThrowable() diff --git a/jetty-continuation/src/main/java/org/eclipse/jetty/continuation/FauxContinuation.java b/jetty-continuation/src/main/java/org/eclipse/jetty/continuation/FauxContinuation.java index 7b07ff80d4e..50e621a8bc9 100644 --- a/jetty-continuation/src/main/java/org/eclipse/jetty/continuation/FauxContinuation.java +++ b/jetty-continuation/src/main/java/org/eclipse/jetty/continuation/FauxContinuation.java @@ -33,7 +33,9 @@ import org.eclipse.jetty.continuation.ContinuationFilter.FilteredContinuation; * A blocking implementation of Continuation. * This implementation of Continuation is used by the {@link ContinuationFilter} * when there are is no native or asynchronous continuation type available. + * @deprecated use Servlet 3.0 {@link javax.servlet.AsyncContext} instead */ +@Deprecated class FauxContinuation implements FilteredContinuation { // common exception used for all continuations. diff --git a/jetty-continuation/src/main/java/org/eclipse/jetty/continuation/Servlet3Continuation.java b/jetty-continuation/src/main/java/org/eclipse/jetty/continuation/Servlet3Continuation.java index 10ee475d249..6299f9ba6ce 100644 --- a/jetty-continuation/src/main/java/org/eclipse/jetty/continuation/Servlet3Continuation.java +++ b/jetty-continuation/src/main/java/org/eclipse/jetty/continuation/Servlet3Continuation.java @@ -36,7 +36,9 @@ import javax.servlet.ServletResponseWrapper; * This implementation of Continuation is used by {@link ContinuationSupport} * when it detects that the application has been deployed in a Servlet 3 * server. + * @deprecated use Servlet 3.0 {@link javax.servlet.AsyncContext} instead */ +@Deprecated public class Servlet3Continuation implements Continuation, AsyncListener { // Exception reused for all continuations diff --git a/jetty-continuation/src/main/java/org/eclipse/jetty/continuation/package-info.java b/jetty-continuation/src/main/java/org/eclipse/jetty/continuation/package-info.java index ab26354b9de..fd9febd0cfc 100644 --- a/jetty-continuation/src/main/java/org/eclipse/jetty/continuation/package-info.java +++ b/jetty-continuation/src/main/java/org/eclipse/jetty/continuation/package-info.java @@ -17,7 +17,8 @@ // /** - * Jetty Continuation : Generic Async Servlet Method + * Jetty Continuation : DEPRECATED: use Servlet 3.0 {@link javax.servlet.AsyncContext} instead */ +@Deprecated package org.eclipse.jetty.continuation;