Any specific reason for the sample codes for Websocket API in java use the neovisionaries websockets library? Is it possible to use any other websocket library or do they lack in some functionality needed for the functioning?
You should be able to choose your own WebSocket library. I can't speak for all of the available implementations but I believe most should be able to handle the job of connecting and sending requests down to the server.
I don't believe there was any specific reason why the neovisionaries was chosen other than to demonstrate an example.