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

net.niebes.retrofit.metrics.MeasuredCallAdapter.kt Maven / Gradle / Ivy

The newest version!
package net.niebes.retrofit.metrics

import retrofit2.Call
import retrofit2.CallAdapter
import java.lang.reflect.Type

class MeasuredCallAdapter internal constructor(
    private val nextCallAdapter: CallAdapter,
    private val metricsCollector: RetrofitCallMetricsCollector,
) : CallAdapter {

    override fun responseType(): Type = nextCallAdapter.responseType()
    override fun adapt(call: Call): TargetType = nextCallAdapter.adapt(
        MeasuredCall(
            call,
            metricsCollector
        )
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy