ConnectionMigrationOptions
public
class
ConnectionMigrationOptions
extends Object
java.lang.Object | |
↳ | android.net.http.ConnectionMigrationOptions |
A class configuring the HTTP connection migration functionality.
Connection migration stops open connections to servers from being destroyed when the client device switches its L4 connectivity (typically the IP address as a result of using a different network). This is particularly common with mobile devices losing wifi connectivity and switching to cellular data, or vice versa (a.k.a. the parking lot problem). QUIC uses connection identifiers which are independent of the underlying transport layer to make this possible. If the client connects to a new network and wants to preserve the existing connection, they can do so by using a connection identifier the server knows to be a continuation of the existing connection.
The features are only available for QUIC connections and the server needs to support connection migration.
See also:
Summary
Nested classes | |
---|---|
class |
ConnectionMigrationOptions.Builder
Builder for |
Constants | |
---|---|
int |
MIGRATION_OPTION_DISABLED
Option is disabled. |
int |
MIGRATION_OPTION_ENABLED
Option is enabled. |
int |
MIGRATION_OPTION_UNSPECIFIED
Option is unspecified, platform default value will be used. |
Public methods | |
---|---|
int
|
getAllowNonDefaultNetworkUsage()
|
int
|
getDefaultNetworkMigration()
|
int
|
getPathDegradationMigration()
|
Inherited methods | |
---|---|
Constants
MIGRATION_OPTION_DISABLED
public static final int MIGRATION_OPTION_DISABLED
Option is disabled.
Constant Value: 2 (0x00000002)
MIGRATION_OPTION_ENABLED
public static final int MIGRATION_OPTION_ENABLED
Option is enabled.
Constant Value: 1 (0x00000001)
MIGRATION_OPTION_UNSPECIFIED
public static final int MIGRATION_OPTION_UNSPECIFIED
Option is unspecified, platform default value will be used.
Constant Value: 0 (0x00000000)
Public methods
getAllowNonDefaultNetworkUsage
public int getAllowNonDefaultNetworkUsage ()
See Builder#setAllowNonDefaultNetworkUsage(int)
Returns | |
---|---|
int |
Value is MIGRATION_OPTION_UNSPECIFIED , MIGRATION_OPTION_ENABLED , or MIGRATION_OPTION_DISABLED |
getDefaultNetworkMigration
public int getDefaultNetworkMigration ()
See Builder#setDefaultNetworkMigration(int)
Returns | |
---|---|
int |
Value is MIGRATION_OPTION_UNSPECIFIED , MIGRATION_OPTION_ENABLED , or MIGRATION_OPTION_DISABLED |
getPathDegradationMigration
public int getPathDegradationMigration ()
See Builder#setPathDegradationMigration(int)
Returns | |
---|---|
int |
Value is MIGRATION_OPTION_UNSPECIFIED , MIGRATION_OPTION_ENABLED , or MIGRATION_OPTION_DISABLED |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2024-04-04 UTC.