package com.xxl.job.core.handler; import com.xxl.job.core.biz.model.ReturnT; /** * job handler * * @author xuxueli 2015-12-19 19:06:38 */ public abstract class IJobHandler { /** success */ public static final ReturnT SUCCESS = new ReturnT(200, null); /** fail */ public static final ReturnT FAIL = new ReturnT(500, null); /** fail timeout */ public static final ReturnT FAIL_TIMEOUT = new ReturnT(502, null); /** * execute handler, invoked when executor receives a scheduling request * * @param param * @return * @throws Exception */ public abstract ReturnT execute(String param) throws Exception; /** * init handler, invoked when JobThread init */ public void init() { // TODO } /** * destroy handler, invoked when JobThread destroy */ public void destroy() { // TODO } }