class ThreadPoolEndpoint {

    private final ThreadPoolGovernor threadPoolGovernor;

    public ThreadPoolEndpoint(ThreadPoolGovernor threadPoolGovernor) {
        this.threadPoolGovernor = threadPoolGovernor;
    }

    @ReadOperation
    public ThreadPoolsDescriptor threadPools () {<FILL_FUNCTION_BODY>}

    private ThreadPoolInfo convertToThreadPoolInfo(ThreadPoolMonitorWrapper wrapper) {
        ThreadPoolConfig threadPoolConfig = wrapper.getThreadPoolConfig();
        String threadPoolName = threadPoolConfig.getThreadPoolName();
        String spaceName = threadPoolConfig.getSpaceName();
        long period = threadPoolConfig.getPeriod();
        long taskTimeout = threadPoolConfig.getTaskTimeoutMilli();

        ThreadPoolExecutor threadPoolExecutor = wrapper.getThreadPoolExecutor();
        String threadPoolClassName = threadPoolExecutor.getClass().getName();
        int coreSize = threadPoolExecutor.getCorePoolSize();
        int maxSize = threadPoolExecutor.getMaximumPoolSize();
        int queueSize = threadPoolExecutor.getQueue().size();
        int queueRemainingCapacity = threadPoolExecutor.getQueue().remainingCapacity();
        String queueClassName = threadPoolExecutor.getQueue().getClass().getName();

        return new ThreadPoolInfo(threadPoolName, spaceName, threadPoolClassName, coreSize, maxSize, queueClassName, queueSize, queueRemainingCapacity, period, taskTimeout);
    }

    public record ThreadPoolsDescriptor(List<ThreadPoolInfo> threadPoolInfoList) implements OperationResponseBody {}

    public record ThreadPoolInfo(String threadPoolName,
                                 String spaceName,

                                 String threadPoolClassName,
                                 int coreSize,
                                 int maxSize,
                                 String queueClassName,
                                 int queueSize,
                                 int queueRemainingCapacity,
                                 long monitorPeriod,
                                 long taskTimeout) {}
}

        Collection<ThreadPoolMonitorWrapper> threadPoolWrappers = threadPoolGovernor.getAllThreadPoolWrappers();

        List<ThreadPoolInfo> threadPoolInfoList = threadPoolWrappers.stream().map(this::convertToThreadPoolInfo).toList();
        return new ThreadPoolsDescriptor(threadPoolInfoList);
    
<no_super_class>