There is a stream running through edge application. How can we stop it from java? Stream source is provided by AliasProvider, so it wont launch again as AliasProvider will return wrong URL upon future client requests. But those who were already connected while it had proper alias resolve, keep watching it. Stream is not in MediaCasterStreamManager, we cant stop it from there.
We need to stop the stream, disconnect all clients connected to this stream, and completely purge it from edge application.
If you are looking for some code to get you started in that direction, I'd suggest viewing our
ModuleTimeDisconnect module in our collection. Take a look at the Disconnecter class as it demonstrates how to disconnect clients and you could use that as a starter for your new module.
Otherwise you can control the process by which the edge resolves the stream. Take a look at our event listeners for
IMediaStreamNameAliasProvider2 interface. You can then make the determination of which streams are to be resolved by the respective origin(s) by handling the resolvePlayAlias and/or resolveStreamAlias events.