@Test public void testJob() throws IOException, SchedulerException { initJobGlobalListener(); getJobCounter().clear(); final Scheduler scheduler = StdSchedulerFactory.getDefaultScheduler(); try { scheduler.start(); final Random random = new Random(); final JobDetail job2 = new JobDetail("job" + random.nextInt(), null, JobTestImpl.class); final SimpleTrigger trigger2 = new SimpleTrigger("trigger" + random.nextInt(), null, new Date(System.currentTimeMillis() + 60000)); trigger2.setRepeatInterval(2 * 24L * 60 * 60 * 1000); scheduler.scheduleJob(job2, trigger2); scheduler.pauseJob(job2.getName(), job2.getGroup()); try { final JobDetail job3 = new JobDetail("job" + random.nextInt(), null, JobTestImpl.class); final Trigger trigger3 = new CronTrigger("crontrigger" + random.nextInt(), null, "0 0 0 * * ? 2030"); scheduler.scheduleJob(job3, trigger3); final NthIncludedDayTrigger trigger4 = new NthIncludedDayTrigger( "nth trigger" + random.nextInt(), null); trigger4.setN(1); trigger4.setIntervalType(NthIncludedDayTrigger.INTERVAL_TYPE_YEARLY); trigger4.setJobName(job3.getName()); scheduler.scheduleJob(trigger4); } catch (final ParseException e) { throw new IllegalStateException(e); } final List<JavaInformations> javaInformationsList2 = Collections .singletonList(new JavaInformations(null, true)); final HtmlReport htmlReport = new HtmlReport(collector, null, javaInformationsList2, Period.TOUT, writer); htmlReport.toHtml(null, null); assertNotEmptyAndClear(writer); final Map<JobDetail, SimpleTrigger> triggersByJob = new LinkedHashMap<JobDetail, SimpleTrigger>(); for (int i = 0; i < 10; i++) { final JobDetail job = new JobDetail("job" + random.nextInt(), null, JobTestImpl.class); job.setDescription("description"); final SimpleTrigger trigger = new SimpleTrigger("trigger" + random.nextInt(), null, new Date()); scheduler.scheduleJob(job, trigger); triggersByJob.put(job, trigger); } try { Thread.sleep(3000); } catch (final InterruptedException e) { throw new IllegalStateException(e); } for (final Map.Entry<JobDetail, SimpleTrigger> entry : triggersByJob.entrySet()) { entry.getValue().setRepeatInterval(60000); scheduler.scheduleJob(entry.getKey(), entry.getValue()); } setProperty(Parameter.SYSTEM_ACTIONS_ENABLED, Boolean.FALSE.toString()); final List<JavaInformations> javaInformationsList3 = Collections .singletonList(new JavaInformations(null, true)); final HtmlReport htmlReport3 = new HtmlReport(collector, null, javaInformationsList3, Period.TOUT, writer); htmlReport3.toHtml(null, null); assertNotEmptyAndClear(writer); } finally { scheduler.shutdown(); getJobCounter().clear(); destroyJobGlobalListener(); } }
@Override void toHtml() throws IOException { writeHtmlHeader(); htmlCoreReport.toHtml(); writeHtmlFooter(); }
HtmlReport extends HtmlAbstractReport { @Override void toHtml() throws IOException { writeHtmlHeader(); htmlCoreReport.toHtml(); writeHtmlFooter(); } }
HtmlReport extends HtmlAbstractReport { @Override void toHtml() throws IOException { writeHtmlHeader(); htmlCoreReport.toHtml(); writeHtmlFooter(); } HtmlReport(Collector collector, CollectorServer collectorServer,
			List<JavaInformations> javaInformationsList, Range range, Writer writer);  HtmlReport(Collector collector, CollectorServer collectorServer,
			List<JavaInformations> javaInformationsList, Period period, Writer writer); }
