NebulaStream  0.6.213
NebulaStream is a data and application management framework for the internet of things
NES::RestServer Class Reference

: This class is responsible for starting the REST server. More...

#include <RestServer.hpp>

Public Member Functions

 RestServer (std::string host, uint16_t port, NesCoordinatorWeakPtr coordinator, Catalogs::Query::QueryCatalogPtr queryCatalog, TopologyPtr topology, Optimizer::GlobalExecutionPlanPtr globalExecutionPlan, RequestHandlerServicePtr requestHandlerService, MonitoringServicePtr monitoringService, QueryParsingServicePtr queryParsingService, GlobalQueryPlanPtr globalQueryPlan, Catalogs::UDF::UDFCatalogPtr udfCatalog, Runtime::BufferManagerPtr bufferManager, std::optional< std::string > corsAllowedOrigin)
 constructor for rest server More...
 
bool start ()
 method to start the rest server, calls run() internally More...
 
void run ()
 method called within start() starts the server after initializing controllers, endpoints and necessary components like connection handler, router. More...
 
bool stop ()
 method to stop rest server More...
 

Detailed Description

: This class is responsible for starting the REST server.

Constructor & Destructor Documentation

◆ RestServer()

NES::RestServer::RestServer ( std::string  host,
uint16_t  port,
NesCoordinatorWeakPtr  coordinator,
Catalogs::Query::QueryCatalogPtr  queryCatalog,
TopologyPtr  topology,
Optimizer::GlobalExecutionPlanPtr  globalExecutionPlan,
RequestHandlerServicePtr  requestHandlerService,
MonitoringServicePtr  monitoringService,
QueryParsingServicePtr  queryParsingService,
GlobalQueryPlanPtr  globalQueryPlan,
Catalogs::UDF::UDFCatalogPtr  udfCatalog,
Runtime::BufferManagerPtr  bufferManager,
std::optional< std::string >  corsAllowedOrigin 
)

constructor for rest server

Parameters
host
port
coordinator
queryCatalog
sourceCatalogService
topology
globalExecutionPlan
requestHandlerService
monitoringService
queryParsingService
globalQueryPlan
udfCatalog
bufferManager
corsAllowedOrigin

Member Function Documentation

◆ run()

void NES::RestServer::run ( )

method called within start() starts the server after initializing controllers, endpoints and necessary components like connection handler, router.

References NES::REST::Controller::QueryCatalogController::create(), NES::REST::Controller::MonitoringController::create(), NES::REST::Controller::QueryController::create(), NES::REST::Controller::SourceCatalogController::create(), NES::REST::Controller::ConnectivityController::create(), NES::REST::Controller::LocationController::create(), NES::REST::Controller::TopologyController::create(), NES::REST::Controller::UDFCatalogController::create(), NES_DEBUG, and NES_INFO.

Referenced by start().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ start()

bool NES::RestServer::start ( )

method to start the rest server, calls run() internally

Returns
bool indicating success

References NES::RestServerInterruptHandler::hookUserInterruptHandler(), NES_FATAL_ERROR, NES_INFO, and run().

Here is the call graph for this function:

◆ stop()

bool NES::RestServer::stop ( )

method to stop rest server

Returns
bool indicating sucesss

The documentation for this class was generated from the following files: