public void addConnection ( ServerSentEventConnection connection ) { Objects . requireNonNull ( connection , Required . CONNECTION . toString ( ) ) ; final String url = RequestUtils . getServerSentEventURL ( connection ) ; Set < ServerSentEventConnection > uriConnections = getConnections ( url ) ; if ( uriConnections == null ) { uriConnections = new HashSet <> ( ) ; uriConnections . add ( connection ) ; } else { uriConnections . add ( connection ) ; } setConnections ( url , uriConnections ) ; }
Adds a new connection to the manager