class ToHandlerListener extends EventListener {
    private static final Logger log = LoggerFactory.getLogger(ToHandlerListener.class);

    public ToHandlerListener() {
        super();
        doOnMessage(this::onMessageDo);
    }

    protected void onMessageDo(Session session, Message message) throws IOException {<FILL_FUNCTION_BODY>}
}

        if (Utils.isEmpty(message.event())) {
            log.warn("This message is missing route, sid={}", message.sid());
            return;
        }

        try {
            SocketdContext ctx = new SocketdContext(session, message);

            Solon.app().tryHandle(ctx);

            if (ctx.getHandled() || ctx.status() != 404) {
                ctx.commit();
            } else {
                session.sendAlarm(message, "No event handler was found! like code=404");
            }
        } catch (Throwable e) {
            //context 初始化时，可能会出错
            //
            log.warn(e.getMessage(), e);

            if (session.isValid()) {
                session.sendAlarm(message, e.getMessage());
            }
        }
    
<methods>public void <init>() ,public void <init>(RouteSelector<org.noear.socketd.transport.core.listener.MessageHandler>) ,public org.noear.socketd.transport.core.listener.EventListener doOn(java.lang.String, org.noear.socketd.transport.core.listener.MessageHandler) ,public org.noear.socketd.transport.core.listener.EventListener doOnClose(Consumer<org.noear.socketd.transport.core.Session>) ,public org.noear.socketd.transport.core.listener.EventListener doOnError(BiConsumer<org.noear.socketd.transport.core.Session,java.lang.Throwable>) ,public org.noear.socketd.transport.core.listener.EventListener doOnMessage(org.noear.socketd.transport.core.listener.MessageHandler) ,public org.noear.socketd.transport.core.listener.EventListener doOnOpen(IoConsumer<org.noear.socketd.transport.core.Session>) ,public void onClose(org.noear.socketd.transport.core.Session) ,public void onError(org.noear.socketd.transport.core.Session, java.lang.Throwable) ,public void onMessage(org.noear.socketd.transport.core.Session, org.noear.socketd.transport.core.Message) throws java.io.IOException,public void onOpen(org.noear.socketd.transport.core.Session) throws java.io.IOException<variables>private Consumer<org.noear.socketd.transport.core.Session> doOnCloseHandler,private BiConsumer<org.noear.socketd.transport.core.Session,java.lang.Throwable> doOnErrorHandler,private org.noear.socketd.transport.core.listener.MessageHandler doOnMessageHandler,private IoConsumer<org.noear.socketd.transport.core.Session> doOnOpenHandler,private final RouteSelector<org.noear.socketd.transport.core.listener.MessageHandler> eventRouteSelector