-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhandler.h
41 lines (33 loc) · 937 Bytes
/
handler.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/**
* @file handler.h
* @author Krzysztof Trzepla
* @copyright (C) 2016 ACK CYFRONET AGH
* @copyright This software is released under the MIT license cited in
* 'LICENSE.txt'
*/
#ifndef ONECLIENT_EVENTS_HANDLERS_HANDLER_H
#define ONECLIENT_EVENTS_HANDLERS_HANDLER_H
#include "events/declarations.h"
#include <functional>
#include <vector>
namespace one {
namespace client {
namespace events {
/**
* @c Handler class represents an abstract event stream layer responsible for
* handling aggregated events. It provides an interface for concrete event
* handlers.
*/
template <class T> class Handler {
public:
virtual ~Handler() = default;
/**
* Handles aggregated events.
* @param events Collection of aggregated events to be prcessed.
*/
virtual void process(Events<T> events) = 0;
};
} // namespace events
} // namespace client
} // namespace one
#endif // ONECLIENT_EVENTS_HANDLERS_HANDLER_H