• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java JobDetailBean类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: RepoService

import org.springframework.scheduling.quartz.JobDetailBean; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public RepoService(ApplicationContext applicationContext) throws Exception
   {
   	this.applicationContext = applicationContext;
   	this.publicApiContext = new PublicApiTestContext(applicationContext);
   	this.authenticationService = (MutableAuthenticationService)applicationContext.getBean("AuthenticationService");
   	this.siteService = (SiteService)applicationContext.getBean("SiteService");
   	this.activityService = (ActivityService)applicationContext.getBean("activityService");
   	this.fileFolderService = (FileFolderService)applicationContext.getBean("FileFolderService");
   	this.contentService = (ContentService)applicationContext.getBean("ContentService");
   	this.commentService = (CommentService)applicationContext.getBean("CommentService");
   	this.nodeService = (NodeService)applicationContext.getBean("NodeService");
   	this.preferenceService = (PreferenceService)applicationContext.getBean("PreferenceService");
   	this.taggingService = (TaggingService)applicationContext.getBean("TaggingService");
   	this.ratingService = (RatingService)applicationContext.getBean("RatingService");
   	this.tenantService = (TenantService)applicationContext.getBean("tenantService");
   	this.tenantAdminService = (TenantAdminService)applicationContext.getBean("tenantAdminService");
   	this.personService = (PersonService)applicationContext.getBean("PersonService");
   	this.contentStoreCleaner = (ContentStoreCleaner)applicationContext.getBean("contentStoreCleaner");
   	this.postDAO = (ActivityPostDAO)applicationContext.getBean("postDAO");
   	this.nodeRatingSchemeRegistry = (NamedObjectRegistry<RatingScheme>)applicationContext.getBean("nodeRatingSchemeRegistry");
   	this.cociService = (CheckOutCheckInService)applicationContext.getBean("CheckoutCheckinService");
   	this.favouritesService = (FavouritesService)applicationContext.getBean("FavouritesService");
   	this.dictionaryService =  (DictionaryService)applicationContext.getBean("dictionaryService");
   	this.invitationService = (InvitationService)applicationContext.getBean("InvitationService");
   	this.lockService = (LockService)applicationContext.getBean("LockService");
   	this.cmisConnector = (CMISConnector)applicationContext.getBean("CMISConnector");
   	this.nodeIndexer = (NodeIndexer)applicationContext.getBean("nodeIndexer");
   	this.activities = (Activities)applicationContext.getBean("activities");
   	this.hiddenAspect = (HiddenAspect)applicationContext.getBean("hiddenAspect");
   	this.networksService = (NetworksService)applicationContext.getBean("networksService");
   	this.namespaceService = (NamespaceService)applicationContext.getBean("namespaceService"); 
   	this.transactionHelper = (RetryingTransactionHelper)applicationContext.getBean("retryingTransactionHelper");

       Scheduler scheduler = (Scheduler)applicationContext.getBean("schedulerFactory");
   	
   	JobDetailBean contentStoreCleanerJobDetail = (JobDetailBean)applicationContext.getBean("contentStoreCleanerJobDetail");
       scheduler.pauseJob(contentStoreCleanerJobDetail.getName(), contentStoreCleanerJobDetail.getGroup());

       ChildApplicationContextFactory activitiesFeed = (ChildApplicationContextFactory)applicationContext.getBean("ActivitiesFeed");
       ApplicationContext activitiesFeedCtx = activitiesFeed.getApplicationContext();
       this.postLookup = (PostLookup)activitiesFeedCtx.getBean("postLookup");
       this.feedGenerator = (FeedGenerator)activitiesFeedCtx.getBean("feedGenerator");
       this.feedGeneratorJobDetail = (JobDetailBean)activitiesFeedCtx.getBean("feedGeneratorJobDetail");
       this.postLookupJobDetail = (JobDetailBean)activitiesFeedCtx.getBean("postLookupJobDetail");
       this.feedCleanerJobDetail = (JobDetailBean)activitiesFeedCtx.getBean("feedCleanerJobDetail");
       this.postCleanerJobDetail = (JobDetailBean)activitiesFeedCtx.getBean("postCleanerJobDetail");
       this.feedNotifierJobDetail = (JobDetailBean)activitiesFeedCtx.getBean("feedNotifierJobDetail");
   	this.feedCleaner = (FeedCleaner)activitiesFeedCtx.getBean("feedCleaner");

       // Pause activities jobs so that we aren't competing with their scheduled versions
       scheduler.pauseJob(feedGeneratorJobDetail.getName(), feedGeneratorJobDetail.getGroup());
       scheduler.pauseJob(postLookupJobDetail.getName(), postLookupJobDetail.getGroup());
       scheduler.pauseJob(feedCleanerJobDetail.getName(), feedCleanerJobDetail.getGroup());
       scheduler.pauseJob(postCleanerJobDetail.getName(), postCleanerJobDetail.getGroup());
       scheduler.pauseJob(feedNotifierJobDetail.getName(), feedNotifierJobDetail.getGroup());

       this.systemNetwork = new TestNetwork(TenantService.DEFAULT_DOMAIN, true);
}
 
