public void send ( String uri , String data ) { Objects . requireNonNull ( uri , Required . URI . toString ( ) ) ; final Set < ServerSentEventConnection > uriConnections = getConnections ( uri ) ; if ( uriConnections != null ) { uriConnections . stream ( ) . filter ( ServerSentEventConnection :: isOpen ) . forEach ( ( ServerSentEventConnection connection ) -> connection . send ( data ) ) ; } }
Sends data to all connections for a given URI resource