Stay organized with collections
Save and categorize content based on your preferences.
IkeTrafficSelector
public
final
class
IkeTrafficSelector
extends Object
IkeTrafficSelector represents a Traffic Selector of a Child Session.
Traffic Selectors specify addresses that are acceptable within the IPsec SA.
Callers can propose IkeTrafficSelector
s when building a ChildSessionParams
and
receive the negotiated IkeTrafficSelector
s via a ChildSessionConfiguration
.
Summary
Fields |
public
final
int |
endPort
The largest port number allowed by this Traffic Selector.
|
public
final
InetAddress |
endingAddress
The largest address included in this Traffic Selector.
|
public
final
int |
startPort
The smallest port number allowed by this Traffic Selector.
|
public
final
InetAddress |
startingAddress
The smallest address included in this Traffic Selector.
|
Inherited methods |
From class
java.lang.Object
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.
|
|
Fields
endPort
public final int endPort
The largest port number allowed by this Traffic Selector. Informational only.
endingAddress
public final InetAddress endingAddress
The largest address included in this Traffic Selector.
startPort
public final int startPort
The smallest port number allowed by this Traffic Selector. Informational only.
startingAddress
public final InetAddress startingAddress
The smallest address included in this Traffic Selector.
Public constructors
IkeTrafficSelector
public IkeTrafficSelector (int startPort,
int endPort,
InetAddress startingAddress,
InetAddress endingAddress)
Construct an instance of IkeTrafficSelector
for negotiating a Child Session.
Android platform does not support port-based routing. The port range negotiation is only
informational.
Parameters |
startPort |
int : the smallest port number allowed by this Traffic Selector. |
endPort |
int : the largest port number allowed by this Traffic Selector. |
startingAddress |
InetAddress : the smallest address included in this Traffic Selector.
This value cannot be null . |
endingAddress |
InetAddress : the largest address included in this Traffic Selector.
This value cannot be null . |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# IkeTrafficSelector\n\nAdded in [API level 31](/guide/topics/manifest/uses-sdk-element#ApiLevels) \nSummary: [Fields](#lfields) \\| [Ctors](#pubctors) \\| [Inherited Methods](#inhmethods) \n\nIkeTrafficSelector\n==================\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/net/ipsec/ike/IkeTrafficSelector \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\n\nfinal\n\nclass\nIkeTrafficSelector\n`\n\n\n`\n\nextends `[Object](/reference/java/lang/Object)`\n\n\n`\n\n`\n\n\n`\n\n|---|------------------------------------------|\n| [java.lang.Object](/reference/java/lang/Object) ||\n| ↳ | android.net.ipsec.ike.IkeTrafficSelector |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nIkeTrafficSelector represents a Traffic Selector of a Child Session.\n\nTraffic Selectors specify addresses that are acceptable within the IPsec SA.\n\nCallers can propose [IkeTrafficSelector](/reference/android/net/ipsec/ike/IkeTrafficSelector)s when building a [ChildSessionParams](/reference/android/net/ipsec/ike/ChildSessionParams) and\nreceive the negotiated [IkeTrafficSelector](/reference/android/net/ipsec/ike/IkeTrafficSelector)s via a [ChildSessionConfiguration](/reference/android/net/ipsec/ike/ChildSessionConfiguration). \n**See also:**\n\n- [RFC 7296, Internet Key Exchange\n Protocol Version 2 (IKEv2)](https://tools.ietf.org/html/rfc7296#section-3.13)\n\nSummary\n-------\n\n| ### Fields ||\n|----------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` public final int` | [endPort](/reference/android/net/ipsec/ike/IkeTrafficSelector#endPort) The largest port number allowed by this Traffic Selector. |\n| ` public final `[InetAddress](/reference/java/net/InetAddress) | [endingAddress](/reference/android/net/ipsec/ike/IkeTrafficSelector#endingAddress) The largest address included in this Traffic Selector. |\n| ` public final int` | [startPort](/reference/android/net/ipsec/ike/IkeTrafficSelector#startPort) The smallest port number allowed by this Traffic Selector. |\n| ` public final `[InetAddress](/reference/java/net/InetAddress) | [startingAddress](/reference/android/net/ipsec/ike/IkeTrafficSelector#startingAddress) The smallest address included in this Traffic Selector. |\n\n| ### Public constructors ||\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| ` `[IkeTrafficSelector](/reference/android/net/ipsec/ike/IkeTrafficSelector#IkeTrafficSelector(int,%20int,%20java.net.InetAddress,%20java.net.InetAddress))`(int startPort, int endPort, `[InetAddress](/reference/java/net/InetAddress)` startingAddress, `[InetAddress](/reference/java/net/InetAddress)` endingAddress) ` Construct an instance of [IkeTrafficSelector](/reference/android/net/ipsec/ike/IkeTrafficSelector) for negotiating a Child Session. |\n\n| ### Inherited methods |\n|-----------------------|---|\n| From class ` `[java.lang.Object](/reference/java/lang/Object)` ` |---------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](/reference/java/lang/Object) | ` `[clone](/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object. | | ` boolean` | ` `[equals](/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](/reference/java/lang/Object)` obj) ` Indicates whether some other object is \"equal to\" this one. | | ` void` | ` `[finalize](/reference/java/lang/Object#finalize())`() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. | | ` final `[Class](/reference/java/lang/Class)`\u003c?\u003e` | ` `[getClass](/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this `Object`. | | ` int` | ` `[hashCode](/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object. | | ` final void` | ` `[notify](/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor. | | ` final void` | ` `[notifyAll](/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor. | | ` `[String](/reference/java/lang/String) | ` `[toString](/reference/java/lang/Object#toString())`() ` Returns a string representation of the object. | | ` final void` | ` `[wait](/reference/java/lang/Object#wait(long,%20int))`(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](/reference/java/lang/Object#wait(long))`(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](/reference/java/lang/Object#wait())`() ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*. | ||\n\nFields\n------\n\n### endPort\n\nAdded in [API level 31](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic final int endPort\n```\n\nThe largest port number allowed by this Traffic Selector. Informational only.\n\n\u003cbr /\u003e\n\n### endingAddress\n\nAdded in [API level 31](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic final InetAddress endingAddress\n```\n\nThe largest address included in this Traffic Selector.\n\n\u003cbr /\u003e\n\n### startPort\n\nAdded in [API level 31](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic final int startPort\n```\n\nThe smallest port number allowed by this Traffic Selector. Informational only.\n\n\u003cbr /\u003e\n\n### startingAddress\n\nAdded in [API level 31](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic final InetAddress startingAddress\n```\n\nThe smallest address included in this Traffic Selector.\n\n\u003cbr /\u003e\n\nPublic constructors\n-------------------\n\n### IkeTrafficSelector\n\nAdded in [API level 31](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic IkeTrafficSelector (int startPort, \n int endPort, \n InetAddress startingAddress, \n InetAddress endingAddress)\n```\n\nConstruct an instance of [IkeTrafficSelector](/reference/android/net/ipsec/ike/IkeTrafficSelector) for negotiating a Child Session.\n\nAndroid platform does not support port-based routing. The port range negotiation is only\ninformational.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|-------------------|------------------------------------------------------------------------------------------------------------|\n| `startPort` | `int`: the smallest port number allowed by this Traffic Selector. \u003cbr /\u003e |\n| `endPort` | `int`: the largest port number allowed by this Traffic Selector. \u003cbr /\u003e |\n| `startingAddress` | `InetAddress`: the smallest address included in this Traffic Selector. This value cannot be `null`. \u003cbr /\u003e |\n| `endingAddress` | `InetAddress`: the largest address included in this Traffic Selector. This value cannot be `null`. \u003cbr /\u003e |"]]