- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 20 for extends (0.21 sec)
-
docs/features/events.md
Here’s a [sample event listener](https://github.com/square/okhttp/blob/master/samples/guide/src/main/java/okhttp3/recipes/PrintEventsNonConcurrent.java) that prints each event with a timestamp. ```java class PrintingEventListener extends EventListener { private long callStartNanos; private void printEvent(String name) { long nowNanos = System.nanoTime(); if (name.equals("callStart")) { callStartNanos = nowNanos; }
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sun Feb 06 02:19:09 GMT 2022 - 7.7K bytes - Viewed (0) -
samples/unixdomainsockets/src/main/java/okhttp3/unixdomainsockets/UnixDomainSocketFactory.java
import java.net.Socket; import javax.net.SocketFactory; import jnr.unixsocket.UnixSocketChannel; /** Impersonate TCP-style SocketFactory over UNIX domain sockets. */ public final class UnixDomainSocketFactory extends SocketFactory { private final File path; public UnixDomainSocketFactory(File path) { this.path = path; } @Override public Socket createSocket() throws IOException {
Java - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sun Dec 03 21:33:52 GMT 2023 - 2.1K bytes - Viewed (0) -
samples/static-server/src/main/java/okhttp3/sample/SampleServer.java
import okhttp3.mockwebserver.MockResponse; import okhttp3.mockwebserver.MockWebServer; import okhttp3.mockwebserver.RecordedRequest; import okio.Buffer; import okio.Okio; public class SampleServer extends Dispatcher { private final SSLContext sslContext; private final String root; private final int port; public SampleServer(SSLContext sslContext, String root, int port) { this.sslContext = sslContext;
Java - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Wed Jan 02 02:50:44 GMT 2019 - 4.7K bytes - Viewed (0) -
okhttp-brotli/src/main/kotlin/okhttp3/brotli/internal/DecompressionBombChecker.kt
if (outputByteCount > inputByteCount * maxRatio) { throw IOException( "decompression bomb? outputByteCount=$outputByteCount, " + "inputByteCount=$inputByteCount exceeds max ratio of $maxRatio", ) } } return result } } }
Plain Text - Registered: Fri Mar 29 11:42:11 GMT 2024 - Last Modified: Mon Jan 29 22:50:20 GMT 2024 - 1.8K bytes - Viewed (0) -
samples/unixdomainsockets/src/main/java/okhttp3/unixdomainsockets/UnixDomainServerSocketFactory.java
import jnr.unixsocket.UnixSocketAddress; import jnr.unixsocket.UnixSocketChannel; /** Impersonate TCP-style ServerSocketFactory over UNIX domain sockets. */ public final class UnixDomainServerSocketFactory extends ServerSocketFactory { private final File path; public UnixDomainServerSocketFactory(File path) { this.path = path; } @Override public ServerSocket createServerSocket() throws IOException {
Java - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Tue Feb 12 16:33:52 GMT 2019 - 3.1K bytes - Viewed (0) -
okhttp-tls/src/main/kotlin/okhttp3/tls/internal/InsecureAndroidTrustManager.kt
import java.lang.reflect.Method import java.security.cert.Certificate import java.security.cert.CertificateException import java.security.cert.X509Certificate import javax.net.ssl.X509TrustManager /** This extends [X509TrustManager] for Android to disable verification for a set of hosts. */ internal class InsecureAndroidTrustManager( private val delegate: X509TrustManager, private val insecureHosts: List<String>, ) : X509TrustManager {
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 2.4K bytes - Viewed (0) -
okhttp-tls/src/main/kotlin/okhttp3/tls/internal/InsecureExtendedTrustManager.kt
import javax.net.ssl.SSLEngine import javax.net.ssl.X509ExtendedTrustManager import okhttp3.internal.peerName import org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement /** * This extends [X509ExtendedTrustManager] to disable verification for a set of hosts. * * Note that the superclass [X509ExtendedTrustManager] isn't available on Android until version 7 * (API level 24). */ @IgnoreJRERequirement
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 2.6K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/PrintEvents.java
} } }); } public static void main(String... args) throws Exception { new PrintEvents().run(); } private static final class PrintingEventListener extends EventListener { private static final Factory FACTORY = new Factory() { final AtomicLong nextCallId = new AtomicLong(1L); @Override public EventListener create(Call call) {
Java - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sun Feb 16 23:20:49 GMT 2020 - 6.1K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/CustomCipherSuites.java
/** * An SSL socket factory that forwards all calls to a delegate. Override {@link #configureSocket} * to customize a created socket before it is returned. */ static class DelegatingSSLSocketFactory extends SSLSocketFactory { protected final SSLSocketFactory delegate; DelegatingSSLSocketFactory(SSLSocketFactory delegate) { this.delegate = delegate; }
Java - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Thu Mar 14 21:57:42 GMT 2019 - 6.5K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/WebSocketEcho.java
import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.Response; import okhttp3.WebSocket; import okhttp3.WebSocketListener; import okio.ByteString; public final class WebSocketEcho extends WebSocketListener { private void run() { OkHttpClient client = new OkHttpClient.Builder() .readTimeout(0, TimeUnit.MILLISECONDS) .build(); Request request = new Request.Builder()
Java - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Thu Apr 04 11:40:21 GMT 2024 - 1.6K bytes - Viewed (0)