當前位置: 首頁>>代碼示例>>Java>>正文


Java Trigger.getName方法代碼示例

本文整理匯總了Java中org.quartz.Trigger.getName方法的典型用法代碼示例。如果您正苦於以下問題:Java Trigger.getName方法的具體用法?Java Trigger.getName怎麽用?Java Trigger.getName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.quartz.Trigger的用法示例。


在下文中一共展示了Trigger.getName方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: jobToBeExecuted

import org.quartz.Trigger; //導入方法依賴的package包/類
/** 
 * @see org.quartz.JobListener#jobToBeExecuted(JobExecutionContext)
 */
public void jobToBeExecuted(JobExecutionContext context) {
    if (!getLog().isInfoEnabled()) {
        return;
    } 
    
    Trigger trigger = context.getTrigger();

    Object[] args = {
        context.getJobDetail().getName(),
        context.getJobDetail().getGroup(), new java.util.Date(),
        trigger.getName(), trigger.getGroup(),
        trigger.getPreviousFireTime(), trigger.getNextFireTime(),
        new Integer(context.getRefireCount())
    };

    getLog().info(MessageFormat.format(getJobToBeFiredMessage(), args));
}
 
開發者ID:AsuraTeam,項目名稱:asura,代碼行數:21,代碼來源:LoggingJobHistoryPlugin.java

示例2: jobExecutionVetoed

import org.quartz.Trigger; //導入方法依賴的package包/類
/** 
 * @see org.quartz.JobListener#jobExecutionVetoed(org.quartz.JobExecutionContext)
 */
public void jobExecutionVetoed(JobExecutionContext context) {
    
    if (!getLog().isInfoEnabled()) {
        return;
    } 
    
    Trigger trigger = context.getTrigger();

    Object[] args = {
        context.getJobDetail().getName(),
        context.getJobDetail().getGroup(), new java.util.Date(),
        trigger.getName(), trigger.getGroup(),
        trigger.getPreviousFireTime(), trigger.getNextFireTime(),
        new Integer(context.getRefireCount())
    };

    getLog().info(MessageFormat.format(getJobWasVetoedMessage(), args));
}
 
開發者ID:AsuraTeam,項目名稱:asura,代碼行數:22,代碼來源:LoggingJobHistoryPlugin.java

示例3: toCompositeData

import org.quartz.Trigger; //導入方法依賴的package包/類
public static CompositeData toCompositeData(Trigger trigger) {
	try {
		return new CompositeDataSupport(COMPOSITE_TYPE, ITEM_NAMES,
				new Object[] {
						trigger.getName(),
						trigger.getGroup(),
						trigger.getJobName(),
						trigger.getJobGroup(),
						trigger.getDescription(),
						JobDataMapSupport.toTabularData(trigger
								.getJobDataMap()), trigger.isVolatile(),
						trigger.getCalendarName(),
						trigger.getFireInstanceId(),
						trigger.getMisfireInstruction(),
						trigger.getPriority(), trigger.getStartTime(),
						trigger.getEndTime(), trigger.getNextFireTime(),
						trigger.getPreviousFireTime(),
						trigger.getFinalFireTime() });
	} catch (OpenDataException e) {
		throw new RuntimeException(e);
	}
}
 
開發者ID:AsuraTeam,項目名稱:asura,代碼行數:23,代碼來源:TriggerSupport.java

示例4: jobWasExecuted

import org.quartz.Trigger; //導入方法依賴的package包/類
/** 
 * @see org.quartz.JobListener#jobWasExecuted(JobExecutionContext, JobExecutionException)
 */
public void jobWasExecuted(JobExecutionContext context,
        JobExecutionException jobException) {

    Trigger trigger = context.getTrigger();
    
    Object[] args = null;
    
    if (jobException != null) {
        if (!getLog().isWarnEnabled()) {
            return;
        } 
        
        String errMsg = jobException.getMessage();
        args = 
            new Object[] {
                context.getJobDetail().getName(),
                context.getJobDetail().getGroup(), new java.util.Date(),
                trigger.getName(), trigger.getGroup(),
                trigger.getPreviousFireTime(), trigger.getNextFireTime(),
                new Integer(context.getRefireCount()), errMsg
            };
        
        getLog().warn(MessageFormat.format(getJobFailedMessage(), args), jobException); 
    } else {
        if (!getLog().isInfoEnabled()) {
            return;
        } 
        
        String result = String.valueOf(context.getResult());
        args =
            new Object[] {
                context.getJobDetail().getName(),
                context.getJobDetail().getGroup(), new java.util.Date(),
                trigger.getName(), trigger.getGroup(),
                trigger.getPreviousFireTime(), trigger.getNextFireTime(),
                new Integer(context.getRefireCount()), result
            };
        
        getLog().info(MessageFormat.format(getJobSuccessMessage(), args));
    }
}
 