HtmlReport extends HtmlAbstractReport { @Override void toHtml() throws IOException { writeHtmlHeader(); htmlCoreReport.toHtml(); writeHtmlFooter(); } HtmlReport(Collector collector, CollectorServer collectorServer,
			List<JavaInformations> javaInformationsList, Range range, Writer writer);  HtmlReport(Collector collector, CollectorServer collectorServer,
			List<JavaInformations> javaInformationsList, Period period, Writer writer); void toHtml(String message, String anchorNameForRedirect); void writeLastShutdown(); static void writeAddAndRemoveApplicationLinks(String currentApplication,
			Collection<String> applications, Writer writer); void writeAllCurrentRequestsAsPart(); void writeAllThreadsAsPart(); void writeThreadsDump(); void writeCounterSummaryPerClass(String counterName, String requestId); void writeSource(String className); void writeDependencies(); void writeSpringContext(); void writeHtmlHeader(); void writeHtmlFooter(); void writeMessageIfNotNull(String message, String partToRedirectTo); void writeRequestAndGraphDetail(String graphName); void writeRequestUsages(String graphName); void writeSessions(List<SessionInformations> sessionsInformations, String message,
			String sessionsPart); void writeSessionDetail(String sessionId, SessionInformations sessionInformations); void writeHotspots(List<SampledMethod> hotspots); void writeHeapHistogram(HeapHistogram heapHistogram, String message,
			String heapHistoPart); void writeProcesses(List<ProcessInformations> processInformationsList); void writeProcesses(Map<String, List<ProcessInformations>> processesByTitle); void writeDatabase(DatabaseInformations databaseInformations); void writeConnections(List<ConnectionInformations> connectionInformationsList,
			boolean withoutHeaders); void writeJndi(List<JndiBinding> jndiBindings, String path); void writeMBeans(List<MBeanNode> mbeans); void writeMBeans(Map<String, List<MBeanNode>> mbeansByTitle); void writeCacheWithKeys(String cacheId, CacheInformations cacheInformations,
			String message, String cacheKeyPart, boolean withoutHeaders); void writeJCacheWithKeys(String cacheId, JCacheInformations jcacheInformations,
			String message, String cacheKeyPart, boolean withoutHeaders); void writeCrashes(); void writeHashPassword(String algorithm, String password); }
HtmlReport extends HtmlAbstractReport { @Override void toHtml() throws IOException { writeHtmlHeader(); htmlCoreReport.toHtml(); writeHtmlFooter(); } HtmlReport(Collector collector, CollectorServer collectorServer,
			List<JavaInformations> javaInformationsList, Range range, Writer writer);  HtmlReport(Collector collector, CollectorServer collectorServer,
			List<JavaInformations> javaInformationsList, Period period, Writer writer); void toHtml(String message, String anchorNameForRedirect); void writeLastShutdown(); static void writeAddAndRemoveApplicationLinks(String currentApplication,
			Collection<String> applications, Writer writer); void writeAllCurrentRequestsAsPart(); void writeAllThreadsAsPart(); void writeThreadsDump(); void writeCounterSummaryPerClass(String counterName, String requestId); void writeSource(String className); void writeDependencies(); void writeSpringContext(); void writeHtmlHeader(); void writeHtmlFooter(); void writeMessageIfNotNull(String message, String partToRedirectTo); void writeRequestAndGraphDetail(String graphName); void writeRequestUsages(String graphName); void writeSessions(List<SessionInformations> sessionsInformations, String message,
			String sessionsPart); void writeSessionDetail(String sessionId, SessionInformations sessionInformations); void writeHotspots(List<SampledMethod> hotspots); void writeHeapHistogram(HeapHistogram heapHistogram, String message,
			String heapHistoPart); void writeProcesses(List<ProcessInformations> processInformationsList); void writeProcesses(Map<String, List<ProcessInformations>> processesByTitle); void writeDatabase(DatabaseInformations databaseInformations); void writeConnections(List<ConnectionInformations> connectionInformationsList,
			boolean withoutHeaders); void writeJndi(List<JndiBinding> jndiBindings, String path); void writeMBeans(List<MBeanNode> mbeans); void writeMBeans(Map<String, List<MBeanNode>> mbeansByTitle); void writeCacheWithKeys(String cacheId, CacheInformations cacheInformations,
			String message, String cacheKeyPart, boolean withoutHeaders); void writeJCacheWithKeys(String cacheId, JCacheInformations jcacheInformations,
			String message, String cacheKeyPart, boolean withoutHeaders); void writeCrashes(); void writeHashPassword(String algorithm, String password);  }