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.

Summary

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.

Inherited methods

Object clone()

Creates and returns a copy of this object.

boolean equals(Object obj)

Indicates whether some other object is "equal to" this one.

void finalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

final Class<?> getClass()

Returns the runtime class of this Object.

int hashCode()

Returns a hash code value for the object.

final void notify()

Wakes up a single thread that is waiting on this object's monitor.

final void notifyAll()

Wakes up all threads that are waiting on this object's monitor.

String toString()

Returns a string representation of the object.

final void wait(long timeoutMillis, int nanos)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait(long timeoutMillis)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait()

Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

Constants

MIGRATION_OPTION_DISABLED

Added in API level 34
Also in S Extensions 7
public static final int MIGRATION_OPTION_DISABLED

Option is disabled.

Constant Value: 2 (0x00000002)

MIGRATION_OPTION_ENABLED

Added in API level 34
Also in S Extensions 7
public static final int MIGRATION_OPTION_ENABLED

Option is enabled.

Constant Value: 1 (0x00000001)

MIGRATION_OPTION_UNSPECIFIED

Added in API level 34
Also in S Extensions 7
public static final int MIGRATION_OPTION_UNSPECIFIED

Option is unspecified, platform default value will be used.

Constant Value: 0 (0x00000000)

Public methods

getAllowNonDefaultNetworkUsage

Added in API level 34
Also in S Extensions 7
public int getAllowNonDefaultNetworkUsage ()

See Builder.setAllowNonDefaultNetworkUsage(int)

getDefaultNetworkMigration

Added in API level 34
Also in S Extensions 7
public int getDefaultNetworkMigration ()

See Builder.setDefaultNetworkMigration(int)

getPathDegradationMigration

Added in API level 34
Also in S Extensions 7
public int getPathDegradationMigration ()

See Builder.setPathDegradationMigration(int)