Send the IMAP ID command (if supported by the server) and return the result from the server. The ID command identfies the client to the server and returns information about the server to the client. See RFC 2971 . The returned Map is unmodifiable. @
(Map<String, String> clientParams)
| 2324 | * @since JavaMail 1.5.1 |
| 2325 | */ |
| 2326 | public synchronized Map<String, String> id(Map<String, String> clientParams) |
| 2327 | throws MessagingException { |
| 2328 | checkConnected(); |
| 2329 | Map<String, String> serverParams = null; |
| 2330 | |
| 2331 | IMAPProtocol p = null; |
| 2332 | try { |
| 2333 | p = getStoreProtocol("id"); |
| 2334 | serverParams = p.id(clientParams); |
| 2335 | } catch (BadCommandException bex) { |
| 2336 | throw new MessagingException("ID not supported", bex); |
| 2337 | } catch (ConnectionException cex) { |
| 2338 | throw new StoreClosedException(this, cex.getMessage()); |
| 2339 | } catch (ProtocolException pex) { |
| 2340 | throw new MessagingException(pex.getMessage(), pex); |
| 2341 | } finally { |
| 2342 | releaseStoreProtocol(p); |
| 2343 | } |
| 2344 | return serverParams; |
| 2345 | } |
| 2346 | |
| 2347 | /** |
| 2348 | * Handle notifications and alerts. |
no test coverage detected