Skip to content

Adding Tunnel.connIDs and TunnelConnectionNtf - #408

Merged
notthetup merged 7 commits into
masterfrom
tunnel-connid
Jul 24, 2026
Merged

notthetup merged 7 commits into
masterfrom
tunnel-connid

Conversation

@notthetup

@notthetup notthetup commented Jun 9, 2026 •

Copy link
Copy Markdown
Collaborator

This pull request introduces enhancements to the Tunnel agent 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:

  • Added a new TunnelConnectionNtf message class to notify when a connector is opened or closed, including details such as connection status, connection ID, and connector name.
  • Introduced the TunnelStatus enum to represent connection events (CONNECTED, DISCONNECTED).
  • Modified the Tunnel class to send TunnelConnectionNtf notifications on connection and disconnection events, and to clean up connection tracking accordingly. [1] [2]

Parameter and API enhancements:

  • Added a new read-only connIDs parameter to TunnelParam and exposed it via a getConnIDs() method in Tunnel, allowing users to query the set of active connection IDs and their associated connector names. [1] [2]
  • Updated the tunnel agent's description and documentation to include the new connIDs parameter and its usage.

Thread-safety and code cleanup:

  • Replaced ArrayList and HashMap with thread-safe CopyOnWriteArrayList and ConcurrentHashMap for agents, connectors, and connIDs in Tunnel, removing unnecessary synchronization blocks. [1] [2] [3] [4] [5] [6]

Testing:

  • Added a new test case TunnelNotificationsTest to verify that TunnelConnectionNtf notifications are published and that the connIDs parameter is correctly reported.

@notthetup notthetup changed the title Adding connID and connection notifications for tunnel Adding Tunnel.connIDs and TunnelConnectionNtf Jul 23, 2026
@notthetup
notthetup requested a review from Copilot July 23, 2026 12:07

This comment was marked as resolved.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@notthetup notthetup self-assigned this Jul 23, 2026
@notthetup
notthetup requested a review from Copilot July 23, 2026 12:55
@notthetup
notthetup marked this pull request as ready for review July 23, 2026 12:55

This comment was marked as resolved.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@notthetup
notthetup requested a review from mchitre July 23, 2026 13:19
Comment thread src/main/java/org/arl/fjage/remote/TunnelConnectionNtf.java Outdated
Comment thread src/main/java/org/arl/fjage/remote/TunnelParam.java Outdated
Comment thread src/main/java/org/arl/fjage/remote/Tunnel.java Outdated
@mchitre

mchitre commented Jul 23, 2026

Copy link
Copy Markdown
Member

I don't think ReleaseNotes.md documents this as claimed in the PR description.

notthetup and others added 2 commits July 24, 2026 11:26
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@notthetup

Copy link
Copy Markdown
Collaborator Author

I don't think ReleaseNotes.md documents this as claimed in the PR description.

Updated the PR.

@notthetup
notthetup merged commit 26c167a into master Jul 24, 2026
2 checks passed
@notthetup
notthetup deleted the tunnel-connid branch July 24, 2026 03:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants