/** * Log a message at the CONFIG level. * @param msg the message. */ public void config(String msg) { log(Level.CONFIG, msg); }
/** * Log a message at the FINE level. * @param msg the message. */ public void fine(String msg) { log(Level.FINE, msg); }
/** * Log a message at the FINER level. * @param msg the message. */ public void finer(String msg) { log(Level.FINER, msg); }
/** * Log a message at the FINEST level. * @param msg the message. */ public void finest(String msg) { log(Level.FINEST, msg); }
/** * Log the specified message. * Can be overridden by subclass to do different logging. * * @param msg the message to log */ protected void log(String msg) { logger.log(level, msg); }
/** * Log a message at the FINER level. * @param msg the message. */ public void finer(String msg) { log(Level.FINER, msg); }
/** * Log a message at the CONFIG level. * @param msg the message. */ public void config(String msg) { log(Level.CONFIG, msg); }
/** * Log a message at the FINE level. * @param msg the message. */ public void fine(String msg) { log(Level.FINE, msg); }
/** * Log a message at the FINEST level. * @param msg the message. */ public void finest(String msg) { log(Level.FINEST, msg); }
/** * Log the specified message. * Can be overridden by subclass to do different logging. * * @param msg the message to log */ protected void log(String msg) { logger.log(level, msg); }
/** * Set the debug setting for this Session. * <p> * Since the debug setting can be turned on only after the Session * has been created, to turn on debugging in the Session * constructor, set the property <code>mail.debug</code> in the * Properties object passed in to the constructor to true. The * value of the <code>mail.debug</code> property is used to * initialize the per-Session debugging flag. Subsequent calls to * the <code>setDebug</code> method manipulate the per-Session * debugging flag and have no affect on the <code>mail.debug</code> * property. * * @param debug Debug setting */ public synchronized void setDebug(boolean debug) { this.debug = debug; initLogger(); logger.log(Level.CONFIG, "setDebug: JavaMail version {0}", Version.version); }
/** * Abort an IDLE command. While one thread is blocked in * readIdleResponse(), another thread will use this method * to abort the IDLE command, which will cause the server * to send the closing tag for the IDLE command, which * readIdleResponse() and processIdleResponse() will see * and terminate the IDLE state. * * @since JavaMail 1.4.1 */ public void idleAbort() { OutputStream os = getOutputStream(); try { os.write(DONE); os.flush(); } catch (Exception ex) { // nothing to do, hope to detect it again later logger.log(Level.FINEST, "Exception aborting IDLE", ex); } }
/** * Abort an IDLE command. While one thread is blocked in * readIdleResponse(), another thread will use this method * to abort the IDLE command, which will cause the server * to send the closing tag for the IDLE command, which * readIdleResponse() and processIdleResponse() will see * and terminate the IDLE state. * * @since JavaMail 1.4.1 */ public void idleAbort() { OutputStream os = getOutputStream(); try { os.write(DONE); os.flush(); } catch (Exception ex) { // nothing to do, hope to detect it again later logger.log(Level.FINEST, "Exception aborting IDLE", ex); } }
/** * Create an IMAPFolder object. If user supplied their own class, * use it. Otherwise, call the constructor. * * @param li the ListInfo for the folder * @return the new IMAPFolder object */ protected IMAPFolder newIMAPFolder(ListInfo li) { IMAPFolder f = null; if (folderConstructorLI != null) { try { Object[] o = { li, this }; f = (IMAPFolder)folderConstructorLI.newInstance(o); } catch (Exception ex) { logger.log(Level.FINE, "exception creating IMAPFolder class LI", ex); } } if (f == null) f = new IMAPFolder(li, this); return f; }
final Date parse() { int startPosition = pos.getIndex(); try { return tryParse(); } catch (Exception e) { // == ParseException | RuntimeException e if (LOGGER.isLoggable(Level.FINE)) { LOGGER.log(Level.FINE, "Bad date: '" + text + "'", e); } pos.setErrorIndex(pos.getIndex()); pos.setIndex(startPosition); return null; } }
private Session(Properties props, Authenticator authenticator) { this.props = props; this.authenticator = authenticator; if (Boolean.valueOf(props.getProperty("mail.debug")).booleanValue()) debug = true; initLogger(); logger.log(Level.CONFIG, "JavaMail version {0}", Version.version); // get the Class associated with the Authenticator Class<?> cl; if (authenticator != null) cl = authenticator.getClass(); else cl = this.getClass(); // load the resources loadAddressMap(cl); q = new EventQueue((Executor)props.get("mail.event.executor")); }
final Date parse() { int startPosition = pos.getIndex(); try { return tryParse(); } catch (Exception e) { // == ParseException | RuntimeException e if (LOGGER.isLoggable(Level.FINE)) { LOGGER.log(Level.FINE, "Bad date: '" + text + "'", e); } pos.setErrorIndex(pos.getIndex()); // to prevent DateFormat::parse from throwing ParseException: pos.setIndex(startPosition + 1); return null; } }
private Session(Properties props, Authenticator authenticator) { this.props = props; this.authenticator = authenticator; if (Boolean.valueOf(props.getProperty("mail.debug")).booleanValue()) debug = true; initLogger(); logger.log(Level.CONFIG, "JavaMail version {0}", Version.version); // get the Class associated with the Authenticator Class<?> cl; if (authenticator != null) cl = authenticator.getClass(); else cl = this.getClass(); // load the resources loadProviders(cl); loadAddressMap(cl); q = new EventQueue((Executor)props.get("mail.event.executor")); }
void idleAbortWait() { synchronized (messageCacheLock) { if (idleState == IDLE && protocol != null) { protocol.idleAbort(); idleState = ABORTING; // read responses until OK or connection failure try { for (;;) { if (!handleIdle(false)) break; } } catch (Exception ex) { // assume it's a connection failure; nothing more to do logger.log(Level.FINEST, "Exception in idleAbortWait", ex); } logger.finest("IDLE aborted"); } } }
void idleAbortWait() { synchronized (messageCacheLock) { if (idleState == IDLE && protocol != null) { protocol.idleAbort(); idleState = ABORTING; // read responses until OK or connection failure try { for (;;) { if (!handleIdle(false)) break; } } catch (Exception ex) { // assume it's a connection failure; nothing more to do logger.log(Level.FINEST, "Exception in idleAbortWait", ex); } logger.finest("IDLE aborted"); } } }