Search in sources :

Example 1 with HolidayCalendar

use of org.quartz.impl.calendar.HolidayCalendar in project camel by apache.

the class QuartzCustomCalendarFireTest method createRegistry.

@Override
protected JndiRegistry createRegistry() throws Exception {
    JndiRegistry jndi = super.createRegistry();
    HolidayCalendar cal = new HolidayCalendar();
    java.util.Calendar tomorrow = java.util.Calendar.getInstance();
    tomorrow.setTime(new Date());
    tomorrow.add(java.util.Calendar.DAY_OF_MONTH, 1);
    cal.addExcludedDate(tomorrow.getTime());
    jndi.bind("calendar", cal);
    return jndi;
}
Also used : JndiRegistry(org.apache.camel.impl.JndiRegistry) HolidayCalendar(org.quartz.impl.calendar.HolidayCalendar) Date(java.util.Date)

Example 2 with HolidayCalendar

use of org.quartz.impl.calendar.HolidayCalendar in project camel by apache.

the class QuartzCustomCalendarNoFireTest method createRegistry.

@Override
protected JndiRegistry createRegistry() throws Exception {
    JndiRegistry jndi = super.createRegistry();
    HolidayCalendar cal = new HolidayCalendar();
    cal.addExcludedDate(new Date());
    jndi.bind("calendar", cal);
    return jndi;
}
Also used : JndiRegistry(org.apache.camel.impl.JndiRegistry) HolidayCalendar(org.quartz.impl.calendar.HolidayCalendar) Date(java.util.Date)

Aggregations

Date (java.util.Date)2 JndiRegistry (org.apache.camel.impl.JndiRegistry)2 HolidayCalendar (org.quartz.impl.calendar.HolidayCalendar)2