开发者ID:Alfresco,项目名称:alfresco-remote-api,代码行数:60,代码来源:RepoService.java


示例2: init

import org.springframework.scheduling.quartz.JobDetailBean; //导入依赖的package包/类
@Override
public void init(ComponentRepository repo, LinkedHashMap<String, String> configuration) throws Exception {
  
  ComponentInfo info = new ComponentInfo(JobDetail.class, getClassifier());
  
  JobDetailBean jobDetailBean = new JobDetailBean();
  jobDetailBean.setBeanName(getName());
  jobDetailBean.setJobClass(QuartzRedisHtsSnapshotJob.class);
  if (getGroup() != null) {
    jobDetailBean.setGroup(getGroup());
  }    
  final JobDataMap jobDataMap = jobDetailBean.getJobDataMap();
  jobDataMap.put("dataSource", getDataSource());
  jobDataMap.put("normalizationRuleSetId", getNormalizationRuleSetId());
  if (getDataFieldBlackList() != null) {
    jobDataMap.put("dataFieldBlackList", createBlackList(getDataFieldBlackList(), "RedisDataFieldBlackList"));
  }
  if (getSchemeBlackList() != null) {
    jobDataMap.put("schemeBlackList", createBlackList(getSchemeBlackList(), "RedisSchemeBlackList"));
  }
  jobDataMap.put("globalPrefix", getGlobalPrefix());
  jobDataMap.put("htsMaster", getHtsMaster());
  jobDataMap.put("redisConnector", getRedisConnector());
  jobDataMap.put("baseDir", getBaseDir());
  
  jobDetailBean.afterPropertiesSet();
      
  Scheduler scheduler = getScheduler();
  scheduler.addJob(jobDetailBean, true);
  
  repo.registerComponent(info, jobDetailBean);
  
}
 
开发者ID:DevStreet,项目名称:FinanceAnalytics,代码行数:34,代码来源:RedisHtsSnapshotJobDetailComponentFactory.java


示例3: registerJob

import org.springframework.scheduling.quartz.JobDetailBean; //导入依赖的package包/类
private void registerJob(final String jobName,
        final Job jobInstance, final String cronExpression)
        throws Exception {

    // 0. unregister job
    unregisterJob(jobName);

    // 1. Job bean
    getBeanFactory().registerSingleton(jobName, jobInstance);

    // 2. JobDetail bean
    JobDetail jobDetail = new JobDetailBean();
    jobDetail.setName(jobName);
    jobDetail.setGroup(Scheduler.DEFAULT_GROUP);
    jobDetail.setJobClass(jobInstance.getClass());

    // 3. Trigger
    if (cronExpression == null) {
        scheduler.getScheduler().addJob(jobDetail, true);
    } else {
        CronTriggerBean cronTrigger = new CronTriggerBean();
        cronTrigger.setName(getTriggerName(jobName));
        cronTrigger.setCronExpression(cronExpression);

        scheduler.getScheduler().scheduleJob(jobDetail, cronTrigger);
    }
}
 
开发者ID:ilgrosso,项目名称:oldSyncopeIdM,代码行数:28,代码来源:JobInstanceLoader.java


示例4: testSimpleTrigger

import org.springframework.scheduling.quartz.JobDetailBean; //导入依赖的package包/类
@Test
public void testSimpleTrigger() {
    Date start = new Date();
    JobDetailBean job = (JobDetailBean) applicationContext.getBean("schedulerTestJobSimple");
    assertNotNull(job);
    // wait until the job is executed
    try {
        Thread.sleep(5000);
    } catch (InterruptedException e) {
        e.printStackTrace();
    }
    SimpleTriggerBean trigger = (SimpleTriggerBean) applicationContext.getBean("schedulerTestJobSimpleTrigger");
    Date end = new Date();
    assertEquals(5, trigger.computeNumTimesFiredBetween(start, end));
}
 
开发者ID:huihoo,项目名称:olat,代码行数:16,代码来源:SchedulerITCase.java


示例5: setJobdetailbean

import org.springframework.scheduling.quartz.JobDetailBean; //导入依赖的package包/类
public void setJobdetailbean(JobDetailBean jobdetailbean) {
	this.jobdetailbean = jobdetailbean;
}
 
开发者ID:form4,项目名称:alfresco-triggerauthenticationsync,代码行数:4,代码来源:StartPeopleSyncWebScript.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java RedirectToUrlException类代码示例发布时间:2022-05-22
下一篇:
Java TableCell类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap