Package android.net
Class NetworkRequest
- java.lang.Object
-
- android.net.NetworkRequest
-
public class NetworkRequest extends java.lang.ObjectDefines a request for a network, made throughNetworkRequest.Builderand or listen for changes viaConnectivityManager.registerNetworkCallback(android.net.NetworkRequest, android.net.ConnectivityManager.NetworkCallback).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classNetworkRequest.BuilderBuilder used to createNetworkRequestobjects.
-
Field Summary
Fields Modifier and Type Field Description intlegacyTypeSet for legacy requests and the default.NetworkCapabilitiesnetworkCapabilitiesTheNetworkCapabilitiesthat define this request.intrequestIdIdentifies the request.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)inthashCode()
-
-
-
Field Detail
-
networkCapabilities
public final NetworkCapabilities networkCapabilities
TheNetworkCapabilitiesthat define this request.
-
requestId
public final int requestId
Identifies the request. NetworkRequests should only be constructed by the Framework and given out to applications as tokens to be used to identify the request.
-
legacyType
public final int legacyType
Set for legacy requests and the default. Set to TYPE_NONE for none. Causes CONNECTIVITY_ACTION broadcasts to be sent.
-
-