class SofaDtpAdapter extends AbstractDtpAdapter {

    private static final String TP_PREFIX = "sofaTp";

    private static final String SERVER_CONFIG_FIELD = "serverConfig";

    private static final String USER_THREAD_FIELD = "userThreadMap";

    private static final String USER_THREAD_EXECUTOR_FIELD = "executor";

    private static final String BIZ_THREAD_POOL = "bizThreadPool";

    @Override
    public void refresh(DtpProperties dtpProperties) {
        refresh(dtpProperties.getSofaTp(), dtpProperties.getPlatforms());
    }

    @Override
    protected String getTpPrefix() {
        return TP_PREFIX;
    }

    @Override
    protected void initialize() {<FILL_FUNCTION_BODY>}

    private void handleUserThreadPools() {
        try {
            Field f = UserThreadPoolManager.class.getDeclaredField(USER_THREAD_FIELD);
            f.setAccessible(true);
            val userThreadMap = (Map<String, UserThreadPool>) f.get(null);
            if (MapUtils.isNotEmpty(userThreadMap)) {
                userThreadMap.forEach((k, v) -> {
                    String tpName = TP_PREFIX + "#" + k;
                    enhanceOriginExecutor(tpName, v.getExecutor(), USER_THREAD_FIELD, v);
                });
            }
        } catch (Exception e) {
            log.warn("UserThreadPoolManager handles failed", e);
        }
    }
}

        super.initialize();

        List<Server> servers = ServerFactory.getServers();
        boolean hasUserThread = UserThreadPoolManager.hasUserThread();
        if (CollectionUtils.isEmpty(servers) && !hasUserThread) {
            log.warn("Empty servers and empty user thread pools.");
            return;
        }
        servers.forEach(v -> {
            ThreadPoolExecutor executor = null;
            ServerConfig serverConfig = null;
            if (v instanceof BoltServer) {
                BoltServer server = (BoltServer) v;
                executor = server.getBizThreadPool();
                serverConfig = (ServerConfig) ReflectionUtil.getFieldValue(BoltServer.class,
                        SERVER_CONFIG_FIELD, server);
            } else if (v instanceof AbstractHttpServer) {
                AbstractHttpServer server = (AbstractHttpServer) v;
                executor = server.getBizThreadPool();
                serverConfig = (ServerConfig) ReflectionUtil.getFieldValue(AbstractHttpServer.class,
                        SERVER_CONFIG_FIELD, server);
            }
            if (Objects.isNull(executor) || Objects.isNull(serverConfig)) {
                return;
            }
            String tpName = TP_PREFIX + "#" + serverConfig.getProtocol() + "#" + serverConfig.getPort();
            enhanceOriginExecutor(tpName, executor, BIZ_THREAD_POOL, v);
        });

        if (hasUserThread) {
            handleUserThreadPools();
        }
    
<methods>public non-sealed void <init>() ,public Map<java.lang.String,org.dromara.dynamictp.core.support.ExecutorWrapper> getExecutorWrappers() ,public List<org.dromara.dynamictp.common.entity.ThreadPoolStats> getMultiPoolStats() ,public void refresh(List<org.dromara.dynamictp.common.entity.TpExecutorProps>, List<org.dromara.dynamictp.common.entity.NotifyPlatform>) ,public void refresh(org.dromara.dynamictp.core.support.ExecutorWrapper, List<org.dromara.dynamictp.common.entity.NotifyPlatform>, org.dromara.dynamictp.common.entity.TpExecutorProps) <variables>private static final Equator EQUATOR,protected final Map<java.lang.String,org.dromara.dynamictp.core.support.ExecutorWrapper> executors