????3??boolean isDone()???????????????? true??????????????????????????????????

????4??get()?????????????????????????????????????

????5??get(long timeout??TimeUnit unit)?????????????????????????????????????????????????????????????δ???????????? TimeoutException??

????FutureTask ?????? Runnable ??????????????????????У??????????????????????е??????????????FutureTask ???????????????????????????????????????????????????????????????????????? get(long timeout??TimeUnit unit) ?????????ó????????????????????????????????????? FutureTask ?????????佻???????????У????????????е??? get(long timeout??TimeUnit unit) ?????????????????????????????????????????????????????????? FutureTask ??????get ????????? TimeoutException???????????????????????? FutureTask ???г??????????????????????????????????У???? FutureTask ????????????ɡ???????????????????????????????????????????ο????????С?

??????????????

???????? FutureTask ??????????? callable ??????????? call() ?????е??????? FutureTask ?????????????????????????????????????????????????£?

?????嵥 1. Call ????

FutureTask<String> future =
    new FutureTask<String>(new Callable<String>()
{
    public String call() {
    ecmui.factory.Application.login(commonXML.getWPURL()??
    commonXML.getAE_Admin()??commonXML.getCommonUserPW());
     SitePreferences sp = new SitePreferences();
     sp.general().setFileTrackingEnable("Yes");
     sp.appbcs().setDefaultETShowing("Yes");
     sp.set();
    return "";

}});

???????? call() ?????е????????? IE ????????ò????????????????滻???????????????????????????????????????????? FutureTask?????????£?

?????嵥 2. ???????? FutureTask

try
    {
     ExecutorService executor = Executors.newSingleThreadExecutor();
     executor.execute(future);
     String result=future.get(1000*60*3?? TimeUnit.MILLISECONDS);
    }catch(TimeoutException e)
    {
        future.cancel(true);
        System.out.println(e.toString()+":start workplaceXT again");
        Application.killAppProcess("IEXPLORE");
        sleep(10);
                    }