開發者ID:AsuraTeam,項目名稱:asura,代碼行數:45,代碼來源:LoggingJobHistoryPlugin.java

示例5: triggerComplete

import org.quartz.Trigger; //導入方法依賴的package包/類
public void triggerComplete(Trigger trigger, JobExecutionContext context,
        int triggerInstructionCode) {
    if (!getLog().isInfoEnabled()) {
        return;
    } 
    
    String instrCode = "UNKNOWN";
    if (triggerInstructionCode == Trigger.INSTRUCTION_DELETE_TRIGGER) {
        instrCode = "DELETE TRIGGER";
    } else if (triggerInstructionCode == Trigger.INSTRUCTION_NOOP) {
        instrCode = "DO NOTHING";
    } else if (triggerInstructionCode == Trigger.INSTRUCTION_RE_EXECUTE_JOB) {
        instrCode = "RE-EXECUTE JOB";
    } else if (triggerInstructionCode == Trigger.INSTRUCTION_SET_ALL_JOB_TRIGGERS_COMPLETE) {
        instrCode = "SET ALL OF JOB'S TRIGGERS COMPLETE";
    } else if (triggerInstructionCode == Trigger.INSTRUCTION_SET_TRIGGER_COMPLETE) {
        instrCode = "SET THIS TRIGGER COMPLETE";
    }

    Object[] args = {
        trigger.getName(), trigger.getGroup(),
        trigger.getPreviousFireTime(), trigger.getNextFireTime(),
        new java.util.Date(), context.getJobDetail().getName(),
        context.getJobDetail().getGroup(),
        new Integer(context.getRefireCount()),
        new Integer(triggerInstructionCode), instrCode
    };

    getLog().info(MessageFormat.format(getTriggerCompleteMessage(), args));
}
 
開發者ID:AsuraTeam,項目名稱:asura,代碼行數:31,代碼來源:LoggingTriggerHistoryPlugin.java

示例6: getTriggerNameKey

import org.quartz.Trigger; //導入方法依賴的package包/類
static String getTriggerNameKey(Trigger trigger) {
    return trigger.getGroup() + "_$x$x$_" + trigger.getName();
}
 
開發者ID:AsuraTeam,項目名稱:asura,代碼行數:4,代碼來源:RAMJobStore.java

示例7: triggerFired

import org.quartz.Trigger; //導入方法依賴的package包/類
public void triggerFired(Trigger trigger, JobExecutionContext context) {
    if (!getLog().isInfoEnabled()) {
        return;
    } 
    
    Object[] args = {
        trigger.getName(), trigger.getGroup(),
        trigger.getPreviousFireTime(), trigger.getNextFireTime(),
        new java.util.Date(), context.getJobDetail().getName(),
        context.getJobDetail().getGroup(),
        new Integer(context.getRefireCount())
    };

    getLog().info(MessageFormat.format(getTriggerFiredMessage(), args));
}
 
開發者ID:AsuraTeam,項目名稱:asura,代碼行數:16,代碼來源:LoggingTriggerHistoryPlugin.java

示例8: triggerMisfired

import org.quartz.Trigger; //導入方法依賴的package包/類
public void triggerMisfired(Trigger trigger) {
    if (!getLog().isInfoEnabled()) {
        return;
    } 
    
    Object[] args = {
        trigger.getName(), trigger.getGroup(),
        trigger.getPreviousFireTime(), trigger.getNextFireTime(),
        new java.util.Date(), trigger.getJobName(),
        trigger.getJobGroup()
    };

    getLog().info(MessageFormat.format(getTriggerMisfiredMessage(), args));
}
 
開發者ID:AsuraTeam,項目名稱:asura,代碼行數:15,代碼來源:LoggingTriggerHistoryPlugin.java


注:本文中的org.quartz.Trigger.getName方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。