/** * Close this Store. */ @Override public synchronized void close() throws MessagingException { cleanup(); // do these again in case cleanup returned early // because we were already closed due to a failure closeAllFolders(false); emptyConnectionPool(false); }
cleanup(); return;
private void cleanup() { cleanup(false); }
/** * Close this Store. */ @Override public synchronized void close() throws MessagingException { cleanup(); // do these again in case cleanup returned early // because we were already closed due to a failure closeAllFolders(false); emptyConnectionPool(false); }
/** * Close this Store. */ @Override public synchronized void close() throws MessagingException { cleanup(); // do these again in case cleanup returned early // because we were already closed due to a failure closeAllFolders(false); emptyConnectionPool(false); }
/** * Close this Store. */ @Override public synchronized void close() throws MessagingException { cleanup(); // do these again in case cleanup returned early // because we were already closed due to a failure closeAllFolders(false); emptyConnectionPool(false); }
/** * Close this Store. */ @Override public synchronized void close() throws MessagingException { cleanup(); // do these again in case cleanup returned early // because we were already closed due to a failure closeAllFolders(false); emptyConnectionPool(false); }
/** * Response handler method. */ public void handleResponse(Response r) { // Any of these responses may have a response code. if (r.isOK() || r.isNO() || r.isBAD() || r.isBYE()) handleResponseCode(r); if (r.isBYE()) { if (debug) out.println("DEBUG: IMAPStore connection dead"); // Store's IMAP connection is dead, cleanup. if (connected) // Check if its already closed cleanup(r.isSynthetic()); return; } }
/** * Return true if the specified capability string is in the list * of capabilities the server announced. * * @since JavaMail 1.3.3 */ public synchronized boolean hasCapability(String capability) throws MessagingException { IMAPProtocol p = null; try { p = getStoreProtocol(); return p.hasCapability(capability); } catch (ProtocolException pex) { if (p == null) { // failed to get a Store connection // have to force Store to be closed cleanup(); } throw new MessagingException(pex.getMessage(), pex); } finally { releaseStoreProtocol(p); } }
if (p == null) { // failed to get a Store connection cleanup();
private synchronized Namespaces getNamespaces() throws MessagingException { checkConnected(); IMAPProtocol p = null; if (namespaces == null) { try { p = getStoreProtocol(); namespaces = p.namespace(); } catch (BadCommandException bex) { // NAMESPACE not supported, ignore it } catch (ConnectionException cex) { throw new StoreClosedException(this, cex.getMessage()); } catch (ProtocolException pex) { throw new MessagingException(pex.getMessage(), pex); } finally { releaseStoreProtocol(p); if (p == null) { // failed to get a Store connection // have to force Store to be closed cleanup(); } } } return namespaces; }
/** * Set the quotas for the quota root specified in the quota argument. * Typically this will be one of the quota roots obtained from the * <code>getQuota</code> method, but it need not be. * * @param quota the quota to set * @exception MessagingException if the server doesn't support the * QUOTA extension */ public synchronized void setQuota(Quota quota) throws MessagingException { checkConnected(); IMAPProtocol p = null; try { p = getStoreProtocol(); p.setQuota(quota); } catch (BadCommandException bex) { throw new MessagingException("QUOTA not supported", bex); } catch (ConnectionException cex) { throw new StoreClosedException(this, cex.getMessage()); } catch (ProtocolException pex) { throw new MessagingException(pex.getMessage(), pex); } finally { releaseStoreProtocol(p); if (p == null) { // failed to get a Store connection // have to force Store to be closed cleanup(); } } }
if (p == null) { // failed to get a Store connection cleanup();