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

jvmMain.it.unibo.alchemist.boundary.webui.server.modules.RoutingModule.kt Maven / Gradle / Ivy

Go to download

Alchemist module that starts a web server and allows to visualize an environment on a web browser.

There is a newer version: 35.0.3
Show newest version
/*
 * Copyright (C) 2010-2023, Danilo Pianini and contributors
 * listed, for each module, in the respective subproject's build.gradle.kts file.
 *
 * This file is part of Alchemist, and is distributed under the terms of the
 * GNU General Public License, with a linking exception,
 * as described in the file LICENSE in the Alchemist distribution's top directory.
 */

package it.unibo.alchemist.boundary.webui.server.modules

import io.ktor.server.application.Application
import io.ktor.server.routing.routing
import it.unibo.alchemist.boundary.webui.server.routes.EnvironmentRoute.environmentClientMode
import it.unibo.alchemist.boundary.webui.server.routes.EnvironmentRoute.environmentServerMode
import it.unibo.alchemist.boundary.webui.server.routes.SimulationRoute.simulationActionPause
import it.unibo.alchemist.boundary.webui.server.routes.SimulationRoute.simulationActionPlay
import it.unibo.alchemist.boundary.webui.server.routes.SimulationRoute.simulationStatus
import it.unibo.alchemist.boundary.webui.server.routes.mainRoute

/**
 * Ktor module that adds all the routing configuration to an application.
 * @see Ktor Modules
 */
fun Application.routingModule() {
    routing {
        mainRoute()
        simulationStatus()
        simulationActionPlay()
        simulationActionPause()
        environmentServerMode()
        environmentClientMode()
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy