-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAlmMulticastPublisher.h
More file actions
53 lines (36 loc) · 1.5 KB
/
Copy pathAlmMulticastPublisher.h
File metadata and controls
53 lines (36 loc) · 1.5 KB
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
42
43
44
45
46
47
48
49
#ifndef MicroMiddleware_AlmMulticastPublisher_h_Included
#define MicroMiddleware_AlmMulticastPublisher_h_Included
#include"MicroMiddleware/IncludeExtLibs.h"
#include"MicroMiddleware/NetObjects/InterfaceHandle.h"
#include"MicroMiddleware/NetObjects/GroupHandle.h"
#include"MicroMiddleware/NetObjects/GroupInformation.h"
#include"MicroMiddleware/Export.h"
namespace MicroMiddleware
{
class AlmPublisher;
class RpcIdentifier;
class RmiObjectBase;
// Keep track of neighbors to publish/forward data too
// This class is accessed from AlmForwarder and the publisher implementation of an interface.
class DLL_STATE AlmMulticastPublisher
{
public:
AlmMulticastPublisher(const InterfaceHandle &multicastServer)
: multicastServerInterface_(multicastServer)
{ }
virtual ~AlmMulticastPublisher()
{}
typedef map<ClientTriplet, AlmPublisher*> MapClientTripletAlmPublisher;
typedef map<string, MapClientTripletAlmPublisher> MapGroupNameAlmPublisher;
MapClientTripletAlmPublisher& GetRpcGroup(const string &groupName);
void ExecuteRpc(RpcIdentifier *rpc, RmiObjectBase *rpcObject, const string &groupName);
void AddOrRemoveMulticastClients(GroupInformation &groupInfo);
void AddMulticastClient(const GroupHandle &handle);
void RemoveMulticastClient(const GroupHandle &handle);
protected:
InterfaceHandle multicastServerInterface_;
mutable Mutex clientMutex_;
MapGroupNameAlmPublisher mapGroupNameAlmPublisher_;
};
}; // namespace MicroMiddleware
#endif // MicroMiddleware_AlmMulticastPublisher_h_Included