comparison src/org/eclipse/jetty/server/handler/HandlerCollection.java @ 1000:32d4b569567c

simplify handle()
author Franklin Schmidt <fschmidt@gmail.com>
date Wed, 19 Oct 2016 04:22:51 -0600
parents b9aa175d9a29
children
comparison
equal deleted inserted replaced
999:74b9daf2826c 1000:32d4b569567c
20 20
21 import java.io.IOException; 21 import java.io.IOException;
22 import java.util.concurrent.CountDownLatch; 22 import java.util.concurrent.CountDownLatch;
23 23
24 import javax.servlet.ServletException; 24 import javax.servlet.ServletException;
25 import javax.servlet.http.HttpServletRequest;
26 import javax.servlet.http.HttpServletResponse; 25 import javax.servlet.http.HttpServletResponse;
27 26
28 import org.eclipse.jetty.server.Handler; 27 import org.eclipse.jetty.server.Handler;
29 import org.eclipse.jetty.server.Request; 28 import org.eclipse.jetty.server.Request;
30 import org.eclipse.jetty.server.Server; 29 import org.eclipse.jetty.server.Server;
130 public void setParallelStart(boolean parallelStart) 129 public void setParallelStart(boolean parallelStart)
131 { 130 {
132 this._parallelStart = parallelStart; 131 this._parallelStart = parallelStart;
133 } 132 }
134 133
135 134 @Override
136 /* ------------------------------------------------------------ */ 135 public void handle(String target, Request request, HttpServletResponse response)
137 /**
138 * @see Handler#handle(String, Request, HttpServletRequest, HttpServletResponse)
139 */
140 public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response)
141 throws IOException, ServletException 136 throws IOException, ServletException
142 { 137 {
143 if (_handlers!=null && isStarted()) 138 if (_handlers!=null && isStarted())
144 { 139 {
145 MultiException mex=null; 140 MultiException mex=null;
146 141
147 for (int i=0;i<_handlers.length;i++) 142 for (int i=0;i<_handlers.length;i++)
148 { 143 {
149 try 144 try
150 { 145 {
151 _handlers[i].handle(target,baseRequest, request, response); 146 _handlers[i].handle(target, request, response);
152 } 147 }
153 catch(IOException e) 148 catch(IOException e)
154 { 149 {
155 throw e; 150 throw e;
156 } 151 }