Mercurial Hosting > luan
comparison src/org/eclipse/jetty/server/handler/ContextHandler.java @ 911:cab5830e1ab0
remove ErrorHandler
| author | Franklin Schmidt <fschmidt@gmail.com> | 
|---|---|
| date | Sat, 08 Oct 2016 21:37:13 -0600 | 
| parents | cb78ee27b0e0 | 
| children | a5af9ee7cf91 | 
   comparison
  equal
  deleted
  inserted
  replaced
| 910:9b65e8064f90 | 911:cab5830e1ab0 | 
|---|---|
| 130 private String _displayName; | 130 private String _displayName; | 
| 131 private Resource _baseResource; | 131 private Resource _baseResource; | 
| 132 private MimeTypes _mimeTypes; | 132 private MimeTypes _mimeTypes; | 
| 133 private Map<String, String> _localeEncodingMap; | 133 private Map<String, String> _localeEncodingMap; | 
| 134 private String[] _welcomeFiles; | 134 private String[] _welcomeFiles; | 
| 135 private ErrorHandler _errorHandler; | |
| 136 private String[] _vhosts; | 135 private String[] _vhosts; | 
| 137 private Set<String> _connectors; | 136 private Set<String> _connectors; | 
| 138 private EventListener[] _eventListeners; | 137 private EventListener[] _eventListeners; | 
| 139 private Logger _logger; | 138 private Logger _logger; | 
| 140 private boolean _allowNullPathInfo; | 139 private boolean _allowNullPathInfo; | 
| 243 { | 242 { | 
| 244 _allowNullPathInfo = allowNullPathInfo; | 243 _allowNullPathInfo = allowNullPathInfo; | 
| 245 } | 244 } | 
| 246 | 245 | 
| 247 /* ------------------------------------------------------------ */ | 246 /* ------------------------------------------------------------ */ | 
| 248 @Override | |
| 249 public void setServer(Server server) | |
| 250 { | |
| 251 if (_errorHandler != null) | |
| 252 { | |
| 253 super.setServer(server); | |
| 254 _errorHandler.setServer(server); | |
| 255 } | |
| 256 else | |
| 257 super.setServer(server); | |
| 258 } | |
| 259 | |
| 260 /* ------------------------------------------------------------ */ | |
| 261 /** | 247 /** | 
| 262 * Set the virtual hosts for the context. Only requests that have a matching host header or fully qualified URL will be passed to that context with a | 248 * Set the virtual hosts for the context. Only requests that have a matching host header or fully qualified URL will be passed to that context with a | 
| 263 * virtual host name. A context with no virtual host names or a null virtual host name is available to all requests that are not served by a context with a | 249 * virtual host name. A context with no virtual host names or a null virtual host name is available to all requests that are not served by a context with a | 
| 264 * matching virtual host name. | 250 * matching virtual host name. | 
| 265 * | 251 * | 
| 753 } | 739 } | 
| 754 } | 740 } | 
| 755 | 741 | 
| 756 super.doStart(); | 742 super.doStart(); | 
| 757 | 743 | 
| 758 if (_errorHandler != null) | |
| 759 _errorHandler.start(); | |
| 760 | |
| 761 // Context listeners | 744 // Context listeners | 
| 762 if (_contextListeners != null) | 745 if (_contextListeners != null) | 
| 763 { | 746 { | 
| 764 ServletContextEvent event = new ServletContextEvent(_scontext); | 747 ServletContextEvent event = new ServletContextEvent(_scontext); | 
| 765 for (int i = 0; i < LazyList.size(_contextListeners); i++) | 748 for (int i = 0; i < LazyList.size(_contextListeners); i++) | 
| 818 } | 801 } | 
| 819 | 802 | 
| 820 //remove all non-durable listeners | 803 //remove all non-durable listeners | 
| 821 setEventListeners((EventListener[])LazyList.toArray(_durableListeners, EventListener.class)); | 804 setEventListeners((EventListener[])LazyList.toArray(_durableListeners, EventListener.class)); | 
| 822 _durableListeners = null; | 805 _durableListeners = null; | 
| 823 | |
| 824 if (_errorHandler != null) | |
| 825 _errorHandler.stop(); | |
| 826 | 806 | 
| 827 Enumeration e = _scontext.getAttributeNames(); | 807 Enumeration e = _scontext.getAttributeNames(); | 
| 828 while (e.hasMoreElements()) | 808 while (e.hasMoreElements()) | 
| 829 { | 809 { | 
| 830 String name = (String)e.nextElement(); | 810 String name = (String)e.nextElement(); | 
| 1394 * @see #setWelcomeFiles | 1374 * @see #setWelcomeFiles | 
| 1395 */ | 1375 */ | 
| 1396 public String[] getWelcomeFiles() | 1376 public String[] getWelcomeFiles() | 
| 1397 { | 1377 { | 
| 1398 return _welcomeFiles; | 1378 return _welcomeFiles; | 
| 1399 } | |
| 1400 | |
| 1401 /* ------------------------------------------------------------ */ | |
| 1402 /** | |
| 1403 * @return Returns the errorHandler. | |
| 1404 */ | |
| 1405 public ErrorHandler getErrorHandler() | |
| 1406 { | |
| 1407 return _errorHandler; | |
| 1408 } | |
| 1409 | |
| 1410 /* ------------------------------------------------------------ */ | |
| 1411 /** | |
| 1412 * @param errorHandler | |
| 1413 * The errorHandler to set. | |
| 1414 */ | |
| 1415 public void setErrorHandler(ErrorHandler errorHandler) | |
| 1416 { | |
| 1417 if (errorHandler != null) | |
| 1418 errorHandler.setServer(getServer()); | |
| 1419 _errorHandler = errorHandler; | |
| 1420 } | 1379 } | 
| 1421 | 1380 | 
| 1422 /* ------------------------------------------------------------ */ | 1381 /* ------------------------------------------------------------ */ | 
| 1423 public int getMaxFormContentSize() | 1382 public int getMaxFormContentSize() | 
| 1424 { | 1383 { | 
