io.ably.lib.network.OkHttpEngineFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of network-client-okhttp Show documentation
Show all versions of network-client-okhttp Show documentation
Default implementation for HTTP client
package io.ably.lib.network;
import okhttp3.OkHttpClient;
public class OkHttpEngineFactory implements HttpEngineFactory {
@Override
public HttpEngine create(HttpEngineConfig config) {
OkHttpClient.Builder connectionBuilder = new OkHttpClient.Builder();
OkHttpUtils.injectProxySetting(config.getProxy(), connectionBuilder);
return new OkHttpEngine(connectionBuilder.build(), config);
}
@Override
public EngineType getEngineType() {
return EngineType.OKHTTP;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy