Mercurial Hosting > luan
comparison src/org/eclipse/jetty/server/Server.java @ 1000:32d4b569567c
simplify handle()
| author | Franklin Schmidt <fschmidt@gmail.com> |
|---|---|
| date | Wed, 19 Oct 2016 04:22:51 -0600 |
| parents | 7d28be82ab75 |
| children | 39154cfa58e4 |
comparison
equal
deleted
inserted
replaced
| 999:74b9daf2826c | 1000:32d4b569567c |
|---|---|
| 27 import java.util.concurrent.LinkedBlockingQueue; | 27 import java.util.concurrent.LinkedBlockingQueue; |
| 28 import java.util.concurrent.ThreadPoolExecutor; | 28 import java.util.concurrent.ThreadPoolExecutor; |
| 29 import java.util.concurrent.TimeUnit; | 29 import java.util.concurrent.TimeUnit; |
| 30 | 30 |
| 31 import javax.servlet.ServletException; | 31 import javax.servlet.ServletException; |
| 32 import javax.servlet.http.HttpServletRequest; | |
| 33 import javax.servlet.http.HttpServletResponse; | |
| 34 | 32 |
| 35 import org.eclipse.jetty.http.HttpURI; | 33 import org.eclipse.jetty.http.HttpURI; |
| 36 import org.eclipse.jetty.server.handler.HandlerWrapper; | 34 import org.eclipse.jetty.server.handler.HandlerWrapper; |
| 37 import org.eclipse.jetty.server.nio.BlockingChannelConnector; | 35 import org.eclipse.jetty.server.nio.BlockingChannelConnector; |
| 38 import org.eclipse.jetty.server.nio.SelectChannelConnector; | 36 import org.eclipse.jetty.server.nio.SelectChannelConnector; |
| 143 public void handle(AbstractHttpConnection connection) throws IOException, ServletException | 141 public void handle(AbstractHttpConnection connection) throws IOException, ServletException |
| 144 { | 142 { |
| 145 final String target = connection.getRequest().getPathInfo(); | 143 final String target = connection.getRequest().getPathInfo(); |
| 146 final Request request = connection.getRequest(); | 144 final Request request = connection.getRequest(); |
| 147 final Response response = connection.getResponse(); | 145 final Response response = connection.getResponse(); |
| 148 | 146 handle(target, request, response); |
| 149 if (LOG.isDebugEnabled()) | |
| 150 { | |
| 151 LOG.debug("REQUEST "+target+" on "+connection); | |
| 152 handle(target, request, request, response); | |
| 153 LOG.debug("RESPONSE "+target+" "+connection.getResponse().getStatus()+" handled="+request.isHandled()); | |
| 154 } | |
| 155 else | |
| 156 handle(target, request, request, response); | |
| 157 } | 147 } |
| 158 /* | 148 /* |
| 159 public void join() throws InterruptedException | 149 public void join() throws InterruptedException |
| 160 { | 150 { |
| 161 threadPool.awaitTermination(Long.MAX_VALUE, TimeUnit.MILLISECONDS); | 151 threadPool.awaitTermination(Long.MAX_VALUE, TimeUnit.MILLISECONDS); |
