Sequenceablepublic final class RouteInfo extends Object implements Sequenceable
The route information can be obtained using the provided methods.
Sequenceable.Producer<T>| 构造器 | 说明 |
|---|---|
RouteInfo() |
construct route information.
|
RouteInfo(IpPrefix destination,
InetAddress gateway,
String iface,
int type) |
construct route information.
|
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
IpPrefix |
getDestination() |
Obtains the destination IP address.
|
InetAddress |
getGateway() |
Obtains the gateway address.
|
String |
getInterface() |
Obtains the NIC name of a route.
|
boolean |
hasGateway() |
If the route has a next hop
|
boolean |
isDefaultRoute() |
If the route is a default route
|
boolean |
marshalling(Parcel out) |
Marshals this
Sequenceable object into a Parcel. |
boolean |
matches(InetAddress destination) |
Determines whether the destination and prefix of this route includes the specified address.
|
String |
toString() |
Composes all the members and their values in the class into a string in sequence.
|
boolean |
unmarshalling(Parcel in) |
Unmarshals this
Sequenceable object from a Parcel. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waithasFileDescriptorpublic RouteInfo()
public RouteInfo(IpPrefix destination, InetAddress gateway, String iface, int type)
destination - IpPrefix describing this paramgateway - see iface - interface nametype - route type Unicast/Unreachable/Throwpublic String getInterface()
public IpPrefix getDestination()
IpPrefix.public InetAddress getGateway()
public boolean unmarshalling(Parcel in)
SequenceableSequenceable object from a Parcel.unmarshalling 在接口中 Sequenceablein - Indicates the Parcel object into which the Sequenceable
object has been marshaled.true if the unmarshalling is successful; returns false otherwise.public boolean marshalling(Parcel out)
SequenceableSequenceable object into a Parcel.marshalling 在接口中 Sequenceableout - Indicates the Parcel object to which the Sequenceable
object will be marshaled..true if the marshalling is successful; returns false otherwise.public boolean isDefaultRoute()
public boolean hasGateway()
public boolean matches(InetAddress destination)
destination - InetAddress to check if it would match this route.