- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 31 for policy (0.19 sec)
-
okhttp/src/main/kotlin/okhttp3/ConnectionPool.kt
fun evictAll() { delegate.evictAll() } /** * Sets a policy that applies to [address]. * Overwrites any existing policy for that address. */ @ExperimentalOkHttpApi fun setPolicy( address: Address, policy: AddressPolicy, ) { delegate.setPolicy(address, policy) } /** * A policy for how the pool should treat a specific address. */ class AddressPolicy(
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Wed Apr 03 20:39:41 GMT 2024 - 5.6K bytes - Viewed (0) -
mockwebserver/README.md
``` #### Dispatcher By default MockWebServer uses a queue to specify a series of responses. Use a Dispatcher (`import okhttp3.mockwebserver.Dispatcher`) to handle requests using another policy. One natural policy is to dispatch on the request path. You can, for example, filter the request instead of using `server.enqueue()`. ```java final Dispatcher dispatcher = new Dispatcher() { @Override
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Sun Dec 17 15:34:10 GMT 2023 - 5K bytes - Viewed (1) -
okhttp/src/main/kotlin/okhttp3/Authenticator.kt
* Applications may configure OkHttp with an authenticator for origin servers, or proxy servers, * or both. * * ## Authentication Retries * * If your authentication may be flaky and requires retries you should apply some policy * to limit the retries by the class of errors and number of attempts. To get the number of * attempts to the current point use this function. * * ```java * private int responseCount(Response response) {
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 5.5K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/connection/ConnectionPoolTest.kt
assertThat(pool.connectionCount()).isEqualTo(1) } private fun setPolicy( pool: RealConnectionPool, address: Address, policy: ConnectionPool.AddressPolicy, ) { pool.setPolicy(address, policy) taskFaker.runTasks() } private fun evictAllConnections(pool: RealConnectionPool) { pool.evictAll() assertThat(pool.connectionCount()).isEqualTo(0)
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Wed Apr 24 04:40:49 GMT 2024 - 12.7K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/connection/ConnectionUser.kt
import java.net.Socket import okhttp3.Connection import okhttp3.Handshake import okhttp3.HttpUrl import okhttp3.Protocol import okhttp3.Route /** * The object that is asking for a connection. Either a call or a connect policy from the pool. */ interface ConnectionUser { fun addPlanToCancel(connectPlan: ConnectPlan) fun removePlanToCancel(connectPlan: ConnectPlan) fun updateRouteDatabaseAfterSuccess(route: Route)
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Fri Apr 05 03:30:42 GMT 2024 - 2.2K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/connection/RealConnectionPool.kt
return references.size } /** * Adds or replaces the policy for [address]. * This will trigger a background task to start creating connections as needed. */ fun setPolicy( address: Address, policy: ConnectionPool.AddressPolicy, ) { val state = AddressState(address, taskRunner.newQueue(), policy) val newConnectionsNeeded: Int while (true) {
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Sat Apr 20 17:03:43 GMT 2024 - 16.2K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/connection/RoutePlanner.kt
* limitations under the License. */ package okhttp3.internal.connection import java.io.IOException import okhttp3.Address import okhttp3.HttpUrl /** * Policy on choosing which connection to use for an exchange and any retries that follow. This uses * the following strategies: * * 1. If the current call already has a connection that can satisfy the request it is used. Using
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Wed Dec 20 23:27:07 GMT 2023 - 4.2K bytes - Viewed (0) -
docs/features/calls.md
managing how many simultaneous requests you make. Too many simultaneous connections wastes resources; too few harms latency. For asynchronous calls, [`Dispatcher`](https://square.github.io/okhttp/4.x/okhttp/okhttp3/-dispatcher/) implements policy for maximum simultaneous requests. You can set maximums per-webserver (default is 5), and overall (default is 64)....
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Sun Feb 06 02:19:09 GMT 2022 - 3.9K bytes - Viewed (0) -
docs/contribute/code_of_conduct.md
capacity and competence. * **Be considerate**: People use our work, and we depend on the work of others. Consider users and colleagues before taking action. For example, changes to code, infrastructure, policy, and documentation may negatively impact others. * **Be respectful**: We expect people to work together to resolve conflict, assume good intentions, and act with empathy. Do not turn disagreements into personal attacks.
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Sun Feb 06 02:19:09 GMT 2022 - 5.1K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/Handshake.kt
/** * A record of a TLS handshake. For HTTPS clients, the client is *local* and the remote server is * its *peer*. * * This value object describes a completed handshake. Use [ConnectionSpec] to set policy for new * handshakes. */ class Handshake internal constructor( /** * Returns the TLS version used for this connection. This value wasn't tracked prior to OkHttp
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 6.8K bytes - Viewed (0)