Author: markt Date: Thu Oct 11 20:29:01 2012 New Revision: 1397291 URL: http://svn.apache.org/viewvc?rev=1397291&view=rev Log: Fill in some of the HTTP upgrade Javadoc
Modified: tomcat/trunk/java/javax/servlet/http/HttpServletRequest.java tomcat/trunk/java/javax/servlet/http/HttpServletRequestWrapper.java tomcat/trunk/java/javax/servlet/http/ProtocolHandler.java tomcat/trunk/java/javax/servlet/http/WebConnection.java Modified: tomcat/trunk/java/javax/servlet/http/HttpServletRequest.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/servlet/http/HttpServletRequest.java?rev=1397291&r1=1397290&r2=1397291&view=diff ============================================================================== --- tomcat/trunk/java/javax/servlet/http/HttpServletRequest.java (original) +++ tomcat/trunk/java/javax/servlet/http/HttpServletRequest.java Thu Oct 11 20:29:01 2012 @@ -485,8 +485,9 @@ public interface HttpServletRequest exte ServletException; /** - * TODO SERVLET 3.1 + * Start the HTTP upgrade process and pass the connection to the provided + * protocol handler once the current request/response pair has completed + * processing. */ - public abstract void upgrade(javax.servlet.http.ProtocolHandler handler) - throws java.io.IOException; + public void upgrade(ProtocolHandler handler) throws java.io.IOException; } Modified: tomcat/trunk/java/javax/servlet/http/HttpServletRequestWrapper.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/servlet/http/HttpServletRequestWrapper.java?rev=1397291&r1=1397290&r2=1397291&view=diff ============================================================================== --- tomcat/trunk/java/javax/servlet/http/HttpServletRequestWrapper.java (original) +++ tomcat/trunk/java/javax/servlet/http/HttpServletRequestWrapper.java Thu Oct 11 20:29:01 2012 @@ -328,8 +328,7 @@ public class HttpServletRequestWrapper e * {@inheritDoc} */ @Override - public void upgrade(javax.servlet.http.ProtocolHandler handler) - throws java.io.IOException { + public void upgrade(ProtocolHandler handler) throws java.io.IOException { this._getHttpServletRequest().upgrade(handler); } } Modified: tomcat/trunk/java/javax/servlet/http/ProtocolHandler.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/servlet/http/ProtocolHandler.java?rev=1397291&r1=1397290&r2=1397291&view=diff ============================================================================== --- tomcat/trunk/java/javax/servlet/http/ProtocolHandler.java (original) +++ tomcat/trunk/java/javax/servlet/http/ProtocolHandler.java Thu Oct 11 20:29:01 2012 @@ -15,10 +15,19 @@ * limitations under the License. */ package javax.servlet.http; + /** - * TODO SERVLET 3.1 - * + * Interface between the HTTP upgrade process and the new protocol. */ public interface ProtocolHandler { - public abstract void init(javax.servlet.http.WebConnection connection); + + /** + * This method is called once the request/response pair where + * {@link HttpServletRequest#upgrade(ProtocolHandler) is called has + * completed processing and is the point where control of the connection + * passes from the container to the {@link ProtocolHandler}. + * + * @param connection The connection that has been upgraded + */ + void init(WebConnection connection); } Modified: tomcat/trunk/java/javax/servlet/http/WebConnection.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/servlet/http/WebConnection.java?rev=1397291&r1=1397290&r2=1397291&view=diff ============================================================================== --- tomcat/trunk/java/javax/servlet/http/WebConnection.java (original) +++ tomcat/trunk/java/javax/servlet/http/WebConnection.java Thu Oct 11 20:29:01 2012 @@ -20,13 +20,22 @@ import java.io.IOException; import javax.servlet.ServletInputStream; import javax.servlet.ServletOutputStream; + /** - * TODO SERVLET 3.1 - * + * The interface used by a {@link ProtocolHandler} to interact with an upgraded + * HTTP connection. */ public interface WebConnection { - public abstract ServletInputStream getInputStream() - throws IOException; - public abstract ServletOutputStream getOutputStream() - throws IOException; + + /** + * Provides access to the {@link ServletInputStream} for reading data from + * the client. + */ + ServletInputStream getInputStream() throws IOException; + + /** + * Provides access to the {@link ServletOutputStream} for writing data to + * the client. + */ + ServletOutputStream getOutputStream() throws IOException; } \ No newline at end of file --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org