/** * Get a store protocol object for use by a folder. */ IMAPProtocol getFolderStoreProtocol() throws ProtocolException { IMAPProtocol p = getStoreProtocol(); p.removeResponseHandler(this); p.addResponseHandler(nonStoreResponseHandler); return p; }
/** * Get a store protocol object for use by a folder. */ IMAPProtocol getFolderStoreProtocol() throws ProtocolException { IMAPProtocol p = getStoreProtocol(); p.removeResponseHandler(this); p.addResponseHandler(nonStoreResponseHandler); return p; }
/** * Release a store protocol object that was being used by a folder. */ void releaseFolderStoreProtocol(IMAPProtocol protocol) { if (protocol == null) return; // should never happen protocol.removeResponseHandler(nonStoreResponseHandler); protocol.addResponseHandler(this); synchronized (pool) { pool.storeConnectionInUse = false; pool.notifyAll(); // in case anyone waiting pool.logger.fine("releaseFolderStoreProtocol()"); timeoutConnections(); } }
/** * Release a store protocol object that was being used by a folder. */ void releaseFolderStoreProtocol(IMAPProtocol protocol) { if (protocol == null) return; // should never happen protocol.removeResponseHandler(nonStoreResponseHandler); protocol.addResponseHandler(this); synchronized (pool) { pool.storeConnectionInUse = false; pool.notifyAll(); // in case anyone waiting pool.logger.fine("releaseFolderStoreProtocol()"); timeoutConnections(); } }
/** * Release the protocol object back to the connection pool. */ void releaseProtocol(IMAPFolder folder, IMAPProtocol protocol) { synchronized (pool) { if (protocol != null) { // If the pool is not full, add the store as a response handler // and return the protocol object to the connection pool. if (!isConnectionPoolFull()) { protocol.addResponseHandler(this); pool.authenticatedConnections.addElement(protocol); if (logger.isLoggable(Level.FINE)) logger.fine( "added an Authenticated connection -- size: " + pool.authenticatedConnections.size()); } else { logger.fine( "pool is full, not adding an Authenticated connection"); try { protocol.logout(); } catch (ProtocolException pex) {}; } } if (pool.folders != null) pool.folders.removeElement(folder); timeoutConnections(); } }
/** * Release the protocol object back to the connection pool. */ void releaseProtocol(IMAPFolder folder, IMAPProtocol protocol) { synchronized (pool) { if (protocol != null) { // If the pool is not full, add the store as a response handler // and return the protocol object to the connection pool. if (!isConnectionPoolFull()) { protocol.addResponseHandler(this); pool.authenticatedConnections.addElement(protocol); if (logger.isLoggable(Level.FINE)) logger.fine( "added an Authenticated connection -- size: " + pool.authenticatedConnections.size()); } else { logger.fine( "pool is full, not adding an Authenticated connection"); try { protocol.logout(); } catch (ProtocolException pex) {}; } } if (pool.folders != null) pool.folders.removeElement(folder); timeoutConnections(); } }
p.addResponseHandler(nonStoreResponseHandler); p.addResponseHandler(nonStoreResponseHandler); p.noop(); p.removeResponseHandler(nonStoreResponseHandler); p.addResponseHandler(this); } catch (ProtocolException pex) { try { p.addResponseHandler(nonStoreResponseHandler); p.unauthenticate(); login(p, user, password); p.removeResponseHandler(nonStoreResponseHandler); p.addResponseHandler(this); } catch (ProtocolException pex) { try {
p.addResponseHandler(nonStoreResponseHandler); p.addResponseHandler(nonStoreResponseHandler); p.noop(); p.removeResponseHandler(nonStoreResponseHandler); p.addResponseHandler(this); } catch (ProtocolException pex) { try { p.addResponseHandler(nonStoreResponseHandler); p.unauthenticate(); login(p, user, password); p.removeResponseHandler(nonStoreResponseHandler); p.addResponseHandler(this); } catch (ProtocolException pex) { try {
"failed to create new store connection"); p.addResponseHandler(this); pool.authenticatedConnections.addElement(p);
"failed to create new store connection"); p.addResponseHandler(this); pool.authenticatedConnections.addElement(p);
", user=" + traceUser(user) + ", password=" + tracePassword(password)); protocol.addResponseHandler(nonStoreResponseHandler); login(protocol, user, password); protocol.removeResponseHandler(nonStoreResponseHandler); protocol.addResponseHandler(this);
", user=" + traceUser(user) + ", password=" + tracePassword(password)); protocol.addResponseHandler(nonStoreResponseHandler); login(protocol, user, password); protocol.removeResponseHandler(nonStoreResponseHandler); protocol.addResponseHandler(this);
protocol.addResponseHandler(this);
protocol.addResponseHandler(this);
/** * Get a store protocol object for use by a folder. */ IMAPProtocol getFolderStoreProtocol() throws ProtocolException { IMAPProtocol p = getStoreProtocol(); p.removeResponseHandler(this); p.addResponseHandler(nonStoreResponseHandler); return p; }
/** * Get a store protocol object for use by a folder. */ IMAPProtocol getFolderStoreProtocol() throws ProtocolException { IMAPProtocol p = getStoreProtocol(); p.removeResponseHandler(this); p.addResponseHandler(nonStoreResponseHandler); return p; }
/** * Get a store protocol object for use by a folder. */ IMAPProtocol getFolderStoreProtocol() throws ProtocolException { IMAPProtocol p = getStoreProtocol(); p.removeResponseHandler(this); p.addResponseHandler(nonStoreResponseHandler); return p; }
/** * Get a store protocol object for use by a folder. */ IMAPProtocol getFolderStoreProtocol() throws ProtocolException { IMAPProtocol p = getStoreProtocol(); p.removeResponseHandler(this); p.addResponseHandler(nonStoreResponseHandler); return p; }
/** * Get a store protocol object for use by a folder. */ IMAPProtocol getFolderStoreProtocol() throws ProtocolException { IMAPProtocol p = getStoreProtocol(); p.removeResponseHandler(this); p.addResponseHandler(nonStoreResponseHandler); return p; }
/** * Release a store protocol object that was being used by a folder. */ void releaseFolderStoreProtocol(IMAPProtocol protocol) { if (protocol == null) return; // should never happen protocol.removeResponseHandler(nonStoreResponseHandler); protocol.addResponseHandler(this); synchronized (pool) { pool.storeConnectionInUse = false; pool.notifyAll(); // in case anyone waiting pool.logger.fine("releaseFolderStoreProtocol()"); timeoutConnections(); } }