/** * While an IDLE command is in progress, read a response * sent from the server. The response is read with no locks * held so that when the read blocks waiting for the response * from the server it's not holding locks that would prevent * other threads from interrupting the IDLE command. * * @return the response * @since JavaMail 1.4.1 */ public synchronized Response readIdleResponse() { if (idleTag == null) return null; // IDLE not in progress Response r = null; try { r = readResponse(); } catch (IOException ioex) { // convert this into a BYE response r = Response.byeResponse(ioex); } catch (ProtocolException pex) { // convert this into a BYE response r = Response.byeResponse(pex); } return r; }
/** * While an IDLE command is in progress, read a response * sent from the server. The response is read with no locks * held so that when the read blocks waiting for the response * from the server it's not holding locks that would prevent * other threads from interrupting the IDLE command. * * @return the response * @since JavaMail 1.4.1 */ public synchronized Response readIdleResponse() { if (idleTag == null) return null; // IDLE not in progress Response r = null; try { r = readResponse(); } catch (IOException ioex) { // convert this into a BYE response r = Response.byeResponse(ioex); } catch (ProtocolException pex) { // convert this into a BYE response r = Response.byeResponse(pex); } return r; }
} catch (Exception ex) { v.add(Response.byeResponse(ex)); done = true; } catch (IOException ioex) { if (byeResp == null) // convert this into a BYE response byeResp = Response.byeResponse(ioex);
} catch (Exception ex) { v.add(Response.byeResponse(ex)); done = true; break; r = Response.byeResponse(ioex); } catch (ProtocolException pex) { logger.log(Level.FINE, "ignoring bad response", pex);
} catch (Exception ex) { v.add(Response.byeResponse(ex)); done = true; } catch (IOException ioex) { r = Response.byeResponse(ioex); } catch (ProtocolException pex) { continue; // skip this response
} catch (Exception ex) { v.add(Response.byeResponse(ex)); done = true; } catch (IOException ioex) { r = Response.byeResponse(ioex); } catch (ProtocolException pex) { continue; // skip this response
} catch (Exception ex) { r = Response.byeResponse(ex); done = true; r = Response.byeResponse(ioex); done = true;
} catch (Exception ex) { r = Response.byeResponse(ex); done = true; r = Response.byeResponse(ioex); done = true;
} catch (Exception ex) { r = Response.byeResponse(ex); done = true; r = Response.byeResponse(ioex); done = true;
} catch (Exception ex) { r = Response.byeResponse(ex); done = true; r = Response.byeResponse(ioex); done = true;
/** * STARTTLS Command. * * @exception ProtocolException for protocol failures * @see "RFC3501, section 6.2.1" */ public void startTLS() throws ProtocolException { try { super.startTLS("STARTTLS"); } catch (ProtocolException pex) { logger.log(Level.FINE, "STARTTLS ProtocolException", pex); // ProtocolException just means the command wasn't recognized, // or failed. This should never happen if we check the // CAPABILITY first. throw pex; } catch (Exception ex) { logger.log(Level.FINE, "STARTTLS Exception", ex); // any other exception means we have to shut down the connection // generate an artificial BYE response and disconnect Response[] r = { Response.byeResponse(ex) }; notifyResponseHandlers(r); disconnect(); throw new ProtocolException("STARTTLS failure", ex); } }
/** * COMPRESS Command. Only supports DEFLATE. * * @exception ProtocolException for protocol failures * @see "RFC 4978" */ public void compress() throws ProtocolException { try { super.startCompression("COMPRESS DEFLATE"); } catch (ProtocolException pex) { logger.log(Level.FINE, "COMPRESS ProtocolException", pex); // ProtocolException just means the command wasn't recognized, // or failed. This should never happen if we check the // CAPABILITY first. throw pex; } catch (Exception ex) { logger.log(Level.FINE, "COMPRESS Exception", ex); // any other exception means we have to shut down the connection // generate an artificial BYE response and disconnect Response[] r = { Response.byeResponse(ex) }; notifyResponseHandlers(r); disconnect(); throw new ProtocolException("COMPRESS failure", ex); } }
/** * STARTTLS Command. * * @exception ProtocolException for protocol failures * @see "RFC3501, section 6.2.1" */ public void startTLS() throws ProtocolException { try { super.startTLS("STARTTLS"); } catch (ProtocolException pex) { logger.log(Level.FINE, "STARTTLS ProtocolException", pex); // ProtocolException just means the command wasn't recognized, // or failed. This should never happen if we check the // CAPABILITY first. throw pex; } catch (Exception ex) { logger.log(Level.FINE, "STARTTLS Exception", ex); // any other exception means we have to shut down the connection // generate an artificial BYE response and disconnect Response[] r = { Response.byeResponse(ex) }; notifyResponseHandlers(r); disconnect(); throw new ProtocolException("STARTTLS failure", ex); } }
/** * COMPRESS Command. Only supports DEFLATE. * * @exception ProtocolException for protocol failures * @see "RFC 4978" */ public void compress() throws ProtocolException { try { super.startCompression("COMPRESS DEFLATE"); } catch (ProtocolException pex) { logger.log(Level.FINE, "COMPRESS ProtocolException", pex); // ProtocolException just means the command wasn't recognized, // or failed. This should never happen if we check the // CAPABILITY first. throw pex; } catch (Exception ex) { logger.log(Level.FINE, "COMPRESS Exception", ex); // any other exception means we have to shut down the connection // generate an artificial BYE response and disconnect Response[] r = { Response.byeResponse(ex) }; notifyResponseHandlers(r); disconnect(); throw new ProtocolException("COMPRESS failure", ex); } }
} catch (Exception ex) { r = Response.byeResponse(ex); done = true; r = Response.byeResponse(ioex); done = true;
} catch (Exception ex) { r = Response.byeResponse(ex); done = true; r = Response.byeResponse(ioex); done = true;
} catch (Exception ex) { r = Response.byeResponse(ex); done = true; r = Response.byeResponse(ioex); done = true;
} catch (Exception ex) { r = Response.byeResponse(ex); done = true; r = Response.byeResponse(ioex); done = true;
logger.log(Level.FINE, "SASL Exception", ioex); r = Response.byeResponse(ioex); done = true;
logger.log(Level.FINE, "SASL Exception", ioex); r = Response.byeResponse(ioex); done = true;