comparison src/org/eclipse/jetty/server/AsyncContinuation.java @ 928:23a57aad34c0

remove isAsync()
author Franklin Schmidt <fschmidt@gmail.com>
date Sun, 09 Oct 2016 18:54:32 -0600
parents 1c1c350fbe4b
children 3191abe890ef
comparison
equal deleted inserted replaced
927:1c1c350fbe4b 928:23a57aad34c0
286 * For blocking connectors, this call may block if the request has 286 * For blocking connectors, this call may block if the request has
287 * been suspended (startAsync called). 287 * been suspended (startAsync called).
288 * @return true if handling is complete, false if the request should 288 * @return true if handling is complete, false if the request should
289 * be handled again (eg because of a resume that happened before unhandle was called) 289 * be handled again (eg because of a resume that happened before unhandle was called)
290 */ 290 */
291 protected boolean unhandle() 291 protected synchronized void unhandle()
292 { 292 {
293 synchronized (this) 293 switch(_state)
294 { 294 {
295 switch(_state) 295 case __DISPATCHED:
296 { 296 _state = __UNCOMPLETED;
297 case __DISPATCHED: 297 return;
298 _state = __UNCOMPLETED; 298
299 return true; 299 default:
300 300 throw new IllegalStateException(this.getStatusString());
301 case __IDLE:
302 throw new IllegalStateException(this.getStatusString());
303
304 default:
305 throw new IllegalStateException(this.getStatusString());
306 }
307 } 301 }
308 } 302 }
309 303
310 /* ------------------------------------------------------------ */ 304 /* ------------------------------------------------------------ */
311 public void dispatch() 305 public void dispatch()
495 public boolean isComplete() 489 public boolean isComplete()
496 { 490 {
497 synchronized (this) 491 synchronized (this)
498 { 492 {
499 return _state==__COMPLETED; 493 return _state==__COMPLETED;
500 }
501 }
502
503
504 public boolean isAsync()
505 {
506 synchronized (this)
507 {
508 switch(_state)
509 {
510 case __IDLE:
511 case __DISPATCHED:
512 case __UNCOMPLETED:
513 case __COMPLETED:
514 return false;
515
516 default:
517 return true;
518 }
519 } 494 }
520 } 495 }
521 496
522 /* ------------------------------------------------------------ */ 497 /* ------------------------------------------------------------ */
523 public void dispatch(ServletContext context, String path) 498 public void dispatch(ServletContext context, String path)