In this recipe, we will cover the implementation of a signaling server in Java.
This recipe uses Java, so you should have Java Developer Kit (JDK) installed on your machine. You can download the appropriate version of JDK for your platform from its web page at http://www.java.com.
Java 7 has its own API to implement a WebSocket application. Previous versions of Java don't have the native support of WebSockets. In this recipe, we will cover the universal solution that works in different Java versions and is based on the third-party component, which you can find on its home page at http://java-websocket.org. This project is also present on GitHub at https://github.com/TooTallNate/Java-WebSocket.