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

jvmAndNixMain.io.ktor.server.sessions.SessionProvider.kt Maven / Gradle / Ivy

Go to download

Ktor is a framework for quickly creating web applications in Kotlin with minimal effort.

There is a newer version: 3.0.0-rc-1
Show newest version
/*
 * Copyright 2014-2019 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
 */

package io.ktor.server.sessions

import kotlin.reflect.*

/**
 * Specifies a provider for a session with the specific [name] and [type].
 *
 * @param transport specifies the [SessionTransport] for this provider
 * @param tracker specifies the [SessionTracker] for this provider
 * @property name session name
 * @property type session instance type
 */
public class SessionProvider(
    public val name: String,
    public val type: KClass,
    public val transport: SessionTransport,
    public val tracker: SessionTracker
) {
    override fun toString(): String {
        return "SessionProvider(name = $name, type = $type, transport = $transport, tracker = $tracker)"
    }
}