Set the quotas for the quota root specified in the quota argument. Typically this will be one of the quota roots obtained from the getQuota method, but it need not be. @param quota the quota to set @exception MessagingException if the server doesn't support the QUOTA extension
(Quota quota)
| 2099 | * QUOTA extension |
| 2100 | */ |
| 2101 | @Override |
| 2102 | public synchronized void setQuota(Quota quota) throws MessagingException { |
| 2103 | checkConnected(); |
| 2104 | IMAPProtocol p = null; |
| 2105 | try { |
| 2106 | p = getStoreProtocol("setQuota"); |
| 2107 | p.setQuota(quota); |
| 2108 | } catch (BadCommandException bex) { |
| 2109 | throw new MessagingException("QUOTA not supported", bex); |
| 2110 | } catch (ConnectionException cex) { |
| 2111 | throw new StoreClosedException(this, cex.getMessage()); |
| 2112 | } catch (ProtocolException pex) { |
| 2113 | throw new MessagingException(pex.getMessage(), pex); |
| 2114 | } finally { |
| 2115 | releaseStoreProtocol(p); |
| 2116 | } |
| 2117 | } |
| 2118 | |
| 2119 | private void checkConnected() { |
| 2120 | assert Thread.holdsLock(this); |
nothing calls this directly
no test coverage detected