gecko.builder.GeckoBuilder.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gecko-core Show documentation
Show all versions of gecko-core Show documentation
Full network logging allowing users to browse entire calls via simple urls and more.
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