62
62
* Network interface instances are typically used to identify the local
63
63
* interface on which a multicast group is joined.
64
64
*
65
+ * @apiNote <a id="lookup"></a>Several static methods in this class allow to
66
+ * lookup and return new instances of {@code NetworkInterface}.
67
+ * As outlined above, the returned interface instances may reflect a snapshot
68
+ * of the configuration taken at the time the instance is created.
69
+ * The network configuration may change at any time, and such methods may need to
70
+ * be invoked again in order to obtain a more up-to-date view of the network
71
+ * interfaces.
72
+ * In particular, there is no guarantee that the same interface will be
73
+ * found at the same index, or that the same network addresses will be
74
+ * bound to the interface, if the network configuration of the system
75
+ * has changed.
76
+ *
65
77
* @since 1.4
66
78
*/
67
79
public final class NetworkInterface {
@@ -282,12 +294,8 @@ public String getDisplayName() {
282
294
* @apiNote
283
295
* The returned interface instance may reflect a snapshot of the
284
296
* configuration taken at the time the instance is created.
285
- * The network configuration may change at any time, and this method may need to
286
- * be invoked again to obtain a more up-to-date view of the network interface.
287
- * In particular, there is no guarantee that the same interface will be
288
- * found at the same index, or that the same network addresses will be
289
- * bound to the interface, if the network configuration of the system
290
- * has changed.
297
+ * See the general discussion of {@linkplain NetworkInterface##lookup
298
+ * snapshots and configuration} for the semantics of the returned interface.
291
299
*
292
300
* @param name
293
301
* The name of the network interface.
@@ -314,12 +322,8 @@ public static NetworkInterface getByName(String name) throws SocketException {
314
322
* @apiNote
315
323
* The returned interface instance may reflect a snapshot of the
316
324
* configuration taken at the time the instance is created.
317
- * The network configuration may change at any time, and this method may need to
318
- * be invoked again to obtain a more up-to-date view of the network interface.
319
- * In particular, there is no guarantee that the same interface will be
320
- * found at the same index, or that the same network addresses will be
321
- * bound to the interface, if the network configuration of the system
322
- * has changed.
325
+ * See the general discussion of {@linkplain NetworkInterface##lookup
326
+ * snapshots and configuration} for the semantics of the returned interface.
323
327
*
324
328
* @param index an integer, the index of the interface
325
329
* @return the NetworkInterface obtained from its index, or {@code null} if
@@ -347,12 +351,8 @@ public static NetworkInterface getByIndex(int index) throws SocketException {
347
351
* @apiNote
348
352
* The returned interface instance may reflect a snapshot of the
349
353
* configuration taken at the time the instance is created.
350
- * The network configuration may change at any time, and this method may need to
351
- * be invoked again to obtain a more up-to-date view of the network interface.
352
- * In particular, there is no guarantee that the same interface will be
353
- * found at the same index, or that the same network addresses will be
354
- * bound to the interface, if the network configuration of the system
355
- * has changed.
354
+ * See the general discussion of {@linkplain NetworkInterface##lookup
355
+ * snapshots and configuration} for the semantics of the returned interface.
356
356
*
357
357
* @param addr
358
358
* The {@code InetAddress} to search with.
@@ -400,12 +400,8 @@ public static NetworkInterface getByInetAddress(InetAddress addr) throws SocketE
400
400
* <p>
401
401
* The returned interface instances may reflect a snapshot of the
402
402
* configuration taken at the time the instance is created.
403
- * The network configuration may change at any time, and this method may need to
404
- * be invoked again to obtain a more up-to-date view of the network interfaces.
405
- * In particular, there is no guarantee that the same interface will be
406
- * found at the same index, or that the same network addresses will be
407
- * bound to the interface, if the network configuration of the system
408
- * has changed.
403
+ * See the general discussion of {@linkplain NetworkInterface##lookup
404
+ * snapshots and configuration} for the semantics of the returned interface.
409
405
*
410
406
* @return an Enumeration of NetworkInterfaces found on this machine
411
407
* @throws SocketException if an I/O error occurs,
@@ -439,12 +435,8 @@ public static Enumeration<NetworkInterface> getNetworkInterfaces()
439
435
* <p>
440
436
* The returned interface instances may reflect a snapshot of the
441
437
* configuration taken at the time the instance is created.
442
- * The network configuration may change at any time, and this method may need to
443
- * be invoked again to obtain a more up-to-date view of the network interfaces.
444
- * In particular, there is no guarantee that the same interface will be
445
- * found at the same index, or that the same network addresses will be
446
- * bound to the interface, if the network configuration of the system
447
- * has changed.
438
+ * See the general discussion of {@linkplain NetworkInterface##lookup
439
+ * snapshots and configuration} for the semantics of the returned interface.
448
440
*
449
441
* @return a Stream of NetworkInterfaces found on this machine
450
442
* @throws SocketException if an I/O error occurs,
0 commit comments