Essentially create an instance of this class once, providing the type of
WebSocketHandler class to create for each connection, and then pass it to any
API method that expects a WebSocketHandler.
If initializing the target WebSocketHandler type requires a Spring
BeanFctory, then the setBeanFactory(BeanFactory) property accordingly. Simply
declaring this class as a Spring bean will do that. Otherwise, WebSocketHandler
instances of the target type will be created using the default constructor.
Invoked after the WebSocket connection has been closed by either side, or after a
transport error has occurred. Although the session may technically still be open,
depending on the underlying implementation, sending messages at this point is
discouraged and most likely will not succeed.