0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
ConnectionHandlerFactory.h
Go to the documentation of this file.
1 /* -*- c++ -*-
2  * Copyright (C) 2007-2015 Hypertable, Inc.
3  *
4  * This file is part of Hypertable.
5  *
6  * Hypertable is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; either version 3
9  * of the License, or any later version.
10  *
11  * Hypertable is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19  * 02110-1301, USA.
20  */
21 
22 #ifndef FsBroker_Lib_ConnectionHandlerFactory_h
23 #define FsBroker_Lib_ConnectionHandlerFactory_h
24 
25 #include "Broker.h"
26 #include "ConnectionHandler.h"
27 
30 #include <AsyncComm/Comm.h>
32 
33 namespace Hypertable {
34 namespace FsBroker {
35 namespace Lib {
36 
39 
50  public:
61  BrokerPtr &broker)
62  : m_comm(comm), m_app_queue(app_queue), m_broker(broker) { }
63 
67  virtual void get_instance(DispatchHandlerPtr &dhp) {
68  dhp = make_shared<ConnectionHandler>(m_comm, m_app_queue, m_broker);
69  }
70 
71  private:
74 
77 
80  };
81 
83 
84 }}}
85 
86 #endif // FsBroker_Lib_ConnectionHandlerFactory_h
Declarations for ConnectionHandlerFactory.
Abstract class for creating default application dispatch handlers.
BrokerPtr m_broker
Pointer to file system broker object.
Declarations for DispatchHandler.
std::shared_ptr< Broker > BrokerPtr
Smart pointer to Broker.
Definition: Broker.h:241
ConnectionHandlerFactory(Comm *comm, ApplicationQueuePtr &app_queue, BrokerPtr &broker)
Constructor.
Hypertable definitions
Entry point to AsyncComm service.
Definition: Comm.h:61
Declarations for Comm.
ApplicationQueuePtr m_app_queue
Application queue.
std::shared_ptr< DispatchHandler > DispatchHandlerPtr
Smart pointer to DispatchHandler.
virtual void get_instance(DispatchHandlerPtr &dhp)
Returns a newly constructed FsBroker::connection_handler object.
Declarations for ConnectionHandler.
This class serves as the connection handler factory.
Declarations for ApplicationQueue.
std::shared_ptr< ApplicationQueue > ApplicationQueuePtr
Shared smart pointer to ApplicationQueue object.