RSB  0.7.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ReceiverTask.h
Go to the documentation of this file.
1 /* ============================================================
2  *
3  * This file is a part of the RSB project
4  *
5  * Copyright (C) 2010 by Sebastian Wrede <swrede at techfak dot uni-bielefeld dot de>
6  * Copyright (C) 2012 Jan Moringen <jmoringe@techfak.uni-bielfeld.de>
7  *
8  * This file may be licensed under the terms of the
9  * GNU Lesser General Public License Version 3 (the ``LGPL''),
10  * or (at your option) any later version.
11  *
12  * Software distributed under the License is distributed
13  * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
14  * express or implied. See the LGPL for the specific language
15  * governing rights and limitations.
16  *
17  * You should have received a copy of the LGPL along with this
18  * program. If not, go to http://www.gnu.org/licenses/lgpl.html
19  * or write to the Free Software Foundation, Inc.,
20  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21  *
22  * The development of this software was supported by:
23  * CoR-Lab, Research Institute for Cognition and Robotics
24  * Bielefeld University
25  *
26  * ============================================================ */
27 
28 #pragma once
29 
30 #include <map>
31 
32 #include <boost/thread.hpp>
33 
34 #include <rsc/logging/Logger.h>
35 #include <rsc/threading/RepetitiveTask.h>
36 #include <rsc/misc/UUID.h>
37 
38 #include "../../Event.h"
39 
40 #include "../../eventprocessing/Handler.h"
41 
42 #include "../../converter/Converter.h"
43 #include "../../converter/Repository.h"
44 
45 #include "../../protocol/Notification.h"
46 #include "../../protocol/FragmentedNotification.h"
47 
48 #include "../Connector.h"
49 
50 #include "SpreadConnection.h"
51 #include "InPushConnector.h"
52 #include "Assembly.h"
53 
54 namespace rsb {
55 namespace spread {
56 
57 class InPushConnector;
58 
74 class ReceiverTask: public rsc::threading::RepetitiveTask {
75 public:
76 
80  virtual ~ReceiverTask();
81 
82  void execute();
84 
92  void setPruning(const bool& pruning);
93 
94 private:
95 
103  void notifyHandler(protocol::NotificationPtr notification);
104 
115 
116  rsc::logging::LoggerPtr logger;
117 
120 
122 
124  boost::recursive_mutex handlerMutex;
125 };
126 
127 }
128 }