(boolean returnToPool)
| 1590 | // Connection.CLOSED events are not generated. Also both |
| 1591 | // invocations are from within messageCacheLock-ed areas. |
| 1592 | private void cleanup(boolean returnToPool) { |
| 1593 | assert Thread.holdsLock(messageCacheLock); |
| 1594 | releaseProtocol(returnToPool); |
| 1595 | messageCache = null; |
| 1596 | uidTable = null; |
| 1597 | exists = false; // to force a recheck in exists(). |
| 1598 | attributes = null; |
| 1599 | opened = false; |
| 1600 | idleState = RUNNING; // just in case |
| 1601 | messageCacheLock.notifyAll(); // wake up anyone waiting |
| 1602 | notifyConnectionListeners(ConnectionEvent.CLOSED); |
| 1603 | } |
| 1604 | |
| 1605 | /** |
| 1606 | * Check whether this connection is really open. |
no test coverage detected