/**
 * @(#)file    CommonSignThreadManager.java
 * @(#)author  DaeJin Lee
 * @(#)version 1.0
 * @(#)date    Jun 10, 2005
 * @(#)since   JDK 1.4.2
 *
 * Copyright (c) www.dcchem.co.kr, Inc.
 * All rights reserved.
 * This software is the proprietary information of dcchem, Inc.
 */
package kr.co.udapsoft.common.commonSign;


/**
 * 
 * @version 1.0
 * @author DaeJin Lee
 */
public class CommonMailThreadManager {

    private static CommonMailThread CommonMailThread = null;

    private static Object lock = new Object();

    private CommonMailThreadManager() {
        super();
    }

    public static void doStart() {
        synchronized(lock) {
            if( CommonMailThread == null ) {
            	CommonMailThread = new CommonMailThread();
            }
            CommonMailThread.doStart();
        }
    }

    public static void doStop() {
        synchronized(lock) {
            if( CommonMailThread != null ) {
            	CommonMailThread.doStop();
            	CommonMailThread = null;
            }
        }
    }

    public static boolean isRun() {
        if( CommonMailThread == null )
            return false;
        else {
            return CommonMailThread.isRun();
        }
    }  
    
    
}
