comparison src/org/eclipse/jetty/io/nio/SelectChannelEndPoint.java @ 959:7b94f5b33c64

remove onClose()
author Franklin Schmidt <fschmidt@gmail.com>
date Thu, 13 Oct 2016 18:53:26 -0600
parents 1094975d013b
children 3cd4c706a61f
comparison
equal deleted inserted replaced
958:fc521d2f098e 959:7b94f5b33c64
76 private boolean _readBlocked; 76 private boolean _readBlocked;
77 77
78 /** True if a thread has is blocked in {@link #blockWritable(long)} */ 78 /** True if a thread has is blocked in {@link #blockWritable(long)} */
79 private boolean _writeBlocked; 79 private boolean _writeBlocked;
80 80
81 /** true if {@link SelectSet#destroyEndPoint(SelectChannelEndPoint)} has not been called */
82 private boolean _open;
83
84 private boolean _ishut; 81 private boolean _ishut;
85 82
86 public SelectChannelEndPoint(SocketChannel channel, SelectSet selectSet, SelectionKey key, int maxIdleTime) 83 public SelectChannelEndPoint(SocketChannel channel, SelectSet selectSet, SelectionKey key, int maxIdleTime)
87 throws IOException 84 throws IOException
88 { 85 {
89 super(channel, maxIdleTime); 86 super(channel, maxIdleTime);
90 87
91 _manager = selectSet.getManager(); 88 _manager = selectSet.getManager();
92 _selectSet = selectSet; 89 _selectSet = selectSet;
93 _state = STATE_UNDISPATCHED; 90 _state = STATE_UNDISPATCHED;
94 _open = true;
95 _key = key; 91 _key = key;
96 } 92 }
97 93
98 @Override 94 @Override
99 public Connection getConnection() 95 public Connection getConnection()
406 if (_key!=null && _key.isValid()) 402 if (_key!=null && _key.isValid())
407 { 403 {
408 _key.cancel(); 404 _key.cancel();
409 } 405 }
410 406
411 if (_open)
412 {
413 _selectSet.destroyEndPoint(this);
414 }
415 _open = false;
416 _key = null; 407 _key = null;
417 } 408 }
418 } 409 }
419 } 410 }
420 else 411 else
433 else 424 else
434 { 425 {
435 if (_key!=null && _key.isValid()) 426 if (_key!=null && _key.isValid())
436 _key.cancel(); 427 _key.cancel();
437 428
438 if (_open)
439 {
440 _open = false;
441 _selectSet.destroyEndPoint(this);
442 }
443 _key = null; 429 _key = null;
444 } 430 }
445 } 431 }
446 432
447 private void handle() 433 private void handle()