Websocket enables bidirectional, message-oriented streaming of text and binary data between client and server. It is the set of standards, out of which API that is supported by browsers is defined by W3C and underlying protocol is maintained by the HyBi Working Group (IETF).
Websocket has been widely adopted in recent times and various client libraries have been developed in many programming languages, including Java that offer emulated websocket API.
For more information, see:
Websocket API: http://www.w3.org/TR/websockets/
Websocket protocol : https://tools.ietf.org/html/rfc6455
Overview of websockets: http://chimera.labs.oreilly.com/books/1230000000545/ch17.html