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

org.http4k.server.Jetty11Loom.kt Maven / Gradle / Ivy

There is a newer version: 5.41.0.0
Show newest version
package org.http4k.server

import org.eclipse.jetty.server.Server
import org.eclipse.jetty.util.thread.QueuedThreadPool
import org.http4k.server.ServerConfig.StopMode
import java.util.concurrent.Executors.newVirtualThreadPerTaskExecutor

fun Jetty11Loom(port: Int) = Jetty11Loom(port, defaultStopMode)

fun Jetty11Loom(port: Int, stopMode: StopMode) = Jetty11(port, stopMode,
    Server(QueuedThreadPool().apply {
        virtualThreadsExecutor = newVirtualThreadPerTaskExecutor();
    }).apply { addConnector(http(port)(this)) }
)




© 2015 - 2025 Weber Informatics LLC | Privacy Policy