#include <listen.h>
Public Types | |
typedef std::pair< const std::string, const std::string > | map_key |
typedef std::map< const map_key, plugin::Plugin * > | map |
typedef std::vector< Plugin * > | vector |
Public Member Functions | |
Listen (std::string name_arg) | |
std::vector< ListenCounter * > & | getListenCounters () |
virtual bool | getFileDescriptors (std::vector< int > &fds)=0 |
virtual plugin::Client * | getClient (int fd)=0 |
virtual void | shutdownPlugin () |
virtual void | prime () |
virtual void | startup (drizzled::Session &) |
void | activate () |
void | deactivate () |
bool | isActive () const |
const std::string & | getName () const |
void | setModule (module::Module *module) |
const std::string & | getTypeName () const |
virtual bool | removeLast () const |
const std::string & | getModuleName () const |
Static Public Member Functions | |
static ListenVector & | getListenProtocols () |
static bool | addPlugin (Listen *listen_obj) |
static void | removePlugin (Listen *listen_obj) |
static bool | setup (void) |
static plugin::Client * | getClient (void) |
static plugin::Client * | getNullClient (void) |
static void | shutdown (void) |
Protected Attributes | |
std::vector< ListenCounter * > | counters |
Private Member Functions | |
Listen (const Listen &) | |
Listen & | operator= (const Listen &) |
This class is used by client plugins to provide and manage the listening interface for new client instances.
bool drizzled::plugin::Listen::addPlugin | ( | plugin::Listen * | listen_obj | ) | [static] |
Client * drizzled::plugin::Listen::getClient | ( | void | ) | [static] |
virtual plugin::Client* drizzled::plugin::Listen::getClient | ( | int | fd | ) | [pure virtual] |
This provides a new Client object that can be used by a Session.
[in] | fd | File descriptor that had activity. |
Implemented in drizzle_plugin::drizzle_protocol::ListenDrizzleProtocol, drizzle_plugin::ListenMySQLProtocol, and drizzle_plugin::mysql_unix_socket_protocol::Protocol.
virtual bool drizzled::plugin::Listen::getFileDescriptors | ( | std::vector< int > & | fds | ) | [pure virtual] |
This provides a list of file descriptors to watch that will trigger new Client instances. When activity is detected on one of the returned file descriptors, getClient will be called with the file descriptor. [out] Vector of file descriptors to watch for activity.
true | on failure, false on success. |
Implemented in drizzled::plugin::ListenTcp, and drizzle_plugin::mysql_unix_socket_protocol::Protocol.
Client * drizzled::plugin::Listen::getNullClient | ( | void | ) | [static] |
void drizzled::plugin::Listen::removePlugin | ( | plugin::Listen * | listen_obj | ) | [static] |
bool drizzled::plugin::Listen::setup | ( | void | ) | [static] |
void drizzled::plugin::Listen::shutdown | ( | void | ) | [static] |