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

gecko.builder.GeckoBuilder.kt Maven / Gradle / Ivy

Go to download

Full network logging allowing users to browse entire calls via simple urls and more.

There is a newer version: 0.0.6
Show newest version
package gecko.builder

import gecko.*

@PublishedApi
internal class GeckoBuilder : GeckoConfiguration {

    override var domain: String = "diareuse.github.io/gecko"
    override lateinit var encoder: Base64Encoder
    override lateinit var adapter: MetadataAdapter
    override lateinit var logger: Logger
    private val wrappers = mutableListOf()

    override fun addStep(wrapper: GeckoWrapper) {
        wrappers += wrapper
    }

    fun build(): Gecko {
        var gecko: Gecko
        gecko = GeckoFormatter(adapter)
        gecko = GeckoCompressor(gecko)
        gecko = GeckoBase64Wrapper(gecko, encoder)
        gecko = GeckoUrlAssembly(gecko, domain)
        gecko = GeckoLogging(gecko, logger)
        for (wrapper in wrappers)
            gecko = wrapper.wrap(gecko)
        return gecko
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy