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

io.edurt.datacap.scheduler.ScheduleManager.kt Maven / Gradle / Ivy

There is a newer version: 2024.4.0
Show newest version
package io.edurt.datacap.scheduler

import com.google.inject.AbstractModule
import org.slf4j.LoggerFactory
import java.time.LocalTime
import java.util.*


class ScheduleManager : AbstractModule {
    private val log = LoggerFactory.getLogger(this.javaClass)
    private var externalModules: Iterable? = null

    constructor() {
        this.externalModules = ServiceLoader.load(SchedulerModule::class.java)
    }

    override fun configure() {
        log.info("================ Scheduler started ================")
        externalModules !!.forEach { module ->
            log.info("Install scheduler [ {} ] Join time [ {} ]", module.name(), LocalTime.now())
            this.install(module)
        }
        log.info("================ Scheduler end ================")
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy