Search in sources :

Example 1 with MessageSenderJobFactory

use of com.swiftmq.impl.scheduler.standard.job.MessageSenderJobFactory in project swiftmq-ce by iitsoftware.

the class SchedulerSwiftletImpl method startup.

protected void startup(Configuration config) throws SwiftletException {
    try {
        ctx = new SwiftletContext(this, config);
    } catch (Exception e) {
        throw new SwiftletException(e.toString());
    }
    if (ctx.traceSpace.enabled)
        ctx.traceSpace.trace(getName(), "startup ...");
    ctx.scheduler = new Scheduler(ctx);
    createCalendarAdapter((EntityList) ctx.root.getEntity("calendars"));
    createScheduleAdapter((EntityList) ctx.root.getEntity("schedules"));
    myJobGroup = getJobGroup(SwiftletContext.JOBGROUP);
    JobFactory jf = new MessageSenderJobFactory(ctx);
    myJobGroup.addJobFactory(jf.getName(), jf);
    if (ctx.traceSpace.enabled)
        ctx.traceSpace.trace(getName(), "startup done");
}
Also used : JobFactory(com.swiftmq.swiftlet.scheduler.JobFactory) MessageSenderJobFactory(com.swiftmq.impl.scheduler.standard.job.MessageSenderJobFactory) SwiftletException(com.swiftmq.swiftlet.SwiftletException) MessageSenderJobFactory(com.swiftmq.impl.scheduler.standard.job.MessageSenderJobFactory) SwiftletException(com.swiftmq.swiftlet.SwiftletException) InvalidScheduleException(com.swiftmq.swiftlet.scheduler.InvalidScheduleException)

Aggregations

MessageSenderJobFactory (com.swiftmq.impl.scheduler.standard.job.MessageSenderJobFactory)1 SwiftletException (com.swiftmq.swiftlet.SwiftletException)1 InvalidScheduleException (com.swiftmq.swiftlet.scheduler.InvalidScheduleException)1 JobFactory (com.swiftmq.swiftlet.scheduler.JobFactory)1