开发者

link state notification in Java

Is there any way in Java to receive event notifications whenever link state changes on a computer (connected, disconnected开发者_StackOverflow社区, up, down, etc)? Thanks!


There is no platform-independent mechanism which accomplishes this in Java. However, you can use JNI to do it. For example, Windows allows you to poll (or be notified of) network interface states using the Network Location Awareness (NLA) API.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