7#ifndef CMD_HTTP_LISTENER_H
8#define CMD_HTTP_LISTENER_H
37 const uint16_t thread_pool_size = 1,
40 std::unordered_set<std::string> command_accept_list = {});
104 return (thread_pool_size_);
111 return (tls_context_);
122 return (thread_pool_->getThreadCount());
131 return (thread_io_service_);
138 return (http_auth_config_);
145 return (command_accept_list_);
162 std::size_t thread_pool_size_;
174 std::unordered_set<std::string> command_accept_list_;
The IOAddress class represents an IP addresses (version agnostic).
CmdHttpListener(const asiolink::IOAddress &address, const uint16_t port, const uint16_t thread_pool_size=1, asiolink::TlsContextPtr context=asiolink::TlsContextPtr(), http::HttpAuthConfigPtr http_auth_config=http::HttpAuthConfigPtr(), std::unordered_set< std::string > command_accept_list={})
Constructor.
uint16_t getThreadCount() const
Fetches the number of threads in the pool.
std::unordered_set< std::string > getCommandAcceptList() const
Fetches the command accept list.
http::HttpAuthConfigPtr getAuthConfig() const
Fetches the authentication configuration.
uint16_t getThreadPoolSize() const
Fetches the maximum size of the thread pool.
uint16_t getPort() const
Fetches the port number on which to listen.
void checkPermissions()
Check if the current thread can perform thread pool state transition.
isc::asiolink::IOAddress getAddress() const
Fetches the IP address on which to listen.
void start()
Starts running the listener's thread pool.
virtual ~CmdHttpListener()
Destructor.
asiolink::TlsContextPtr getTlsContext() const
Fetches the TLS context.
bool isPaused()
Indicates if the thread pool is paused.
asiolink::IOServicePtr getThreadIOService() const
Fetches a pointer to the internal IOService used to drive the thread-pool in multi-threaded mode.
void pause()
Pauses the listener's thread pool.
void resume()
Resumes running the listener's thread pool.
bool isRunning()
Indicates if the thread pool is running.
void stop()
Stops the listener's thread pool.
bool isStopped()
Indicates if the thread pool is stopped.
boost::shared_ptr< TlsContext > TlsContextPtr
The type of shared pointers to TlsContext objects.
boost::shared_ptr< IoServiceThreadPool > IoServiceThreadPoolPtr
Defines a pointer to a thread pool.
boost::shared_ptr< IOService > IOServicePtr
Defines a smart pointer to an IOService instance.
boost::shared_ptr< CmdHttpListener > CmdHttpListenerPtr
Defines a shared pointer to CmdHttpListener.
boost::shared_ptr< HttpAuthConfig > HttpAuthConfigPtr
Type of shared pointers to HTTP authentication configuration.
boost::shared_ptr< HttpListener > HttpListenerPtr
Pointer to the HttpListener.
Defines the logger used by the top-level component of kea-lfc.