当前位置: 首页>>代码示例>>Java>>正文


Java MessageServiceExecutorJob类代码示例

本文整理汇总了Java中org.kuali.rice.ksb.messaging.quartz.MessageServiceExecutorJob的典型用法代码示例。如果您正苦于以下问题:Java MessageServiceExecutorJob类的具体用法?Java MessageServiceExecutorJob怎么用?Java MessageServiceExecutorJob使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


MessageServiceExecutorJob类属于org.kuali.rice.ksb.messaging.quartz包,在下文中一共展示了MessageServiceExecutorJob类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: moveToRouteQueue

import org.kuali.rice.ksb.messaging.quartz.MessageServiceExecutorJob; //导入依赖的package包/类
public ActionForward moveToRouteQueue(ActionMapping mapping, ActionForm form, HttpServletRequest request,
    HttpServletResponse response) throws Exception {

QuartzQueueForm quartzForm = (QuartzQueueForm)form;

JobDetail job = KSBServiceLocator.getScheduler().getJobDetail(quartzForm.getJobName(), quartzForm.getJobGroup());
PersistedMessageBO message = (PersistedMessageBO)job.getJobDataMap().get(MessageServiceExecutorJob.MESSAGE_KEY);
    if(message != null){
    message.setQueueStatus(KSBConstants.ROUTE_QUEUE_EXCEPTION);

       message = KSBServiceLocator.getMessageQueueService().save(message);
       KSBServiceLocator.getScheduler().deleteJob(quartzForm.getJobName(), quartzForm.getJobGroup());
    }
   request.setAttribute(RENDER_LIST_OVERRIDE, new Object());
   establishRequiredState(request, form);
return mapping.findForward("joblisting");
   }
 
开发者ID:kuali,项目名称:kc-rice,代码行数:18,代码来源:QuartzQueueAction.java

示例2: scheduleExecution

