Adding Tunnel.connIDs and TunnelConnectionNtf - #408
Merged
Merged
Conversation
…ons and update Tunnel class to use it
Tunnel.connIDs and TunnelConnectionNtf
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
mchitre
approved these changes
Jul 23, 2026
Member
|
I don't think |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Collaborator
Author
Updated the PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces enhancements to the
Tunnelagent for improved connection management and observability. The main changes include the addition of connection notification messages, a new parameter to expose active connection IDs, and thread-safety improvements. These updates make it easier to monitor tunnel connections and interact with them programmatically.Connection management and notifications:
TunnelConnectionNtfmessage class to notify when a connector is opened or closed, including details such as connection status, connection ID, and connector name.TunnelStatusenum to represent connection events (CONNECTED,DISCONNECTED).Tunnelclass to sendTunnelConnectionNtfnotifications on connection and disconnection events, and to clean up connection tracking accordingly. [1] [2]Parameter and API enhancements:
connIDsparameter toTunnelParamand exposed it via agetConnIDs()method inTunnel, allowing users to query the set of active connection IDs and their associated connector names. [1] [2]connIDsparameter and its usage.Thread-safety and code cleanup:
ArrayListandHashMapwith thread-safeCopyOnWriteArrayListandConcurrentHashMapforagents,connectors, andconnIDsinTunnel, removing unnecessary synchronization blocks. [1] [2] [3] [4] [5] [6]Testing:
TunnelNotificationsTestto verify thatTunnelConnectionNtfnotifications are published and that theconnIDsparameter is correctly reported.