11/15/2013
2:49:00 PM 0

Method Chaining

Method Chaining 是一種API的設計方式,讓開法者可以直覺性思考並更方便使用所設計的功能,jQuery 裡就大量地使用這樣的設計

而 Quartz 2.x 版之後就改用 method chaining 的設計方式
以下為 Quartz 2.2 的簡易使用範例, 設計API的方式可作為程式寫作參考
JobDetail job = JobBuilder.newJob(Class.forName("MyJob").asSubclass(Job.class))
    .withIdentity("JobName", "JobGroup")
    .build();

TriggerKey triggerKey = TriggerKey.triggerKey("TriggerName", "TriggerGroup");

CronTrigger trigger = TriggerBuilder.newTrigger()
    .withIdentity(triggerKey)
    .withSchedule(CronScheduleBuilder.cronSchedule("0/20 * * * * ?"))
    .build();

Scheduler sched = new StdSchedulerFactory().getScheduler();
sched.scheduleJob(job, trigger);

sched.start();//scheduler start

sched.unscheduleJob(triggerKey);//unschedule Job

sched.shutdown(true);//shutdown the scheduler
11/12/2013
4:00:00 PM 0

Integrate the Jad Decompiler Plug-in into Eclipse

1.Download Jad
http://www.kpdus.com/jad.html

2.Download Jad Eclipse plugin
http://sourceforge.net/projects/jadclipse

3.Copy plugin file to Eclipse plugin folder
net.sf.jadclipse_X.X.X.jar to eclipse\plugins folder

4.Restart Eclipse

5.Configure Eclipse















6.Set File Associations