import org.kuali.rice.ksb.messaging.quartz.MessageServiceExecutorJob; //导入依赖的package包/类
public void scheduleExecution(Throwable throwable, PersistedMessageBO message, String description) throws Exception {
	KSBServiceLocator.getMessageQueueService().delete(message);
       PersistedMessageBO messageCopy = message.copy();
	Scheduler scheduler = KSBServiceLocator.getScheduler();
	JobDataMap jobData = new JobDataMap();
	jobData.put(MessageServiceExecutorJob.MESSAGE_KEY, messageCopy);
	JobDetail jobDetail = new JobDetail("Exception_Message_Job " + Math.random(), "Exception Messaging",
		MessageServiceExecutorJob.class);
	jobDetail.setJobDataMap(jobData);
	if (!StringUtils.isBlank(description)) {
	    jobDetail.setDescription(description);
	}
	jobDetail.addJobListener(MessageServiceExecutorJobListener.NAME);
	Trigger trigger = new SimpleTrigger("Exception_Message_Trigger " + Math.random(), "Exception Messaging", messageCopy
		.getQueueDate());
	trigger.setJobDataMap(jobData);// 1.6 bug required or derby will choke
	scheduler.scheduleJob(jobDetail, trigger);    
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:19,代码来源:DefaultExceptionServiceImpl.java

示例3: scheduleMessage

import org.kuali.rice.ksb.messaging.quartz.MessageServiceExecutorJob; //导入依赖的package包/类
protected void scheduleMessage(PersistedMessageBO message) throws SchedulerException {
 LOG.debug("Scheduling execution of a delayed asynchronous message.");
 Scheduler scheduler = KSBServiceLocator.getScheduler();
 JobDataMap jobData = new JobDataMap();
 jobData.put(MessageServiceExecutorJob.MESSAGE_KEY, message);

    JobDetailImpl jobDetail = new JobDetailImpl("Delayed_Asynchronous_Call-" + Math.random(), "Delayed_Asynchronous_Call",
  MessageServiceExecutorJob.class);
 jobDetail.setJobDataMap(jobData);

    scheduler.getListenerManager().addJobListener( new MessageServiceExecutorJobListener());

    SimpleTriggerImpl trigger = new SimpleTriggerImpl("Delayed_Asynchronous_Call_Trigger-" + Math.random(),
  "Delayed_Asynchronous_Call", message.getQueueDate());

    trigger.setJobDataMap(jobData);// 1.6 bug required or derby will choke
 scheduler.scheduleJob(jobDetail, trigger);
}
 
开发者ID:kuali,项目名称:rice,代码行数:19,代码来源:DelayedAsynchronousServiceCallProxy.java

示例4: scheduleExecution

import org.kuali.rice.ksb.messaging.quartz.MessageServiceExecutorJob; //导入依赖的package包/类
public void scheduleExecution(Throwable throwable, PersistedMessageBO message, String description) throws Exception {
	KSBServiceLocator.getMessageQueueService().delete(message);
       PersistedMessageBO messageCopy = message.copy();
	Scheduler scheduler = KSBServiceLocator.getScheduler();
	JobDataMap jobData = new JobDataMap();
	jobData.put(MessageServiceExecutorJob.MESSAGE_KEY, messageCopy);
	JobDetailImpl jobDetail = new JobDetailImpl("Exception_Message_Job " + Math.random(), "Exception Messaging",
		MessageServiceExecutorJob.class);
	jobDetail.setJobDataMap(jobData);

       if (!StringUtils.isBlank(description)) {
	    jobDetail.setDescription(description);
	}

       scheduler.getListenerManager().addJobListener( new MessageServiceExecutorJobListener());

       SimpleTriggerImpl trigger = new SimpleTriggerImpl("Exception_Message_Trigger " + Math.random(), "Exception Messaging", messageCopy
		.getQueueDate());
	trigger.setJobDataMap(jobData);// 1.6 bug required or derby will choke

       scheduler.scheduleJob(jobDetail, trigger);
}
 
开发者ID:kuali,项目名称:rice,代码行数:23,代码来源:DefaultExceptionServiceImpl.java

示例5: moveToRouteQueue

import org.kuali.rice.ksb.messaging.quartz.MessageServiceExecutorJob; //导入依赖的package包/类
public ActionForward moveToRouteQueue(ActionMapping mapping, ActionForm form, HttpServletRequest request,
    HttpServletResponse response) throws Exception {

QuartzQueueForm quartzForm = (QuartzQueueForm)form;

JobDetail job = KSBServiceLocator.getScheduler().getJobDetail(quartzForm.getJobName(), quartzForm.getJobGroup());
PersistedMessageBO message = (PersistedMessageBO)job.getJobDataMap().get(MessageServiceExecutorJob.MESSAGE_KEY);
    if(message != null){
    message.setQueueStatus(KSBConstants.ROUTE_QUEUE_EXCEPTION);

       KSBServiceLocator.getMessageQueueService().save(message);
       KSBServiceLocator.getScheduler().deleteJob(quartzForm.getJobName(), quartzForm.getJobGroup());
    }
   request.setAttribute(RENDER_LIST_OVERRIDE, new Object());
   establishRequiredState(request, form);
return mapping.findForward("joblisting");
   }
 
开发者ID:aapotts,项目名称:kuali_rice,代码行数:18,代码来源:QuartzQueueAction.java

示例6: scheduleExecution

import org.kuali.rice.ksb.messaging.quartz.MessageServiceExecutorJob; //导入依赖的package包/类
public void scheduleExecution(Throwable throwable, PersistedMessageBO message, String description) throws Exception {
	KSBServiceLocator.getMessageQueueService().delete(message);
	Scheduler scheduler = KSBServiceLocator.getScheduler();
	JobDataMap jobData = new JobDataMap();
	jobData.put(MessageServiceExecutorJob.MESSAGE_KEY, message);
	JobDetail jobDetail = new JobDetail("Exception_Message_Job " + Math.random(), "Exception Messaging",
		MessageServiceExecutorJob.class);
	jobDetail.setJobDataMap(jobData);
	if (!StringUtils.isBlank(description)) {
	    jobDetail.setDescription(description);
	}
	jobDetail.addJobListener(MessageServiceExecutorJobListener.NAME);
	Trigger trigger = new SimpleTrigger("Exception_Message_Trigger " + Math.random(), "Exception Messaging", message
		.getQueueDate());
	trigger.setJobDataMap(jobData);// 1.6 bug required or derby will choke
	scheduler.scheduleJob(jobDetail, trigger);    
}
 
开发者ID:aapotts,项目名称:kuali_rice,代码行数:18,代码来源:DefaultExceptionServiceImpl.java

示例7: scheduleMessage

import org.kuali.rice.ksb.messaging.quartz.MessageServiceExecutorJob; //导入依赖的package包/类
protected void scheduleMessage(PersistedMessageBO message) throws SchedulerException {
LOG.debug("Scheduling execution of a delayed asynchronous message.");
Scheduler scheduler = KSBServiceLocator.getScheduler();
JobDataMap jobData = new JobDataMap();
jobData.put(MessageServiceExecutorJob.MESSAGE_KEY, message);
JobDetail jobDetail = new JobDetail("Delayed_Asynchronous_Call-" + Math.random(), "Delayed_Asynchronous_Call",
	MessageServiceExecutorJob.class);
jobDetail.setJobDataMap(jobData);
jobDetail.addJobListener(MessageServiceExecutorJobListener.NAME);
Trigger trigger = new SimpleTrigger("Delayed_Asynchronous_Call_Trigger-" + Math.random(),
	"Delayed_Asynchronous_Call", message.getQueueDate());
trigger.setJobDataMap(jobData);// 1.6 bug required or derby will choke
scheduler.scheduleJob(jobDetail, trigger);
   }
 
开发者ID:kuali,项目名称:kc-rice,代码行数:15,代码来源:DelayedAsynchronousServiceCallProxy.java

示例8: moveToRouteQueue

import org.kuali.rice.ksb.messaging.quartz.MessageServiceExecutorJob; //导入依赖的package包/类
public ActionForward moveToRouteQueue(ActionMapping mapping, ActionForm form, HttpServletRequest request,
 HttpServletResponse response) throws Exception {
	
    QuartzQueueForm quartzForm = (QuartzQueueForm)form;

    JobKey jobKey = new JobKey(quartzForm.getJobName(), quartzForm.getJobGroup());
    JobDetail job = KSBServiceLocator.getScheduler().getJobDetail(jobKey);

    PersistedMessageBO message = (PersistedMessageBO)job.getJobDataMap().get(MessageServiceExecutorJob.MESSAGE_KEY);

    if(message != null){
        message.setQueueStatus(KSBConstants.ROUTE_QUEUE_EXCEPTION);

        message = KSBServiceLocator.getMessageQueueService().save(message);
        KSBServiceLocator.getScheduler().deleteJob(jobKey);
    }

    request.setAttribute(RENDER_LIST_OVERRIDE, new Object());
    establishRequiredState(request, form);

    return mapping.findForward("joblisting");
}
 
开发者ID:kuali,项目名称:rice,代码行数:23,代码来源:QuartzQueueAction.java


注:本文中的org.kuali.rice.ksb.messaging.quartz.MessageServiceExecutorJob类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。