@Test public void getConnection_shouldCreateImapConnection() throws Exception { ImapConnection imapConnection = mock(ImapConnection.class); imapStore.enqueueImapConnection(imapConnection); ImapConnection result = imapStore.getConnection(); assertSame(imapConnection, result); }
ImapConnection getConnection() throws MessagingException { ImapConnection connection; while ((connection = pollConnection()) != null) { try { connection.executeSimpleCommand(Commands.NOOP); break; } catch (IOException ioe) { connection.close(); } } if (connection == null) { connection = createImapConnection(); } return connection; }
ImapStore extends RemoteStore { ImapConnection getConnection() throws MessagingException { ImapConnection connection; while ((connection = pollConnection()) != null) { try { connection.executeSimpleCommand(Commands.NOOP); break; } catch (IOException ioe) { connection.close(); } } if (connection == null) { connection = createImapConnection(); } return connection; } }
ImapStore extends RemoteStore { ImapConnection getConnection() throws MessagingException { ImapConnection connection; while ((connection = pollConnection()) != null) { try { connection.executeSimpleCommand(Commands.NOOP); break; } catch (IOException ioe) { connection.close(); } } if (connection == null) { connection = createImapConnection(); } return connection; } ImapStore(StoreConfig storeConfig, TrustedSocketFactory trustedSocketFactory,
            ConnectivityManager connectivityManager, OAuth2TokenProvider oauthTokenProvider); }
ImapStore extends RemoteStore { ImapConnection getConnection() throws MessagingException { ImapConnection connection; while ((connection = pollConnection()) != null) { try { connection.executeSimpleCommand(Commands.NOOP); break; } catch (IOException ioe) { connection.close(); } } if (connection == null) { connection = createImapConnection(); } return connection; } ImapStore(StoreConfig storeConfig, TrustedSocketFactory trustedSocketFactory,
            ConnectivityManager connectivityManager, OAuth2TokenProvider oauthTokenProvider); static ImapStoreSettings decodeUri(String uri); static String createUri(ServerSettings server); @Override @NonNull ImapFolder getFolder(String folderId); @Override @NonNull List<ImapFolder> getFolders(boolean forceListAll); @Override @NonNull List<ImapFolder> getSubFolders(final String parentFolderId, boolean forceListAll); @NonNull List<ImapFolder> getPersonalNamespaces(boolean forceListAll); @Override void checkSettings(); @Override boolean isMoveCapable(); @Override boolean isCopyCapable(); @Override boolean isPushCapable(); @Override boolean isExpungeCapable(); @Override Pusher getPusher(PushReceiver receiver); String getFolderName(String id); }
ImapStore extends RemoteStore { ImapConnection getConnection() throws MessagingException { ImapConnection connection; while ((connection = pollConnection()) != null) { try { connection.executeSimpleCommand(Commands.NOOP); break; } catch (IOException ioe) { connection.close(); } } if (connection == null) { connection = createImapConnection(); } return connection; } ImapStore(StoreConfig storeConfig, TrustedSocketFactory trustedSocketFactory,
            ConnectivityManager connectivityManager, OAuth2TokenProvider oauthTokenProvider); static ImapStoreSettings decodeUri(String uri); static String createUri(ServerSettings server); @Override @NonNull ImapFolder getFolder(String folderId); @Override @NonNull List<ImapFolder> getFolders(boolean forceListAll); @Override @NonNull List<ImapFolder> getSubFolders(final String parentFolderId, boolean forceListAll); @NonNull List<ImapFolder> getPersonalNamespaces(boolean forceListAll); @Override void checkSettings(); @Override boolean isMoveCapable(); @Override boolean isCopyCapable(); @Override boolean isPushCapable(); @Override boolean isExpungeCapable(); @Override Pusher getPusher(PushReceiver receiver); String getFolderName(String id);  }