from concurrent.futures.thread import ThreadPoolExecutor

import aiohttp

from clarabot_nano.common.zmq.requester import AioClientRequester
from clarabot_nano.server.base.handler.base import ServerHandleHelper
from clarabot_nano.server.general.solr.reflect import SolrSchemaQueryReflector


class GeneralServerHandleHelper(ServerHandleHelper, SolrSchemaQueryReflector):
    """
    Solr schema reflection and core-requester.
    """

    def __init__(self, pool: ThreadPoolExecutor, session: aiohttp.ClientSession, core_requester: AioClientRequester):
        ServerHandleHelper.__init__(self, pool)
        SolrSchemaQueryReflector.__init__(self)
        self.session = session
        self.core_requester = core_requester


# class AbstractGeneralNanoHandler(AbstractNanoHandler):
#     # fix type hinting
#     helper: GeneralServerHandleHelper
