class WebSocketListenerImpl extends WebSocketAdapter {
    static final Logger log = LoggerFactory.getLogger(WebSocketListenerImpl.class);

    private WebSocketImpl webSocket;
    private final WebSocketRouter webSocketRouter = WebSocketRouter.getInstance();

    @Override
    public void onWebSocketConnect(Session session) {
        super.onWebSocketConnect(session);

        webSocket = new WebSocketImpl(session);
        session.getUpgradeRequest().getHeaders().forEach((k, v) -> {
            if (v.size() > 0) {
                webSocket.param(k, v.get(0));
            }
        });

        webSocketRouter.getListener().onOpen(webSocket);
    }

    @Override
    public void onWebSocketBinary(byte[] payload, int offset, int len) {
        try {
            ByteBuffer buf = ByteBuffer.wrap(payload, offset, len);
            webSocketRouter.getListener().onMessage(webSocket, buf);
        } catch (Throwable e) {
            log.warn(e.getMessage(), e);
        }
    }

    @Override
    public void onWebSocketText(String text) {<FILL_FUNCTION_BODY>}

    @Override
    public void onWebSocketClose(int statusCode, String reason) {
        if (webSocket.isClosed()) {
            return;
        } else {
            webSocket.close();
        }

        webSocketRouter.getListener().onClose(webSocket);
        super.onWebSocketClose(statusCode, reason);
    }

    @Override
    public void onWebSocketError(Throwable cause) {
        webSocketRouter.getListener().onError(webSocket, cause);
    }
}

        try {
            webSocketRouter.getListener().onMessage(webSocket, text);
        } catch (Throwable e) {
            log.warn(e.getMessage(), e);
        }
    
<methods>public void <init>() ,public org.eclipse.jetty.websocket.api.RemoteEndpoint getRemote() ,public org.eclipse.jetty.websocket.api.Session getSession() ,public boolean isConnected() ,public boolean isNotConnected() ,public void onWebSocketBinary(byte[], int, int) ,public void onWebSocketClose(int, java.lang.String) ,public void onWebSocketConnect(org.eclipse.jetty.websocket.api.Session) ,public void onWebSocketError(java.lang.Throwable) ,public void onWebSocketText(java.lang.String) <variables>private org.eclipse.jetty.websocket.api.RemoteEndpoint remote,private volatile org.eclipse.jetty.websocket.api.Session session