Mercurial Hosting > luan
comparison src/org/eclipse/jetty/server/AsyncContinuation.java @ 820:8e9db0bbf4f9
remove org.eclipse.jetty.util.log and upgrade slf4j
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Tue, 13 Sep 2016 23:13:06 -0600 |
parents | 3428c60d7cfc |
children | 6b210bb66c63 |
comparison
equal
deleted
inserted
replaced
819:17bd0b170ed6 | 820:8e9db0bbf4f9 |
---|---|
38 import org.eclipse.jetty.io.AsyncEndPoint; | 38 import org.eclipse.jetty.io.AsyncEndPoint; |
39 import org.eclipse.jetty.io.EndPoint; | 39 import org.eclipse.jetty.io.EndPoint; |
40 import org.eclipse.jetty.server.handler.ContextHandler; | 40 import org.eclipse.jetty.server.handler.ContextHandler; |
41 import org.eclipse.jetty.server.handler.ContextHandler.Context; | 41 import org.eclipse.jetty.server.handler.ContextHandler.Context; |
42 import org.eclipse.jetty.util.URIUtil; | 42 import org.eclipse.jetty.util.URIUtil; |
43 import org.eclipse.jetty.util.log.Log; | 43 import org.slf4j.Logger; |
44 import org.eclipse.jetty.util.log.Logger; | 44 import org.slf4j.LoggerFactory; |
45 import org.eclipse.jetty.util.thread.Timeout; | 45 import org.eclipse.jetty.util.thread.Timeout; |
46 | 46 |
47 /* ------------------------------------------------------------ */ | 47 /* ------------------------------------------------------------ */ |
48 /** Implementation of Continuation and AsyncContext interfaces | 48 /** Implementation of Continuation and AsyncContext interfaces |
49 * | 49 * |
50 */ | 50 */ |
51 public class AsyncContinuation implements AsyncContext, Continuation | 51 public class AsyncContinuation implements AsyncContext, Continuation |
52 { | 52 { |
53 private static final Logger LOG = Log.getLogger(AsyncContinuation.class); | 53 private static final Logger LOG = LoggerFactory.getLogger(AsyncContinuation.class); |
54 | 54 |
55 private final static long DEFAULT_TIMEOUT=30000L; | 55 private final static long DEFAULT_TIMEOUT=30000L; |
56 | 56 |
57 private final static ContinuationThrowable __exception = new ContinuationThrowable(); | 57 private final static ContinuationThrowable __exception = new ContinuationThrowable(); |
58 | 58 |
384 { | 384 { |
385 listener.onStartAsync(_event); | 385 listener.onStartAsync(_event); |
386 } | 386 } |
387 catch(Exception e) | 387 catch(Exception e) |
388 { | 388 { |
389 LOG.warn(e); | 389 LOG.warn("",e); |
390 } | 390 } |
391 } | 391 } |
392 } | 392 } |
393 } | 393 } |
394 | 394 |
509 { | 509 { |
510 listener.onTimeout(_event); | 510 listener.onTimeout(_event); |
511 } | 511 } |
512 catch(Exception e) | 512 catch(Exception e) |
513 { | 513 { |
514 LOG.debug(e); | 514 LOG.debug("",e); |
515 _connection.getRequest().setAttribute(RequestDispatcher.ERROR_EXCEPTION,e); | 515 _connection.getRequest().setAttribute(RequestDispatcher.ERROR_EXCEPTION,e); |
516 break; | 516 break; |
517 } | 517 } |
518 } | 518 } |
519 } | 519 } |
525 { | 525 { |
526 listener.onTimeout(this); | 526 listener.onTimeout(this); |
527 } | 527 } |
528 catch(Exception e) | 528 catch(Exception e) |
529 { | 529 { |
530 LOG.warn(e); | 530 LOG.warn("",e); |
531 } | 531 } |
532 } | 532 } |
533 } | 533 } |
534 | 534 |
535 synchronized (this) | 535 synchronized (this) |
669 else | 669 else |
670 listener.onComplete(_event); | 670 listener.onComplete(_event); |
671 } | 671 } |
672 catch(Exception e) | 672 catch(Exception e) |
673 { | 673 { |
674 LOG.warn(e); | 674 LOG.warn("",e); |
675 } | 675 } |
676 } | 676 } |
677 } | 677 } |
678 if (cListeners!=null) | 678 if (cListeners!=null) |
679 { | 679 { |
683 { | 683 { |
684 listener.onComplete(this); | 684 listener.onComplete(this); |
685 } | 685 } |
686 catch(Exception e) | 686 catch(Exception e) |
687 { | 687 { |
688 LOG.warn(e); | 688 LOG.warn("",e); |
689 } | 689 } |
690 } | 690 } |
691 } | 691 } |
692 } | 692 } |
693 | 693 |
752 { | 752 { |
753 this.wait(wait); | 753 this.wait(wait); |
754 } | 754 } |
755 catch (InterruptedException e) | 755 catch (InterruptedException e) |
756 { | 756 { |
757 LOG.ignore(e); | 757 LOG.trace("",e); |
758 } | 758 } |
759 wait=_expireAt-System.currentTimeMillis(); | 759 wait=_expireAt-System.currentTimeMillis(); |
760 } | 760 } |
761 | 761 |
762 if (_expireAt>0 && wait<=0 && _connection.getServer().isRunning()) | 762 if (_expireAt>0 && wait<=0 && _connection.getServer().isRunning()) |