protected void processGreeting(Response r) throws ProtocolException { if (r.isBYE()) throw new ConnectionException(this, r); }
protected void processGreeting(Response r) throws ProtocolException { if (r.isBYE()) throw new ConnectionException(this, r); }
/** * Return the IMAPProtocol object for this folder. <p> * * This method will block if necessary to wait for an IDLE * command to finish. * * @return the IMAPProtocol object used when the folder is open * @exception ProtocolException for protocol errors */ protected IMAPProtocol getProtocol() throws ProtocolException { assert Thread.holdsLock(messageCacheLock); waitIfIdle(); // if we no longer have a protocol object after waiting, it probably // means the connection has been closed due to a communnication error, // or possibly because the folder has been closed if (protocol == null) throw new ConnectionException("Connection closed"); return protocol; }
/** * Return the IMAPProtocol object for this folder. <p> * * This method will block if necessary to wait for an IDLE * command to finish. * * @return the IMAPProtocol object used when the folder is open * @exception ProtocolException for protocol errors */ protected IMAPProtocol getProtocol() throws ProtocolException { assert Thread.holdsLock(messageCacheLock); waitIfIdle(); // if we no longer have a protocol object after waiting, it probably // means the connection has been closed due to a communnication error, // or possibly because the folder has been closed if (protocol == null) throw new ConnectionException("Connection closed"); return protocol; }
if (r.isBYE()) { throw new ConnectionException(this, r); } else { disconnect(); throw new ConnectionException(this, r);
if (r.isBYE()) { throw new ConnectionException(this, r); } else { disconnect(); throw new ConnectionException(this, r);
/** * Convenience routine to handle OK, NO, BAD and BYE responses. * * @param response the response * @exception ProtocolException for protocol failures */ public void handleResult(Response response) throws ProtocolException { if (response.isOK()) return; else if (response.isNO()) throw new CommandFailedException(response); else if (response.isBAD()) throw new BadCommandException(response); else if (response.isBYE()) { disconnect(); throw new ConnectionException(this, response); } }
throw new ConnectionException( "failed to create new store connection");
/** * Convenience routine to handle OK, NO, BAD and BYE responses. * * @param response the response * @exception ProtocolException for protocol failures */ public void handleResult(Response response) throws ProtocolException { if (response.isOK()) return; else if (response.isNO()) throw new CommandFailedException(response); else if (response.isBAD()) throw new BadCommandException(response); else if (response.isBYE()) { disconnect(); throw new ConnectionException(this, response); } }
throw new ConnectionException( "failed to create new store connection");
protected void processGreeting(Response r) throws ProtocolException { if (r.isBYE()) throw new ConnectionException(this, r); }
protected void processGreeting(Response r) throws ProtocolException { if (r.isBYE()) throw new ConnectionException(this, r); }
protected void processGreeting(Response r) throws ProtocolException { if (r.isBYE()) throw new ConnectionException(this, r); }
protected void processGreeting(Response r) throws ProtocolException { if (r.isBYE()) throw new ConnectionException(this, r); }
protected void processGreeting(Response r) throws ProtocolException { if (r.isBYE()) throw new ConnectionException(this, r); }
protected void processGreeting(Response r) throws ProtocolException { if (r.isBYE()) throw new ConnectionException(this, r); }
/** * Check the greeting when first connecting; look for PREAUTH response. */ protected void processGreeting(Response r) throws ProtocolException { super.processGreeting(r); // check if it's BAD if (r.isOK()) { // check if it's OK setCapabilities(r); return; } // only other choice is PREAUTH IMAPResponse ir = (IMAPResponse)r; if (ir.keyEquals("PREAUTH")) { authenticated = true; setCapabilities(r); } else throw new ConnectionException(this, r); }
/** * Check the greeting when first connecting; look for PREAUTH response. */ protected void processGreeting(Response r) throws ProtocolException { super.processGreeting(r); // check if it's BAD if (r.isOK()) { // check if it's OK setCapabilities(r); return; } // only other choice is PREAUTH IMAPResponse ir = (IMAPResponse)r; if (ir.keyEquals("PREAUTH")) { authenticated = true; setCapabilities(r); } else throw new ConnectionException(this, r); }
/** * Convenience routine to handle OK, NO, BAD and BYE responses. */ public void handleResult(Response response) throws ProtocolException { if (response.isOK()) return; else if (response.isNO()) throw new CommandFailedException(response); else if (response.isBAD()) throw new BadCommandException(response); else if (response.isBYE()) { disconnect(); throw new ConnectionException(this, response); } }
/** * Convenience routine to handle OK, NO, BAD and BYE responses. */ public void handleResult(Response response) throws ProtocolException { if (response.isOK()) return; else if (response.isNO()) throw new CommandFailedException(response); else if (response.isBAD()) throw new BadCommandException(response); else if (response.isBYE()) { disconnect(); throw new ConnectionException(this, response); } }