Undertow websockets mantain a peer connections set per WebSocketProtocolHandshakeHandler instance. From the looks of it, it's there only for undertow users convinience.
The application I'm building doesn't make use of the peer connections set at all and it feels kinda bad to have to pay for the feature despite not using it.
It would be great if there was a way to disable this functionality. Perhaps with an overload of the WebSocketProtocolHandshakeHandler constructor that initializes that set to null. (and adding null checks whenever the set is used.)
Or maybe some global undertow setting?
This kind of functionality could be provided optionally as a convinience abstract class that implements WebSocketConnectionCallback and maintains the set, exposing it to the users by an overrideable overload of the onConnect method.
Users that want the functionality could inherit from it.