//
// Created by rhetenor on 4/15/19.
//

#ifndef FLIPPR_CODE_OUTPUTREQUESTHANDLERFACTORY_H
#define FLIPPR_CODE_OUTPUTREQUESTHANDLERFACTORY_H

#include <Poco/Net/HTTPRequestHandlerFactory.h>
#include <memory>

#include "output/OutputDriver.h"

namespace flippR_driver
{
namespace networking
{

class OutputRequestHandlerFactory : public Poco::Net::HTTPRequestHandlerFactory
{
public:
  explicit OutputRequestHandlerFactory(std::shared_ptr<output::OutputDriver> output_driver);
  Poco::Net::HTTPRequestHandler* createRequestHandler(const Poco::Net::HTTPServerRequest& request) override;

private:
  std::shared_ptr<output::OutputDriver> output_driver;
};

}
}

#endif //FLIPPR_CODE_OUTPUTREQUESTHANDLERFACTORY_H
