All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.coreoz.plume.scheduler.SchedulerProvider Maven / Gradle / Ivy

There is a newer version: 4.2.3
Show newest version
package com.coreoz.plume.scheduler;

import javax.inject.Inject;
import javax.inject.Provider;
import javax.inject.Singleton;

import com.coreoz.plume.services.time.TimeProvider;
import com.coreoz.wisp.Scheduler;
import com.coreoz.wisp.SchedulerConfig;

@Singleton
public class SchedulerProvider implements Provider {

	private final Scheduler scheduler;

	@Inject
	public SchedulerProvider(TimeProvider timeProvider) {
		this.scheduler = new Scheduler(
			SchedulerConfig
				.builder()
				.timeProvider(new PlumeTimeProvider(timeProvider))
				.build()
		);
	}

	@Override
	public Scheduler get() {
		return scheduler;
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy