VcnManager.VcnStatusCallback


public static abstract class VcnManager.VcnStatusCallback
extends Object

java.lang.Object
   ↳ android.net.vcn.VcnManager.VcnStatusCallback


VcnStatusCallback is the interface for Carrier apps to receive updates for their VCNs.

VcnStatusCallbacks may be registered before VcnConfigs are provided for a subscription group.

Summary

Public constructors

VcnStatusCallback()

Public methods

abstract void onGatewayConnectionError(String gatewayConnectionName, int errorCode, Throwable detail)

Invoked when a VCN Gateway Connection corresponding to this callback's subscription group encounters an error.

abstract void onStatusChanged(int statusCode)

Invoked when status of the VCN for this callback's subscription group changes.

Inherited methods

Public constructors

VcnStatusCallback

public VcnStatusCallback ()

Public methods

onGatewayConnectionError

Added in API level 31
public abstract void onGatewayConnectionError (String gatewayConnectionName, 
                int errorCode, 
                Throwable detail)

Invoked when a VCN Gateway Connection corresponding to this callback's subscription group encounters an error.

Parameters
gatewayConnectionName String: the String GatewayConnection name for the GatewayConnection encountering an error. This will match the name for exactly one VcnGatewayConnectionConfig for the VcnConfig configured for this callback's subscription group This value cannot be null.

errorCode int: the code to indicate the error that occurred. This value will be one of VCN_ERROR_CODE_*. Value is VcnManager.VCN_ERROR_CODE_INTERNAL_ERROR, VcnManager.VCN_ERROR_CODE_CONFIG_ERROR, or VcnManager.VCN_ERROR_CODE_NETWORK_ERROR

detail Throwable: Throwable to provide additional information about the error, or null if none

onStatusChanged

Added in API level 31
public abstract void onStatusChanged (int statusCode)

Invoked when status of the VCN for this callback's subscription group changes.

Parameters
statusCode int: the code for the status change encountered by this VcnStatusCallback's subscription group. This value will be one of VCN_STATUS_CODE_*. Value is VcnManager.VCN_STATUS_CODE_NOT_CONFIGURED, VcnManager.VCN_STATUS_CODE_INACTIVE, VcnManager.VCN_STATUS_CODE_ACTIVE, or VcnManager.VCN_STATUS_CODE_SAFE_MODE