8 #ifndef DtForwarderGroup_H_
9 #define DtForwarderGroup_H_
17 #include <vlutil/vlString.h>
39 const MAKRti::DtString& host,
unsigned int port,
DtTcpMsgSocket* socket,
40 const MAKRti::DtString& url,
bool isPortal ) :
47 myAcceptRemoteConnection( isPortal )
71 virtual bool addForwarderToGroup(
const MAKRti::DtString& fwderName,
72 const MAKRti::DtInetAddr& addr,
const MAKRti::DtString& host,
73 int connectPort = -1,
const MAKRti::DtString& url = NULL,
74 bool isPortal =
false);
84 virtual unsigned int connectToPortal(
const MAKRti::DtString& fwderName = NULL,
85 bool ignorePortalFlag =
false );
87 bool ignorePortalFlag =
false );
94 virtual bool connectToForwarder(
const MAKRti::DtString& fwderName );
101 virtual void disconnectFromGroup();
105 virtual bool removeForwarder(
const MAKRti::DtString& fwderName );
109 virtual void dissolve();
115 virtual bool isMember(
const MAKRti::DtString& fwderName );
132 virtual void setDefaultPort(
int port );
140 virtual void setForwarderInfo(
const DtInetAddrAndPort& addr,
const MAKRti::DtString& url = NULL,
141 bool isPortal =
false);
142 virtual void setForwarderInfo(
DtTcpMsgSocket* socket,
const MAKRti::DtString& url = NULL,
143 bool isPortal =
false);
149 DtInetAddrAndPort getForwarderAddrByName(
const MAKRti::DtString& fwderName )
const;
154 virtual bool forwarderIsAPortal(
const MAKRti::DtString& fwderName )
const;
157 virtual unsigned int portalCount()
const;
160 virtual unsigned int connectionCount()
const;
163 virtual unsigned int memberCount()
const;
166 virtual const MAKRti::DtString& groupName()
const;
177 virtual bool updateNextAvailablePortal();
189 static void setCreatorFunction( DtForwarderGroupCreatorFcn creator );
DtForwarderGroupConnectionList myPortalForwarders
Socket lists to simplify the task of determining where to transmit messages to (myPortalForwarders) a...
Definition: forwarderGroup.h:206
std::pair< MAKRti::DtInetAddr, int > DtInetAddrAndPort
Definition: rtiUtil.h:148
virtual DtRtiForwarderGroup::DtRtiForwarderGroupMember * nextAvailablePortal()
Get pointer to next portal available to accept connection from foreign forwarders in load-balance con...
Definition: forwarderGroup.h:254
static DtForwarderGroupCreatorFcn theCreator
Definition: forwarderGroup.h:215
MAKRti::DtInetAddr myAddr
Definition: forwarderGroup.h:57
bool myAcceptRemoteConnection
Definition: forwarderGroup.h:62
DtForwarderGroupConnectionList myConnectionSocketMap
Connections keyed by socket.
Definition: forwarderGroup.h:197
The DtPeerToPeerTcpSockMgr adds the ability to act as a client as well as a server to the DtTcpMsgSoc...
Definition: peerToPeerSockMgr.h:45
DtRtiForwarderGroupMember(const MAKRti::DtString &name, const MAKRti::DtInetAddr &addr, const MAKRti::DtString &host, unsigned int port, DtTcpMsgSocket *socket, const MAKRti::DtString &url, bool isPortal)
Definition: forwarderGroup.h:38
virtual void setDefaultPort(int port)
Change the group characteristics.
Definition: forwarderGroup.h:219
Data-only helper class to store information about forwarders in the group.
Definition: forwarderGroup.h:35
virtual const DtForwarderGroupConnectionList & connections() const
Return a map of all forwarders (keyed by socket) that messages may be received from (ie...
Definition: forwarderGroup.h:229
MAKRti::DtString myName
Definition: forwarderGroup.h:56
std::map< MAKRti::DtString, DtRtiForwarderGroupMember * > DtForwarderGroupMemberList
Definition: forwarderGroup.h:66
DtRtiForwarderGroup::DtRtiForwarderGroupMember * myNextAvailablePortal
Aid to keep track of which portal in group is next in line to accept connections from foreign groups ...
Definition: forwarderGroup.h:211
virtual const DtForwarderGroupConnectionList & portalConnections() const
Return the map of portals (keyed by socket) (ie.
Definition: forwarderGroup.h:224
DtPeerToPeerTcpSockMgr * myConnectionMgr
Definition: forwarderGroup.h:193
virtual unsigned int memberCount() const
Return a count of all forwarders (connected or not) in the group.
Definition: forwarderGroup.h:244
int myDefaultPort
Definition: forwarderGroup.h:194
virtual unsigned int portalCount() const
Return a count of portal connections to the group.
Definition: forwarderGroup.h:234
virtual const DtForwarderGroupMemberList members() const
Return the map of all forwarders (keyed by name) in the group.
virtual const MAKRti::DtString & groupName() const
Return the group name.
Definition: forwarderGroup.h:249
This file contains the declaration of the DtPeerToPeerTcpSockMgr class.
DtForwarderGroupConnectionList myConnectedForwarders
Definition: forwarderGroup.h:207
~DtRtiForwarderGroupMember()
Definition: forwarderGroup.h:50
DtForwarderGroupMemberList myConnectionRoster
Connections keyed by forwarder name.
Definition: forwarderGroup.h:199
The DtTcpMsgSocket class provides an address family independent TCP socket that handles RTI messages...
Definition: tcpMsgSocket.h:40
MAKRti::DtString myName
Definition: forwarderGroup.h:192
MAKRti::DtString myUrl
Definition: forwarderGroup.h:61
DtTcpMsgSocket * mySocket
Definition: forwarderGroup.h:60
DtForwarderGroupMemberList myRoster
Group member list keyed by forwarder name.
Definition: forwarderGroup.h:201
Definition: forwarderGroup.h:23
virtual unsigned int connectionCount() const
Return a count of all connections existing to the group.
Definition: forwarderGroup.h:239
MAKRti::DtString myHost
Definition: forwarderGroup.h:58
#define DT_DLL_FORWARDER
Definition: rtiMsConfig.h:153
std::map< DtTcpMsgSocket *, DtRtiForwarderGroupMember * > DtForwarderGroupConnectionList
Definition: forwarderGroup.h:65
unsigned int myPort
Definition: forwarderGroup.h:59