Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 3,862 for Call (0.15 sec)

  1. samples/guide/src/main/java/okhttp3/recipes/kt/CancelCall.kt

            .build()
    
        val startNanos = System.nanoTime()
        val call = client.newCall(request)
    
        // Schedule a job to cancel the call in 1 second.
        executor.schedule({
          System.out.printf("%.2f Canceling call.%n", (System.nanoTime() - startNanos) / 1e9f)
          call.cancel()
          System.out.printf("%.2f Canceled call.%n", (System.nanoTime() - startNanos) / 1e9f)
        }, 1, TimeUnit.SECONDS)
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.9K bytes
    - Viewed (0)
  2. okhttp-testing-support/src/main/kotlin/okhttp3/ConnectionEvent.kt

        override val timestampNs: Long,
        val route: Route,
        val call: Call,
      ) : ConnectionEvent()
    
      data class ConnectFailed(
        override val timestampNs: Long,
        val route: Route,
        val call: Call,
        val exception: IOException,
      ) : ConnectionEvent() {
        override fun closes(event: ConnectionEvent): Boolean = event is ConnectStart && call == event.call && route == event.route
      }
    
      data class ConnectEnd(
    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)
  3. okhttp/src/test/java/okhttp3/internal/http/CancelTest.kt

                .write(ByteArray(responseBodySize)),
            )
            .throttleBody(64 * 1024, 125, MILLISECONDS) // 500 Kbps
            .build(),
        )
        val call = client.newCall(Request(server.url("/")))
        val response = call.execute()
        cancelLater(call, 500)
        val responseBody = response.body.byteStream()
        val buffer = ByteArray(1024)
        assertFailsWith<IOException> {
          while (responseBody.read(buffer) != -1) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 9.9K bytes
    - Viewed (0)
  4. okhttp-testing-support/src/main/kotlin/okhttp3/RecordingConnectionListener.kt

        }
      }
    
      override fun connectStart(
        route: Route,
        call: Call,
      ) = logEvent(ConnectionEvent.ConnectStart(System.nanoTime(), route, call))
    
      override fun connectFailed(
        route: Route,
        call: Call,
        failure: IOException,
      ) = logEvent(
        ConnectionEvent.ConnectFailed(System.nanoTime(), route, call, failure),
      )
    
      override fun connectEnd(
        connection: Connection,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  5. src/main/java/org/codelibs/fess/es/log/bsbhv/BsFavoriteLogBhv.java

        public int[] batchInsert(List<FavoriteLog> list, RequestOptionCall<BulkRequestBuilder> call) {
            return batchInsert(list, call, null);
        }
    
        public int[] batchInsert(List<FavoriteLog> list, RequestOptionCall<BulkRequestBuilder> call,
                RequestOptionCall<IndexRequestBuilder> entityCall) {
            return doBatchInsert(new BulkList<>(list, call, entityCall), null);
        }
    
    Java
    - Registered: Mon Apr 29 08:04:11 GMT 2024
    - Last Modified: Thu Feb 22 01:37:57 GMT 2024
    - 9.5K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/DuplexTest.kt

            .url(server.url("/"))
            .post(AsyncRequestBody())
            .build()
        val call = client.newCall(request)
        call.timeout().timeout(250, TimeUnit.MILLISECONDS)
        assertFailsWith<IOException> {
          call.execute()
        }.also { expected ->
          assertThat(expected.message).isEqualTo("timeout")
          assertTrue(call.isCanceled())
        }
      }
    
      @Test
      fun fullCallTimeoutDoesNotApplyOnceConnected() {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 23.9K bytes
    - Viewed (0)
  7. docs/recipes.md

            final Call call = client.newCall(request);
    
            // Schedule a job to cancel the call in 1 second.
            executor.schedule(new Runnable() {
              @Override public void run() {
                System.out.printf("%.2f Canceling call.%n", (System.nanoTime() - startNanos) / 1e9f);
                call.cancel();
                System.out.printf("%.2f Canceled call.%n", (System.nanoTime() - startNanos) / 1e9f);
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Feb 18 08:52:22 GMT 2022
    - 40.2K bytes
    - Viewed (1)
  8. okhttp-testing-support/src/main/kotlin/okhttp3/RecordingEventListener.kt

        call: Call,
        connection: Connection,
      ) = logEvent(ConnectionReleased(System.nanoTime(), call, connection))
    
      override fun callStart(call: Call) = logEvent(CallStart(System.nanoTime(), call))
    
      override fun requestHeadersStart(call: Call) = logEvent(RequestHeadersStart(System.nanoTime(), call))
    
      override fun requestHeadersEnd(
        call: Call,
        request: Request,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9K bytes
    - Viewed (1)
  9. src/main/java/org/codelibs/fess/es/config/bsbhv/BsScheduledJobBhv.java

        public int[] batchInsert(List<ScheduledJob> list, RequestOptionCall<BulkRequestBuilder> call) {
            return batchInsert(list, call, null);
        }
    
        public int[] batchInsert(List<ScheduledJob> list, RequestOptionCall<BulkRequestBuilder> call,
                RequestOptionCall<IndexRequestBuilder> entityCall) {
            return doBatchInsert(new BulkList<>(list, call, entityCall), null);
        }
    
    Java
    - Registered: Mon Apr 29 08:04:11 GMT 2024
    - Last Modified: Thu Feb 22 01:37:57 GMT 2024
    - 10.2K bytes
    - Viewed (0)
  10. src/main/java/org/codelibs/fess/es/config/bsbhv/BsThumbnailQueueBhv.java

        public int[] batchInsert(List<ThumbnailQueue> list, RequestOptionCall<BulkRequestBuilder> call) {
            return batchInsert(list, call, null);
        }
    
        public int[] batchInsert(List<ThumbnailQueue> list, RequestOptionCall<BulkRequestBuilder> call,
                RequestOptionCall<IndexRequestBuilder> entityCall) {
            return doBatchInsert(new BulkList<>(list, call, entityCall), null);
        }
    
    Java
    - Registered: Mon Apr 29 08:04:11 GMT 2024
    - Last Modified: Thu Feb 22 01:37:57 GMT 2024
    - 9.8K bytes
    - Viewed (0)
Back to top