Coverage report

  %line %branch
com.ozacc.mail.fetch.impl.FetchMailProImpl
14% 
77% 

 1  
 package com.ozacc.mail.fetch.impl;
 2  
 
 3  
 import java.util.Properties;
 4  
 
 5  
 import javax.mail.AuthenticationFailedException;
 6  
 import javax.mail.Flags;
 7  
 import javax.mail.Folder;
 8  
 import javax.mail.Message;
 9  
 import javax.mail.MessagingException;
 10  
 import javax.mail.NoSuchProviderException;
 11  
 import javax.mail.Session;
 12  
 import javax.mail.Store;
 13  
 import javax.mail.internet.MimeMessage;
 14  
 
 15  
 import org.apache.commons.logging.Log;
 16  
 import org.apache.commons.logging.LogFactory;
 17  
 
 18  
 import com.ozacc.mail.MailAuthenticationException;
 19  
 import com.ozacc.mail.MailException;
 20  
 import com.ozacc.mail.NotConnectedException;
 21  
 import com.ozacc.mail.fetch.FetchMailPro;
 22  
 import com.ozacc.mail.fetch.MailFetchException;
 23  
 import com.ozacc.mail.fetch.ReceivedMail;
 24  
 
 25  
 /**
 26  
  * <code>FetchMail</code>¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤Î¼ÂÁõ¥¯¥é¥¹¡£
 27  
  * <p>
 28  
  * ¤³¤Î¥¯¥é¥¹¤Î¥¤¥ó¥¹¥¿¥ó¥¹¤Ï¡¢¥¤¥ó¥¹¥¿¥ó¥¹ÊÑ¿ô¤òÍѤ¤¤Æ¾õÂÖ¤òÊÝ»?¤¹¤?¤¿¤á¡¢
 29  
  * ¥¹¥Æ¡¼¥È¥?¥¹¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£¥¹¥Æ¡¼¥È¥Õ¥?¤Ç¤¹¡£
 30  
  * 
 31  
  * @since 1.2
 32  
  * @author Tomohiro Otsuka
 33  
  * @version $Id: FetchMailProImpl.java,v 1.1.2.10 2005/01/29 23:13:17 otsuka Exp $
 34  
  */
 35  1
 public class FetchMailProImpl implements FetchMailPro {
 36  
 
 37  1
 	private static Log log = LogFactory.getLog(FetchMailProImpl.class);
 38  
 
 39  
 	/** ¥Ç¥Õ¥©¥?¥È¤ÎSMTP¥µ¡¼¥Ð¡£¡Ölocalhost¡× */
 40  
 	public static final String DEFAULT_HOST = "localhost";
 41  
 
 42  
 	/** ¥Ç¥Õ¥©¥?¥È¤Î¥×¥úÁÈ¥³¥?¡£¡Öpop3¡× */
 43  
 	public static final String DEFAULT_PROTOCOL = "pop3";
 44  
 
 45  
 	/**
 46  
 	 * ¥Ç¥Õ¥©¥?¥È¤Î¥Ý¡¼¥È¡£¡Ö-1¡×<br>
 47  
 	 * -1¤Ï¥×¥úÁÈ¥³¥?¤Ë±?¤¸¤¿Å¬Àڤʥݡ¼¥È¤òÀßÄꤹ¤?ÆÃÊ̤ÊÃÍ¡£
 48  
 	 */
 49  
 	public static final int DEFAULT_PORT = -1;
 50  
 
 51  
 	private static final String INBOX_NAME = "INBOX";
 52  
 
 53  1
 	private String host = DEFAULT_HOST;
 54  
 
 55  1
 	private String protocol = DEFAULT_PROTOCOL;
 56  
 
 57  1
 	private int port = DEFAULT_PORT;
 58  
 
 59  
 	private String username;
 60  
 
 61  
 	private String password;
 62  
 
 63  
 	private boolean javaMailLogEnabled;
 64  
 
 65  
 	private Store store;
 66  
 
 67  
 	private Folder currentFolder;
 68  
 
 69  
 	/**
 70  
 	 * ¥³¥ó¥¹¥È¥é¥¯¥¿¡£
 71  
 	 */
 72  1
 	public FetchMailProImpl() {
 73  1
 		System.setProperty("mail.mime.multipart.ignoremissingendboundary", "true");
 74  1
 	}
 75  
 
 76  
 	/**
 77  
 	 * @see com.ozacc.mail.fetch.FetchMailPro#connect()
 78  
 	 */
 79  
 	public synchronized void connect() throws MailException {
 80  0
 		log.debug(protocol.toUpperCase() + "¥µ¡¼¥Ð[" + host + "]¤ËÀܳ¤·¤Þ¤¹¡£");
 81  
 
 82  0
 		Session session = Session.getInstance(createProperties(), null);
 83  0
 		if (javaMailLogEnabled) {
 84  0
 			session.setDebug(true);
 85  
 		}
 86  
 
 87  
 		try {
 88  0
 			store = session.getStore(protocol);
 89  0
 		} catch (NoSuchProviderException e) {
 90  0
 			log.error("»ØÄꤵ¤?¤¿¥×¥úÁÈ¥³¥?[" + protocol + "]¤Ï¥µ¥Ý¡¼¥È¤µ¤?¤Æ¤¤¤Þ¤»¤ó¡£", e);
 91  0
 			throw new MailException("»ØÄꤵ¤?¤¿¥×¥úÁÈ¥³¥?[" + protocol + "]¤Ï¥µ¥Ý¡¼¥È¤µ¤?¤Æ¤¤¤Þ¤»¤ó¡£", e);
 92  
 		}
 93  
 
 94  
 		try {
 95  0
 			store.connect(host, port, username, password);
 96  0
 		} catch (AuthenticationFailedException e) {
 97  0
 			log.error(protocol.toUpperCase() + "¥µ¡¼¥Ð[" + host + "]¤Ø¤ÎÀܳǧ¾Ú¤Ë¼ºÇÔ¤·¤Þ¤·¤¿¡£", e);
 98  0
 			throw new MailAuthenticationException(protocol.toUpperCase() + "¥µ¡¼¥Ð[" + host
 99  0
 					+ "]¤Ø¤ÎÀܳǧ¾Ú¤Ë¼ºÇÔ¤·¤Þ¤·¤¿¡£", e);
 100  0
 		} catch (MessagingException e) {
 101  0
 			log.error(protocol.toUpperCase() + "¥µ¡¼¥Ð[" + host + "]¤Ø¤ÎÀܳ¤Ë¼ºÇÔ¤·¤Þ¤·¤¿¡£", e);
 102  0
 			throw new MailException(protocol.toUpperCase() + "¥µ¡¼¥Ð[" + host + "]¤Ø¤ÎÀܳ¤Ë¼ºÇÔ¤·¤Þ¤·¤¿¡£", e);
 103  
 		}
 104  
 
 105  0
 		log.info(protocol.toUpperCase() + "¥µ¡¼¥Ð[" + host + "]¤ËÀܳ¤·¤Þ¤·¤¿¡£");
 106  
 
 107  0
 		changeFolder(INBOX_NAME);
 108  0
 	}
 109  
 
 110  
 	/**
 111  
 	 * Session¤ËÅϤ¹Properties¥¤¥ó¥¹¥¿¥ó¥¹¤òÊÖ¤·¤Þ¤¹¡£
 112  
 	 * APOPǧ¾Ú¤ò¹Ô¤¦¾?¹ç¤Ë¡¢"mail.pop3.apop.enable"¤ò¥»¥Ã¥È¤·¤Þ¤¹¡£
 113  
 	 * 
 114  
 	 * @return Session¤ËÅϤ¹Properties¥¤¥ó¥¹¥¿¥ó¥¹
 115  
 	 */
 116  
 	private Properties createProperties() {
 117  0
 		Properties prop = new Properties();
 118  0
 		if ("apop".equalsIgnoreCase(protocol)) {
 119  0
 			prop.put("mail.pop3.apop.enable", "true");
 120  
 		}
 121  0
 		return prop;
 122  
 	}
 123  
 
 124  
 	/**
 125  
 	 * @see com.ozacc.mail.fetch.FetchMailPro#disconnect()
 126  
 	 */
 127  
 	public synchronized void disconnect() throws MailException {
 128  
 		try {
 129  0
 			closeCurrentFolderIfOpen();
 130  0
 		} finally {
 131  0
 			if (isConnected()) {
 132  0
 				log.debug(protocol.toUpperCase() + "¥µ¡¼¥Ð[" + host + "]¤È¤ÎÀܳ¤òÀÚÃǤ·¤Þ¤¹¡£");
 133  
 				try {
 134  0
 					store.close();
 135  0
 					store = null;
 136  0
 				} catch (MessagingException e) {
 137  0
 					throw new MailException("¥µ¡¼¥Ð[" + host + "]¤È¤ÎÀܳÀÚÃǤ˼ºÇÔ¤·¤Þ¤·¤¿¡£", e);
 138  
 				}
 139  
 			}
 140  0
 		}
 141  0
 		log.info(protocol.toUpperCase() + "¥µ¡¼¥Ð[" + host + "]¤È¤ÎÀܳ¤òÀÚÃǤ·¤Þ¤·¤¿¡£");
 142  0
 	}
 143  
 
 144  
 	/**
 145  
 	 * ¸½ºß¤Î¥á¥Ã¥»¡¼¥¸¥Õ¥©¥?¥À¤ò¥¯¥ú½¼¥º¤·¤Þ¤¹¡£
 146  
 	 * 
 147  
 	 * @throws MailException ¥á¥Ã¥»¡¼¥¸¥Õ¥©¥?¥À¤Î¥¯¥ú½¼¥º¤Ë¼ºÇÔ¤·¤¿¾?¹?
 148  
 	 */
 149  
 	private void closeCurrentFolderIfOpen() throws MailException {
 150  0
 		if (currentFolder != null && currentFolder.isOpen()) {
 151  0
 			log.debug("¥á¥Ã¥»¡¼¥¸¥Õ¥©¥?¥À[" + currentFolder.getName() + "]¤ò¥¯¥ú½¼¥º¤·¤Þ¤¹¡£");
 152  
 			try {
 153  0
 				currentFolder.close(true);
 154  0
 			} catch (MessagingException e) {
 155  0
 				log.error("¥á¥Ã¥»¡¼¥¸¥Õ¥©¥?¥À[" + currentFolder.getName() + "]¤Î¥¯¥ú½¼¥º¤Ë¼ºÇÔ¤·¤Þ¤·¤¿¡£", e);
 156  0
 				throw new MailException("¥á¥Ã¥»¡¼¥¸¥Õ¥©¥?¥À[" + currentFolder.getName() + "]¤Î¥¯¥ú½¼¥º¤Ë¼ºÇÔ¤·¤Þ¤·¤¿¡£",
 157  0
 						e);
 158  
 			}
 159  0
 			log.debug("¥á¥Ã¥»¡¼¥¸¥Õ¥©¥?¥À[" + currentFolder.getName() + "]¤ò¥¯¥ú½¼¥º¤·¤Þ¤·¤¿¡£");
 160  0
 			currentFolder = null;
 161  
 		}
 162  0
 	}
 163  
 
 164  
 	/**
 165  
 	 * @see com.ozacc.mail.fetch.FetchMailPro#changeFolder(java.lang.String)
 166  
 	 */
 167  
 	public synchronized void changeFolder(String folderName) throws MailException {
 168  0
 		closeCurrentFolderIfOpen();
 169  0
 		log.debug("¥á¥Ã¥»¡¼¥¸¥Õ¥©¥?¥À[" + folderName + "]¤ò¥ª¡¼¥×¥ó¤·¤Þ¤¹¡£");
 170  
 		try {
 171  0
 			currentFolder = store.getFolder(folderName);
 172  0
 			currentFolder.open(Folder.READ_WRITE);
 173  0
 		} catch (MessagingException e) {
 174  0
 			log.error("¥á¥Ã¥»¡¼¥¸¥Õ¥©¥?¥À[" + folderName + "]¤Î¥ª¡¼¥×¥ó¤Ë¼ºÇÔ¤·¤Þ¤·¤¿¡£", e);
 175  0
 			throw new MailException("¥á¥Ã¥»¡¼¥¸¥Õ¥©¥?¥À[" + folderName + "]¤Î¥ª¡¼¥×¥ó¤Ë¼ºÇÔ¤·¤Þ¤·¤¿¡£", e);
 176  
 		}
 177  0
 		log.debug("¥á¥Ã¥»¡¼¥¸¥Õ¥©¥?¥À[" + folderName + "]¤ò¥ª¡¼¥×¥ó¤·¤Þ¤·¤¿¡£");
 178  0
 	}
 179  
 
 180  
 	/**
 181  
 	 * @see com.ozacc.mail.fetch.FetchMailPro#getMailCount()
 182  
 	 */
 183  
 	public int getMailCount() throws MailException {
 184  0
 		checkIfCurrentFolderIsOpen();
 185  
 		try {
 186  0
 			return currentFolder.getMessageCount();
 187  0
 		} catch (MessagingException e) {
 188  0
 			throw new MailFetchException("¥á¡¼¥?¿ô¤Î¼èÆÀ¤Ë¼ºÇÔ¤·¤Þ¤·¤¿¡£", e);
 189  
 		}
 190  
 	}
 191  
 
 192  
 	/**
 193  
 	 * ¥á¡¼¥?¥µ¡¼¥Ð¤ËÀܳ¤µ¤?¤Æ¤¤¤Æ¡¢¥Õ¥©¥?¥À¤¬ÁàºûÀǤ­¤?¾õÂÖ¤«¤É¤¦¤«Ä´¤Ù¤Þ¤¹¡£
 194  
 	 * ¥Õ¥©¥?¥À¤¬ÁàºûÀǤ­¤?¾õÂ֤ˤʤ¤¾?¹ç¡¢NotConnectedException¤ò¥¹¥ú½¼¤·¤Þ¤¹¡£
 195  
 	 * 
 196  
 	 * @throws NotConnectedException
 197  
 	 */
 198  
 	private void checkIfCurrentFolderIsOpen() throws NotConnectedException {
 199  0
 		if (currentFolder == null || !currentFolder.isOpen()) {
 200  0
 			throw new NotConnectedException(protocol.toUpperCase() + "¥µ¡¼¥Ð[" + host + "]¤ËÀܳ¤µ¤?¤Æ¤¤¤Þ¤»¤ó¡£");
 201  
 		}
 202  0
 	}
 203  
 
 204  
 	/**
 205  
 	 * @see com.ozacc.mail.fetch.FetchMailPro#getMail(int)
 206  
 	 */
 207  
 	public ReceivedMail getMail(int num) throws MailException {
 208  0
 		MimeMessage mimeMessage = getMessage(num);
 209  0
 		MailConverter converter = new MailConverter(mimeMessage);
 210  0
 		return converter.convertIntoMails()[0];
 211  
 	}
 212  
 
 213  
 	public ReceivedMail[] getMails(boolean delete) throws MailException {
 214  0
 		MimeMessage[] mimeMessages = getMessages(delete);
 215  0
 		MailConverter converter = new MailConverter(mimeMessages);
 216  0
 		return converter.convertIntoMails();
 217  
 	}
 218  
 
 219  
 	/**
 220  
 	 * @see com.ozacc.mail.fetch.FetchMailPro#getMessage(int)
 221  
 	 */
 222  
 	public MimeMessage getMessage(int num) throws MailException {
 223  0
 		checkIfCurrentFolderIsOpen();
 224  
 		try {
 225  0
 			return (MimeMessage)currentFolder.getMessage(num);
 226  0
 		} catch (MessagingException e) {
 227  0
 			log.error("¥á¥Ã¥»¡¼¥¸¤Î¼èÆÀ¤Ë¼ºÇÔ¤·¤Þ¤·¤¿¡£", e);
 228  0
 			throw new MailFetchException("¥á¥Ã¥»¡¼¥¸¤Î¼èÆÀ¤Ë¼ºÇÔ¤·¤Þ¤·¤¿¡£", e);
 229  
 		}
 230  
 	}
 231  
 
 232  
 	public MimeMessage[] getMessages(boolean delete) throws MailException {
 233  0
 		checkIfCurrentFolderIsOpen();
 234  
 		try {
 235  0
 			Message[] messages = currentFolder.getMessages();
 236  0
 			if (log.isInfoEnabled()) {
 237  0
 				if (messages.length > 0) {
 238  0
 					log.info(messages.length + "Ä̤Υ᡼¥?¤ò¼õ¿®¤·¤Þ¤¹¡£");
 239  
 				} else {
 240  0
 					log.info("¼õ¿®¤¹¤?¥á¡¼¥?¤Ï¤¢¤ê¤Þ¤»¤ó¡£");
 241  
 				}
 242  
 			}
 243  
 			// SEEN¥Õ¥é¥°¤òΩ¤Æ¤?
 244  0
 			currentFolder.setFlags(messages, new Flags(Flags.Flag.SEEN), true);
 245  
 			// DELETED¥Õ¥é¥°¤òΩ¤Æ¤?
 246  0
 			if (delete) {
 247  0
 				currentFolder.setFlags(messages, new Flags(Flags.Flag.DELETED), true);
 248  
 			}
 249  0
 			MimeMessage[] mimeMessages = new MimeMessage[messages.length];
 250  0
 			for (int i = 0; i < messages.length; i++) {
 251  0
 				mimeMessages[i] = (MimeMessage)messages[i];
 252  
 			}
 253  0
 			return mimeMessages;
 254  0
 		} catch (MessagingException e) {
 255  0
 			log.error("¥á¥Ã¥»¡¼¥¸¤Î¼èÆÀ¤Ë¼ºÇÔ¤·¤Þ¤·¤¿¡£", e);
 256  0
 			throw new MailFetchException("¥á¥Ã¥»¡¼¥¸¤Î¼èÆÀ¤Ë¼ºÇÔ¤·¤Þ¤·¤¿¡£", e);
 257  
 		}
 258  
 	}
 259  
 
 260  
 	/**
 261  
 	 * @see com.ozacc.mail.fetch.FetchMailPro#isConnected()
 262  
 	 */
 263  
 	public boolean isConnected() {
 264  0
 		return store != null && store.isConnected();
 265  
 	}
 266  
 
 267  
 	/**
 268  
 	 *  ¥á¡¼¥?¥µ¡¼¥Ð¤Î¥Û¥¹¥È̾¡¢¤Þ¤¿¤ÏIP¥¢¥É¥?¥¹¤òÊÖ¤·¤Þ¤¹¡£
 269  
 	 * 
 270  
 	 * @return  ¥á¡¼¥?¥µ¡¼¥Ð¤Î¥Û¥¹¥È̾¡¢¤Þ¤¿¤ÏIP¥¢¥É¥?¥¹
 271  
 	 */
 272  
 	public String getHost() {
 273  0
 		return host;
 274  
 	}
 275  
 
 276  
 	/**
 277  
 	 * ¥á¡¼¥?¥µ¡¼¥Ð¤Î¥Û¥¹¥È̾¡¢¤Þ¤¿¤ÏIP¥¢¥É¥?¥¹¤ò¥»¥Ã¥È¤·¤Þ¤¹¡£
 278  
 	 * ¥Ç¥Õ¥©¥?¥È¤Ï localhost ¤Ç¤¹¡£
 279  
 	 * 
 280  
 	 * @param host ¥á¡¼¥?¥µ¡¼¥Ð¤Î¥Û¥¹¥È̾¡¢¤Þ¤¿¤ÏIP¥¢¥É¥?¥¹
 281  
 	 */
 282  
 	public void setHost(String host) {
 283  1
 		this.host = host;
 284  1
 	}
 285  
 
 286  
 	/**
 287  
 	 * ¥á¡¼¥?¥µ¡¼¥Ð¤Îǧ¾Ú¥Ñ¥¹¥?¡¼¥É¤òÊÖ¤·¤Þ¤¹¡£
 288  
 	 * 
 289  
 	 * @return ¥á¡¼¥?¥µ¡¼¥Ð¤Îǧ¾Ú¥Ñ¥¹¥?¡¼¥É
 290  
 	 */
 291  
 	public String getPassword() {
 292  0
 		return password;
 293  
 	}
 294  
 
 295  
 	/**
 296  
 	 * ¥á¡¼¥?¥µ¡¼¥Ð¤Îǧ¾Ú¥Ñ¥¹¥?¡¼¥É̾¤ò¥»¥Ã¥È¤·¤Þ¤¹¡£
 297  
 	 * 
 298  
 	 * @param password ¥á¡¼¥?¥µ¡¼¥Ð¤Îǧ¾Ú¥Ñ¥¹¥?¡¼¥É
 299  
 	 */
 300  
 	public void setPassword(String password) {
 301  1
 		this.password = password;
 302  1
 	}
 303  
 
 304  
 	/**
 305  
 	 * ¥á¡¼¥?¼õ¿®¤Ë»ÈÍѤ¹¤?¥×¥úÁÈ¥³¥úÁ?¤ò¥»¥Ã¥È¤·¤Þ¤¹¡£
 306  
 	 * 
 307  
 	 * @return ¥×¥úÁÈ¥³¥?
 308  
 	 */
 309  
 	public String getProtocol() {
 310  0
 		return protocol;
 311  
 	}
 312  
 
 313  
 	/**
 314  
 	 * ¥á¡¼¥?¼õ¿®¤Ë»ÈÍѤ¹¤?¥×¥úÁÈ¥³¥úÁ?¤ò¥»¥Ã¥È¤·¤Þ¤¹¡£
 315  
 	 * ¸½ºß¥µ¥Ý¡¼¥È¤µ¤?¤Æ¤¤¤?¥×¥úÁÈ¥³¥?¤Ï¡¢¡Öpop3¡×¤È¡Öimap¡×¤ÎÆó¤Ä¤Ç¤¹¡£
 316  
 	 * ¥Ç¥Õ¥©¥?¥È¤Ï¡Öpop3¡×¤Ç¤¹¡£
 317  
 	 * <p>
 318  
 	 * POP3¥µ¡¼¥Ð¤Ø¤Îǧ¾Ú¤òAPOP¤Ç¹Ô¤¤¤¿¤¤¾?¹ç¤Ï¡¢¥×¥úÁÈ¥³¥?̾¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¤¬¡¢
 319  
 	 * ¡Öapop¡×¤ò»ØÄꤷ¤Æ¤¯¤À¤µ¤¤¡£APOPǧ¾Ú¤ò»ÈÍѤ¹¤?¤Ë¤Ï¡¢JavaMail 1.3.2°Ê¹ß¤¬É¬ÍפǤ¹¡£
 320  
 	 * 
 321  
 	 * @param protocol ¥×¥úÁÈ¥³¥?
 322  
 	 */
 323  
 	public void setProtocol(String protocol) {
 324  1
 		this.protocol = protocol;
 325  1
 	}
 326  
 
 327  
 	/**
 328  
 	 * @return ǧ¾Ú¥æ¡¼¥¶Ì¾
 329  
 	 */
 330  
 	public String getUsername() {
 331  0
 		return username;
 332  
 	}
 333  
 
 334  
 	/**
 335  
 	 * ¥á¡¼¥?¥µ¡¼¥Ð¤Îǧ¾Ú¥æ¡¼¥¶Ì¾¤ò¥»¥Ã¥È¤·¤Þ¤¹¡£
 336  
 	 * 
 337  
 	 * @param username ǧ¾Ú¥æ¡¼¥¶Ì¾
 338  
 	 */
 339  
 	public void setUsername(String username) {
 340  1
 		this.username = username;
 341  1
 	}
 342  
 
 343  
 	/**
 344  
 	 * @return ¥Ý¡¼¥ÈÈÖ¹?
 345  
 	 */
 346  
 	public int getPort() {
 347  0
 		return port;
 348  
 	}
 349  
 
 350  
 	/**
 351  
 	 * ¥á¡¼¥?¼õ¿®¤Ë»ÈÍѤ¹¤?¥Ý¡¼¥ÈÈÖ¹æ¤ò¥»¥Ã¥È¤·¤Þ¤¹¡£
 352  
 	 * ¥×¥úÁÈ¥³¥?¤Ë±?¤¸¤¿¥Ý¡¼¥ÈÈֹ椬¼«Æ°Åª¤Ë»ÈÍѤµ¤?¤Þ¤¹¤Î¤Ç¡¢Ä̾?¤³¤³¤Ç¥Ý¡¼¥ÈÈÖ¹æ¤ò¥»¥Ã¥È¤¹¤?ɬÍפϤ¢¤ê¤Þ¤»¤ó¡£
 353  
 	 * 
 354  
 	 * @param port ¥Ý¡¼¥ÈÈÖ¹?
 355  
 	 */
 356  
 	public void setPort(int port) {
 357  0
 		this.port = port;
 358  0
 	}
 359  
 
 360  
 	/**
 361  
 	 * JavaMail¤Î¥Ç¥Ð¥Ã¥°¤¬Í­¸ú¤«¤É¤¦¤«È½Äꤷ¤Þ¤¹¡£
 362  
 	 * 
 363  
 	 * @return JavaMail¤Î¥Ç¥Ð¥Ã¥°¤¬Í­¸ú¤Ê¾?¹? ture
 364  
 	 */
 365  
 	public boolean isJavaMailLogEnabled() {
 366  0
 		return javaMailLogEnabled;
 367  
 	}
 368  
 
 369  
 	/**
 370  
 	 * JavaMail¤Î¥Ç¥Ð¥Ã¥°¤òÍ­¸ú¤Ë¤¹¤?¤«¤É¤¦¤«»ØÄꤷ¤Þ¤¹¡£
 371  
 	 * Í­¸ú¤Ë¤¹¤?¤È¡¢<code>System.out</code>¤Î¥Ç¥Ð¥Ã¥°¥á¥Ã¥»¡¼¥¸¤¬½ÐÎϤµ¤?¤Þ¤¹¡£<br>
 372  
 	 * ¥Ç¥Õ¥©¥?¥È¤Ï̵¸ú¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£
 373  
 	 * 
 374  
 	 * @see javax.mail.session#setDebug(boolean)
 375  
 	 * @param javaMailLogEnabled The javaMailLogEnabled to set.
 376  
 	 */
 377  
 	public void setJavaMailLogEnabled(boolean javaMailLogEnabled) {
 378  0
 		this.javaMailLogEnabled = javaMailLogEnabled;
 379  0
 	}
 380  
 }

This report is generated by jcoverage, Maven and Maven JCoverage Plugin.