Mercurial Hosting > luan
comparison src/org/eclipse/jetty/server/Server.java @ 913:17f4fe8271de
simplify connectors
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Sat, 08 Oct 2016 23:57:11 -0600 |
parents | 1d0c304e12b5 |
children | 3191abe890ef |
comparison
equal
deleted
inserted
replaced
912:1d0c304e12b5 | 913:17f4fe8271de |
---|---|
74 { | 74 { |
75 setServer(this); | 75 setServer(this); |
76 new SelectChannelConnector(this,port); | 76 new SelectChannelConnector(this,port); |
77 } | 77 } |
78 | 78 |
79 /* ------------------------------------------------------------ */ | |
80 @Override | 79 @Override |
81 protected void doStart() throws Exception | 80 protected void doStart() throws Exception |
82 { | 81 { |
83 LOG.info("jetty-"+version); | 82 LOG.info("jetty-"+version); |
84 | 83 |
103 } | 102 } |
104 } | 103 } |
105 mex.ifExceptionThrow(); | 104 mex.ifExceptionThrow(); |
106 } | 105 } |
107 | 106 |
108 /* ------------------------------------------------------------ */ | |
109 @Override | 107 @Override |
110 protected void doStop() throws Exception | 108 protected void doStop() throws Exception |
111 { | 109 { |
112 MultiException mex=new MultiException(); | 110 MultiException mex=new MultiException(); |
113 /* | 111 /* |
199 handle(target, baseRequest, request, response); | 197 handle(target, baseRequest, request, response); |
200 | 198 |
201 } | 199 } |
202 | 200 |
203 | 201 |
204 /* ------------------------------------------------------------ */ | |
205 public void join() throws InterruptedException | 202 public void join() throws InterruptedException |
206 { | 203 { |
207 threadPool.awaitTermination(Long.MAX_VALUE, TimeUnit.MILLISECONDS); | 204 threadPool.awaitTermination(Long.MAX_VALUE, TimeUnit.MILLISECONDS); |
208 } | 205 } |
209 | 206 |
257 public String toString() | 254 public String toString() |
258 { | 255 { |
259 return this.getClass().getName()+"@"+Integer.toHexString(hashCode()); | 256 return this.getClass().getName()+"@"+Integer.toHexString(hashCode()); |
260 } | 257 } |
261 | 258 |
262 /* ------------------------------------------------------------ */ | |
263 @Override | 259 @Override |
264 public void dump(Appendable out,String indent) throws IOException | 260 public void dump(Appendable out,String indent) throws IOException |
265 { | 261 { |
266 dumpThis(out); | 262 dumpThis(out); |
267 dump(out,indent,TypeUtil.asList(getHandlers()),getBeans(),connectors); | 263 dump(out,indent,TypeUtil.asList(getHandlers()),getBeans(),connectors); |
285 return threadPool.getPoolSize() == threadPool.getMaximumPoolSize() && | 281 return threadPool.getPoolSize() == threadPool.getMaximumPoolSize() && |
286 threadPool.getQueue().size() >= threadPool.getPoolSize() - threadPool.getActiveCount(); | 282 threadPool.getQueue().size() >= threadPool.getPoolSize() - threadPool.getActiveCount(); |
287 } | 283 } |
288 | 284 |
289 | 285 |
290 /* ------------------------------------------------------------ */ | |
291 public static void main(String...args) throws Exception | 286 public static void main(String...args) throws Exception |
292 { | 287 { |
293 System.err.println(version); | 288 System.err.println(version); |
294 } | 289 } |
295 } | 290 } |