public class MultiPathManager extends Object
This class uses the singleton pattern.
The getInstance method can be used to obtain the MultiPathManager object.
This class provides methods to manage multiple paths, for example, enabling or disabling multipath.
| 限定符和类型 | 字段 | 说明 |
|---|---|---|
static String |
MULTIPATH_FLOW_SCALE |
Indicates the type of enabling multipath.
|
static String |
MULTIPATH_FLOW_TYPE |
Indicates the multipath flow type.
|
static String |
MULTIPATH_IP_ADDRESS |
Indicates the multipath IP address.
|
static String |
MULTIPATH_IP_CARRIER |
Indicates the multipath IP address carrier.
|
static String |
MULTIPATH_IP_DEPLOYTYPE |
Indicates the multipath IP address deployment type.
|
static String |
MULTIPATH_IP_GROUP |
Indicates the group to which the multipath IP address belongs.
|
static String |
MULTIPATH_IP_PORT |
Indicates the multipath IP address and port number.
|
static String |
MULTIPATH_PARAM_BANDWIDTH |
Indicates the multipath bandwidth.
|
static String |
MULTIPATH_PARAM_RTT |
Indicates the key used to identify a multipath round-trip time (RTT) parameter.
|
static String |
MULTIPATH_POLICY_TYPE |
Indicates the multipath policy type.
|
static String |
MULTIPATH_SCENARIO_FLAG |
Indicates the multipath scenario flag.
|
static String |
MULTIPATH_SOURCELINK_RTT |
Indicates the source link RTT.
|
static String |
MULTIPATH_SWITCH_PATH |
Indicates the multipath switching type.
|
static String |
MULTIPATH_SWITCH_TIME |
Indicates the multipath switching time.
|
static String |
MULTIPATH_TARGETLINK_RTT |
Indicates the target link RTT.
|
static String |
MULTIPATH_USER_ID |
Indicates the multipath user ID.
|
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
int |
disableMultipath(String packageName,
String flowParamJson) |
已过时。
|
int |
enableMultipathFlow(String packageName,
String flowParamJson,
String multipathParamJson,
IMultiPathCallback callback) |
已过时。
|
static MultiPathManager |
getInstance() |
Obtains a
MultiPathManager object. |
public static final String MULTIPATH_FLOW_SCALE
public static final String MULTIPATH_FLOW_TYPE
public static final String MULTIPATH_IP_ADDRESS
public static final String MULTIPATH_IP_CARRIER
public static final String MULTIPATH_IP_DEPLOYTYPE
public static final String MULTIPATH_IP_GROUP
public static final String MULTIPATH_IP_PORT
public static final String MULTIPATH_PARAM_BANDWIDTH
public static final String MULTIPATH_PARAM_RTT
public static final String MULTIPATH_POLICY_TYPE
public static final String MULTIPATH_SCENARIO_FLAG
public static final String MULTIPATH_SOURCELINK_RTT
public static final String MULTIPATH_SWITCH_PATH
public static final String MULTIPATH_SWITCH_TIME
public static final String MULTIPATH_TARGETLINK_RTT
public static MultiPathManager getInstance()
MultiPathManager object.
This method is static and uses the singleton pattern.
MultiPathManager object.@Deprecated public int enableMultipathFlow(String packageName, String flowParamJson, String multipathParamJson, IMultiPathCallback callback) throws RemoteException
This method can enable multipath based on an application or a combination of IP address and port number. If an application is specified, multipath is enabled for all flows from the application; if a combination of IP address and port number is specified, multipath is enabled for all flows from the application to the IP address and port number.
packageName - Indicates the package name of the application for which multipath is enabled.flowParamJson - Indicates flow parameters in JSON format. The parameters include
MULTIPATH_FLOW_SCALE, MULTIPATH_IP_ADDRESS, MULTIPATH_IP_PORT,
MULTIPATH_IP_CARRIER, MULTIPATH_IP_DEPLOYTYPE, MULTIPATH_IP_GROUP,
and MULTIPATH_FLOW_TYPE.multipathParamJson - Indicates multipath parameters in JSON format. The parameters include
MULTIPATH_POLICY_TYPE, MULTIPATH_USER_ID, MULTIPATH_SCENARIO_FLAG,
MULTIPATH_PARAM_RTT, and MULTIPATH_PARAM_BANDWIDTH.callback - Indicates the callback that is automatically called when a multipath switching occurs.0 if multipath is enabled; returns -1 if multipath is not enabled;
returns -2 if parameters are incorrect; returns -3 if the remote call of this method fails.RemoteException@Deprecated public int disableMultipath(String packageName, String flowParamJson) throws RemoteException
This method can disable multipath based on an application or a combination of IP address and port number.
packageName - Indicates the package name of the application for which multipath is disabled.flowParamJson - Indicates flow parameters in JSON format. The parameters include
MULTIPATH_FLOW_SCALE, MULTIPATH_IP_ADDRESS, MULTIPATH_IP_PORT,
MULTIPATH_IP_CARRIER, MULTIPATH_IP_DEPLOYTYPE, MULTIPATH_IP_GROUP,
and MULTIPATH_FLOW_TYPE.0 if multipath is disabled; returns -1 if multipath is not disabled;
returns -2 if parameters are incorrect; returns -3 if the remote call of this method fails.RemoteException