Free Electron
SignalReceiver.h
Go to the documentation of this file.
1 /* Copyright (C) 2003-2021 Free Electron Organization
2  Any use of this software requires a license. If a valid license
3  was not distributed with this file, visit freeelectron.org. */
4 
5 /** @file */
6 
7 #ifndef __netsignal_SignalReceiver_h__
8 #define __netsignal_SignalReceiver_h__
9 
10 #include <sstream>
11 namespace fe
12 {
13 namespace ext
14 {
15 
16 /** Receives signals over a given Socket.
17 
18  This class is intended to be used in conjuction with SignalSender.
19 
20  There are two types of messages,
21  layout descriptions and record data. If a layout description
22  is read, internal setup for receiving record of that layout is done.
23  If record data is read, and the layout description has been received
24  then the record is created and used as a signal to the associated
25  signaler.
26 
27  @copydoc SignalReceiver_info
28  */
30  virtual public HandlerI
31 {
32  public:
33  SignalReceiver(sp<Scope> spScope, sp<ChunkSpool> spChunkSpool);
34 virtual ~SignalReceiver(void);
35 
36 virtual void handle(Record &signal);
37 virtual void handleBind(sp<SignalerI> spSignalerI, sp<Layout> spLayout);
38 
39  private:
40  sp<SignalerI> m_spSignalerI;
41  sp<Scope> m_spScope;
42  sp<ChunkSpool> m_spChunkSpool;
43  sp<data::StreamI> m_spStream;
44  sp<RecordGroup> m_spRG;
45 
46 };
47 
48 } /* namespace ext */
49 } /* namespace fe */
50 
51 #endif /* __netsignal_SignalReceiver_h__ */
52 
kernel
Definition: namespace.dox:3
Interface to handle signals from an SignalerI.
Definition: HandlerI.h:22
Receives signals over a given Socket.
Definition: SignalReceiver.h:29
Reference to an instance of a Layout.
Definition: RecordSB.h:35