public void run()

in dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/transport/dispatcher/ChannelEventRunnable.java [59:137]


    public void run() {
        InternalThreadLocalMap internalThreadLocalMap = InternalThreadLocalMap.getAndRemove();
        try {
            if (state == ChannelState.RECEIVED) {
                try {
                    handler.received(channel, message);
                } catch (Exception e) {
                    logger.warn(
                            INTERNAL_ERROR,
                            "unknown error in remoting module",
                            "",
                            "ChannelEventRunnable handle " + state + " operation error, channel is " + channel
                                    + ", message is " + message,
                            e);
                }
            } else {
                switch (state) {
                    case CONNECTED:
                        try {
                            handler.connected(channel);
                        } catch (Exception e) {
                            logger.warn(
                                    INTERNAL_ERROR,
                                    "unknown error in remoting module",
                                    "",
                                    "ChannelEventRunnable handle " + state + " operation error, channel is " + channel,
                                    e);
                        }
                        break;
                    case DISCONNECTED:
                        try {
                            handler.disconnected(channel);
                        } catch (Exception e) {
                            logger.warn(
                                    INTERNAL_ERROR,
                                    "unknown error in remoting module",
                                    "",
                                    "ChannelEventRunnable handle " + state + " operation error, channel is " + channel,
                                    e);
                        }
                        break;
                    case SENT:
                        try {
                            handler.sent(channel, message);
                        } catch (Exception e) {
                            logger.warn(
                                    INTERNAL_ERROR,
                                    "unknown error in remoting module",
                                    "",
                                    "ChannelEventRunnable handle " + state + " operation error, channel is " + channel
                                            + ", message is " + message,
                                    e);
                        }
                        break;
                    case CAUGHT:
                        try {
                            handler.caught(channel, exception);
                        } catch (Exception e) {
                            logger.warn(
                                    INTERNAL_ERROR,
                                    "unknown error in remoting module",
                                    "",
                                    "ChannelEventRunnable handle " + state + " operation error, channel is " + channel
                                            + ", message is: " + message + ", exception is " + exception,
                                    e);
                        }
                        break;
                    default:
                        logger.warn(
                                INTERNAL_ERROR,
                                "unknown error in remoting module",
                                "",
                                "unknown state: " + state + ", message is " + message);
                }
            }
        } finally {
            InternalThreadLocalMap.set(internalThreadLocalMap);
        }
    }