first commit
This commit is contained in:
25
src/Main.kt
25
src/Main.kt
@@ -1,5 +1,30 @@
|
||||
import ActiveMQ.ActiveMQClient
|
||||
import Other.Config
|
||||
import Web.WebUI
|
||||
import database.MySQLInjector
|
||||
import java.util.function.Consumer
|
||||
|
||||
//TIP To <b>Run</b> code, press <shortcut actionId="Run"/> or
|
||||
// click the <icon src="AllIcons.Actions.Execute"/> icon in the gutter.
|
||||
fun main() {
|
||||
val config = Config()
|
||||
config.Load()
|
||||
val webUI = WebUI(config)
|
||||
val activeclient = ActiveMQClient(
|
||||
config.ActiveMQ_BrokerURL,
|
||||
config.ActiveMQ_Username,
|
||||
config.ActiveMQ_Password,
|
||||
config.ActiveMQ_QueueName
|
||||
)
|
||||
val mysql = MySQLInjector(config)
|
||||
|
||||
activeclient.MessageConsumer = Consumer{ message ->
|
||||
|
||||
}
|
||||
|
||||
Runtime.getRuntime().addShutdownHook(Thread {
|
||||
webUI.Stop()
|
||||
activeclient.Stop()
|
||||
mysql.Stop()
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user