Return the IMAPProtocol object for this folder. This method will block if necessary to wait for an IDLE command to finish. @return the IMAPProtocol object used when the folder is open @exception ProtocolException for protocol errors
()
| 3797 | * @exception ProtocolException for protocol errors |
| 3798 | */ |
| 3799 | protected IMAPProtocol getProtocol() throws ProtocolException { |
| 3800 | assert Thread.holdsLock(messageCacheLock); |
| 3801 | waitIfIdle(); |
| 3802 | // if we no longer have a protocol object after waiting, it probably |
| 3803 | // means the connection has been closed due to a communnication error, |
| 3804 | // or possibly because the folder has been closed |
| 3805 | if (protocol == null) |
| 3806 | throw new ConnectionException("Connection closed"); |
| 3807 | return protocol; |
| 3808 | } |
| 3809 | |
| 3810 | /** |
| 3811 | * A simple interface for user-defined IMAP protocol commands. |
no test coverage detected