Catapults.

I looked around for a bit to see if there were any historical examples of river-spanning fortifications of that sort, but I didn't find anything useful. Mostly references to a certain hard disk manufacturer or a hotel in Washington, D.C.

I suspect that sinking footings for a sturdy wall into the river bed would be a tricky engineering task, not to mention you'd have to have a gate mechanism to let legitimate traffic through. I think the most effective way to deny access to the river mouth would be artillery. Perhaps someone with more expertise in this area knows something more.

There is one possibility from Robert Jordan's Wheel of Time novels--a particular city's harbors are defended by chains that normally lie on the river bottom. If the city is threatened, they are winched up to just above the water-line. That seems a pretty flimsy defense to me, though. Any enemy who knows it's there would simply attack it with a heavy ramming ship and likely rip the chain right out of its mechanism.