libbgp  0.6
A C++ BGP Library.
route-event-receiver.h
Go to the documentation of this file.
1 
11 #ifndef ROUTE_EV_RECV_H_
12 #define ROUTE_EV_RECV_H_
13 #include "route-event-bus.h"
14 
15 namespace libbgp {
16 
17 class RouteEventBus;
18 
33  friend class RouteEventBus;
34 
35 public:
36  RouteEventReceiver() { subscription_id = 0; }
37  virtual ~RouteEventReceiver() {};
38 
39 protected:
40 
41  // handle a route event
42  // return:
43  // true: event handled
44  // false: event not handled
45 
53  virtual bool handleRouteEvent(const RouteEvent &ev) = 0;
54 private:
55  int subscription_id;
56 };
57 
66 }
67 
68 #endif // ROUTE_EV_RECV_H_
The route event bus.
virtual bool handleRouteEvent(const RouteEvent &ev)=0
Handle the route event.
The RouteEventBus class.
Definition: bgp-afi.h:14
The RouteEventReceiver interface.
The RouteEvent base.
Definition: route-event.h:39