static void validateHandlerClass(Class<?> handlerClass) {
        boolean valid = WebSocketListener.class.isAssignableFrom(handlerClass)
                || handlerClass.isAnnotationPresent(WebSocket.class);
        if (!valid) {
            throw new IllegalArgumentException(
                    "WebSocket handler must implement 'WebSocketListener' or be annotated as '@WebSocket'");
        }
    }
Gets the actual handler - if necessary, instantiating an object.

@return The handler instance.
src/main/java/spark/embeddedserver/jetty/websocket/WebSocketHandlerWrapper.java