annotate src/org/eclipse/jetty/server/AsyncContinuation.java @ 936:237ace6e8bc2

simplify AsyncContinuation
author Franklin Schmidt <fschmidt@gmail.com>
date Sun, 09 Oct 2016 21:35:26 -0600
parents aa7dc1802d29
children 0541b6034003
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
1 //
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
2 // ========================================================================
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
3 // Copyright (c) 1995-2014 Mort Bay Consulting Pty. Ltd.
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
4 // ------------------------------------------------------------------------
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
5 // All rights reserved. This program and the accompanying materials
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
6 // are made available under the terms of the Eclipse Public License v1.0
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
7 // and Apache License v2.0 which accompanies this distribution.
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
8 //
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
9 // The Eclipse Public License is available at
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
10 // http://www.eclipse.org/legal/epl-v10.html
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
11 //
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
12 // The Apache License v2.0 is available at
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
13 // http://www.opensource.org/licenses/apache2.0.php
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
14 //
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
15 // You may elect to redistribute this code under either of these licenses.
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
16 // ========================================================================
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
17 //
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
18
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
19 package org.eclipse.jetty.server;
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
20
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
21 import org.eclipse.jetty.continuation.Continuation;
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
22 import org.eclipse.jetty.io.EndPoint;
820
8e9db0bbf4f9 remove org.eclipse.jetty.util.log and upgrade slf4j
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
23 import org.slf4j.Logger;
8e9db0bbf4f9 remove org.eclipse.jetty.util.log and upgrade slf4j
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
24 import org.slf4j.LoggerFactory;
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
25
936
237ace6e8bc2 simplify AsyncContinuation
Franklin Schmidt <fschmidt@gmail.com>
parents: 935
diff changeset
26
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
27 /* ------------------------------------------------------------ */
933
c9513d80f305 remove AsyncContext support
Franklin Schmidt <fschmidt@gmail.com>
parents: 932
diff changeset
28 /** Implementation of Continuation interfaces
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
29 *
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
30 */
935
aa7dc1802d29 remove ContinuationListener
Franklin Schmidt <fschmidt@gmail.com>
parents: 934
diff changeset
31 public final class AsyncContinuation implements Continuation
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
32 {
865
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
33 private static final Logger LOG = LoggerFactory.getLogger(AsyncContinuation.class);
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
34
865
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
35 private final static long DEFAULT_TIMEOUT=30000L;
931
6f7e2ff51879 remove ContinuationThrowable
Franklin Schmidt <fschmidt@gmail.com>
parents: 930
diff changeset
36
865
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
37 // STATES:
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
38 // handling() suspend() unhandle() resume() complete() doComplete()
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
39 // startAsync() dispatch()
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
40 // IDLE DISPATCHED
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
41 // DISPATCHED ASYNCSTARTED UNCOMPLETED
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
42 // ASYNCSTARTED ASYNCWAIT REDISPATCHING COMPLETING
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
43 // REDISPATCHING REDISPATCHED
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
44 // ASYNCWAIT REDISPATCH COMPLETING
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
45 // REDISPATCH REDISPATCHED
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
46 // REDISPATCHED ASYNCSTARTED UNCOMPLETED
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
47 // COMPLETING UNCOMPLETED UNCOMPLETED
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
48 // UNCOMPLETED COMPLETED
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
49 // COMPLETED
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
50 private static final int __IDLE=0; // Idle request
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
51 private static final int __DISPATCHED=1; // Request dispatched to filter/servlet
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
52 private static final int __UNCOMPLETED=8; // Request is completable
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
53 private static final int __COMPLETED=9; // Request is complete
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
54
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
55 /* ------------------------------------------------------------ */
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
56 protected AbstractHttpConnection _connection;
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
57
865
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
58 /* ------------------------------------------------------------ */
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
59 private int _state;
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
60
935
aa7dc1802d29 remove ContinuationListener
Franklin Schmidt <fschmidt@gmail.com>
parents: 934
diff changeset
61 AsyncContinuation()
865
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
62 {
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
63 _state=__IDLE;
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
64 }
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
65
934
fe461f7cfc8e simplify AsyncContinuation
Franklin Schmidt <fschmidt@gmail.com>
parents: 933
diff changeset
66 protected synchronized void setConnection(final AbstractHttpConnection connection)
865
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
67 {
934
fe461f7cfc8e simplify AsyncContinuation
Franklin Schmidt <fschmidt@gmail.com>
parents: 933
diff changeset
68 _connection=connection;
865
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
69 }
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
70
865
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
71
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
72 @Override
936
237ace6e8bc2 simplify AsyncContinuation
Franklin Schmidt <fschmidt@gmail.com>
parents: 935
diff changeset
73 public synchronized String toString()
865
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
74 {
936
237ace6e8bc2 simplify AsyncContinuation
Franklin Schmidt <fschmidt@gmail.com>
parents: 935
diff changeset
75 return super.toString()+"@"+getStatusString();
865
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
76 }
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
77
936
237ace6e8bc2 simplify AsyncContinuation
Franklin Schmidt <fschmidt@gmail.com>
parents: 935
diff changeset
78 private synchronized String getStatusString()
865
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
79 {
936
237ace6e8bc2 simplify AsyncContinuation
Franklin Schmidt <fschmidt@gmail.com>
parents: 935
diff changeset
80 return
237ace6e8bc2 simplify AsyncContinuation
Franklin Schmidt <fschmidt@gmail.com>
parents: 935
diff changeset
81 ((_state==__IDLE)?"IDLE":
237ace6e8bc2 simplify AsyncContinuation
Franklin Schmidt <fschmidt@gmail.com>
parents: 935
diff changeset
82 (_state==__DISPATCHED)?"DISPATCHED":
237ace6e8bc2 simplify AsyncContinuation
Franklin Schmidt <fschmidt@gmail.com>
parents: 935
diff changeset
83 (_state==__UNCOMPLETED)?"UNCOMPLETED":
237ace6e8bc2 simplify AsyncContinuation
Franklin Schmidt <fschmidt@gmail.com>
parents: 935
diff changeset
84 (_state==__COMPLETED)?"COMPLETE":
237ace6e8bc2 simplify AsyncContinuation
Franklin Schmidt <fschmidt@gmail.com>
parents: 935
diff changeset
85 ("UNKNOWN?"+_state));
865
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
86 }
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
87
929
3191abe890ef remove isInitial()
Franklin Schmidt <fschmidt@gmail.com>
parents: 928
diff changeset
88 protected synchronized void handling()
865
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
89 {
929
3191abe890ef remove isInitial()
Franklin Schmidt <fschmidt@gmail.com>
parents: 928
diff changeset
90 switch(_state)
865
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
91 {
929
3191abe890ef remove isInitial()
Franklin Schmidt <fschmidt@gmail.com>
parents: 928
diff changeset
92 case __IDLE:
3191abe890ef remove isInitial()
Franklin Schmidt <fschmidt@gmail.com>
parents: 928
diff changeset
93 _state=__DISPATCHED;
3191abe890ef remove isInitial()
Franklin Schmidt <fschmidt@gmail.com>
parents: 928
diff changeset
94 return;
3191abe890ef remove isInitial()
Franklin Schmidt <fschmidt@gmail.com>
parents: 928
diff changeset
95
3191abe890ef remove isInitial()
Franklin Schmidt <fschmidt@gmail.com>
parents: 928
diff changeset
96 default:
3191abe890ef remove isInitial()
Franklin Schmidt <fschmidt@gmail.com>
parents: 928
diff changeset
97 throw new IllegalStateException(this.getStatusString());
865
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
98 }
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
99 }
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
100
865
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
101 /* ------------------------------------------------------------ */
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
102 /**
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
103 * Signal that the HttpConnection has finished handling the request.
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
104 * For blocking connectors, this call may block if the request has
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
105 * been suspended (startAsync called).
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
106 * @return true if handling is complete, false if the request should
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
107 * be handled again (eg because of a resume that happened before unhandle was called)
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
108 */
928
23a57aad34c0 remove isAsync()
Franklin Schmidt <fschmidt@gmail.com>
parents: 927
diff changeset
109 protected synchronized void unhandle()
865
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
110 {
928
23a57aad34c0 remove isAsync()
Franklin Schmidt <fschmidt@gmail.com>
parents: 927
diff changeset
111 switch(_state)
865
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
112 {
928
23a57aad34c0 remove isAsync()
Franklin Schmidt <fschmidt@gmail.com>
parents: 927
diff changeset
113 case __DISPATCHED:
23a57aad34c0 remove isAsync()
Franklin Schmidt <fschmidt@gmail.com>
parents: 927
diff changeset
114 _state = __UNCOMPLETED;
23a57aad34c0 remove isAsync()
Franklin Schmidt <fschmidt@gmail.com>
parents: 927
diff changeset
115 return;
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
116
928
23a57aad34c0 remove isAsync()
Franklin Schmidt <fschmidt@gmail.com>
parents: 927
diff changeset
117 default:
23a57aad34c0 remove isAsync()
Franklin Schmidt <fschmidt@gmail.com>
parents: 927
diff changeset
118 throw new IllegalStateException(this.getStatusString());
865
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
119 }
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
120 }
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
121
934
fe461f7cfc8e simplify AsyncContinuation
Franklin Schmidt <fschmidt@gmail.com>
parents: 933
diff changeset
122
935
aa7dc1802d29 remove ContinuationListener
Franklin Schmidt <fschmidt@gmail.com>
parents: 934
diff changeset
123 protected synchronized void doComplete(Throwable ex)
865
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
124 {
935
aa7dc1802d29 remove ContinuationListener
Franklin Schmidt <fschmidt@gmail.com>
parents: 934
diff changeset
125 switch(_state)
865
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
126 {
935
aa7dc1802d29 remove ContinuationListener
Franklin Schmidt <fschmidt@gmail.com>
parents: 934
diff changeset
127 case __UNCOMPLETED:
aa7dc1802d29 remove ContinuationListener
Franklin Schmidt <fschmidt@gmail.com>
parents: 934
diff changeset
128 _state = __COMPLETED;
aa7dc1802d29 remove ContinuationListener
Franklin Schmidt <fschmidt@gmail.com>
parents: 934
diff changeset
129 break;
aa7dc1802d29 remove ContinuationListener
Franklin Schmidt <fschmidt@gmail.com>
parents: 934
diff changeset
130
aa7dc1802d29 remove ContinuationListener
Franklin Schmidt <fschmidt@gmail.com>
parents: 934
diff changeset
131 default:
aa7dc1802d29 remove ContinuationListener
Franklin Schmidt <fschmidt@gmail.com>
parents: 934
diff changeset
132 throw new IllegalStateException(this.getStatusString());
865
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
133 }
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
134 }
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
135
935
aa7dc1802d29 remove ContinuationListener
Franklin Schmidt <fschmidt@gmail.com>
parents: 934
diff changeset
136 protected synchronized void recycle()
865
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
137 {
935
aa7dc1802d29 remove ContinuationListener
Franklin Schmidt <fschmidt@gmail.com>
parents: 934
diff changeset
138 switch(_state)
865
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
139 {
935
aa7dc1802d29 remove ContinuationListener
Franklin Schmidt <fschmidt@gmail.com>
parents: 934
diff changeset
140 case __DISPATCHED:
aa7dc1802d29 remove ContinuationListener
Franklin Schmidt <fschmidt@gmail.com>
parents: 934
diff changeset
141 throw new IllegalStateException(getStatusString());
aa7dc1802d29 remove ContinuationListener
Franklin Schmidt <fschmidt@gmail.com>
parents: 934
diff changeset
142 default:
aa7dc1802d29 remove ContinuationListener
Franklin Schmidt <fschmidt@gmail.com>
parents: 934
diff changeset
143 _state=__IDLE;
865
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
144 }
935
aa7dc1802d29 remove ContinuationListener
Franklin Schmidt <fschmidt@gmail.com>
parents: 934
diff changeset
145 cancelTimeout();
865
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
146 }
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
147
936
237ace6e8bc2 simplify AsyncContinuation
Franklin Schmidt <fschmidt@gmail.com>
parents: 935
diff changeset
148 private void cancelTimeout()
865
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
149 {
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
150 EndPoint endp=_connection.getEndPoint();
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
151 if (endp.isBlocking())
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
152 {
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
153 synchronized(this)
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
154 {
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
155 this.notifyAll();
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
156 }
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
157 }
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
158 }
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
159
934
fe461f7cfc8e simplify AsyncContinuation
Franklin Schmidt <fschmidt@gmail.com>
parents: 933
diff changeset
160 synchronized boolean isUncompleted()
865
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
161 {
934
fe461f7cfc8e simplify AsyncContinuation
Franklin Schmidt <fschmidt@gmail.com>
parents: 933
diff changeset
162 return _state==__UNCOMPLETED;
865
6b210bb66c63 remove ThreadPool
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
163 }
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
164 }