本文整理汇总了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");
}
示例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);
}
示例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);
}
示例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);
}
示例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");
}
示例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);
}
示例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);
}
示例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");
}