![]() |
MAK RTIspy API Documentation for HLA 1516
|
Collaboration diagram for DtRtiForwarderGroup:Classes | |
| class | DtRtiForwarderGroupMember |
| Data-only helper class to store information about forwarders in the group. More... | |
Public Types | |
| typedef std::map < DtTcpMsgSocket *, DtRtiForwarderGroupMember * > | DtForwarderGroupConnectionList |
| typedef std::map < MAKRti::DtString, DtRtiForwarderGroupMember * > | DtForwarderGroupMemberList |
| typedef DtRtiForwarderGroup *(* | DtForwarderGroupCreatorFcn )(const MAKRti::DtString &, int) |
| DtForwarderPort creator signature. More... | |
Public Member Functions | |
| virtual | ~DtRtiForwarderGroup () |
| Destructor. More... | |
| virtual bool | addForwarderToGroup (const MAKRti::DtString &fwderName, const MAKRti::DtInetAddr &addr, const MAKRti::DtString &host, int connectPort=-1, const MAKRti::DtString &url=NULL, bool isPortal=false) |
| Add an unconnected forwarder to the group. More... | |
| virtual unsigned int | connectToPortal (const MAKRti::DtString &fwderName=NULL, bool ignorePortalFlag=false) |
| Add a connection to a portal (send-and-receive) forwarder in the group. More... | |
| virtual unsigned int | connectToPortal (DtTcpMsgSocket *socket, bool ignorePortalFlag=false) |
| virtual bool | connectToForwarder (const MAKRti::DtString &fwderName) |
| Add a connection to a non-portal (receive-only) forwarder in the group. More... | |
| virtual bool | connectToForwarder (DtTcpMsgSocket *socket) |
| virtual bool | disconnectFromForwarder (DtTcpMsgSocket *socket) |
| Disconnect from the specified forwarder, but don't remove from the group. More... | |
| virtual void | disconnectFromGroup () |
| Disconnect from all forwarders in the group. More... | |
| virtual bool | removeForwarder (const MAKRti::DtString &fwderName) |
| Remove (and disconnect if necessary) the specified forwarder from the group. More... | |
| virtual bool | removeForwarder (DtTcpMsgSocket *socket) |
| virtual void | dissolve () |
| Remove (and disconnect from) all forwarders in the group. More... | |
| virtual const DtForwarderGroupMemberList | members () const |
| Return the map of all forwarders (keyed by name) in the group. More... | |
| virtual bool | isMember (const MAKRti::DtString &fwderName) |
| Return true if the specified forwarder is a member of the group. More... | |
| virtual bool | isMember (const DtInetAddrAndPort &addr) |
| virtual bool | isMember (DtTcpMsgSocket *sock) |
| virtual const DtForwarderGroupConnectionList & | portalConnections () const |
| Return the map of portals (keyed by socket) (ie. More... | |
| virtual const DtForwarderGroupConnectionList & | connections () const |
| Return a map of all forwarders (keyed by socket) that messages may be received from (ie. More... | |
| virtual void | setConnectionManager (DtPeerToPeerTcpSockMgr *connMgr) |
| Set the connection manager if it is not provided in the ctor. More... | |
| virtual void | setDefaultPort (int port) |
| Change the group characteristics. More... | |
| virtual void | setForwarderInfo (const DtInetAddrAndPort &addr, const MAKRti::DtString &url=NULL, bool isPortal=false) |
| Change the group member characteristics. More... | |
| virtual void | setForwarderInfo (DtTcpMsgSocket *socket, const MAKRti::DtString &url=NULL, bool isPortal=false) |
| MAKRti::DtString | getForwarderNameByAddr (const DtInetAddrAndPort &addr) const |
| Return the name of the forwarder based on its IP address. More... | |
| DtInetAddrAndPort | getForwarderAddrByName (const MAKRti::DtString &fwderName) const |
| Return the IP address of the forwarder based on its name. More... | |
| virtual bool | forwarderIsAPortal (const MAKRti::DtString &fwderName) const |
| Return value indicates whether the specified group member is a portal (or at least capable of being one, even if it's not being used as the portal to this group at the moment) More... | |
| virtual unsigned int | portalCount () const |
| Return a count of portal connections to the group. More... | |
| virtual unsigned int | connectionCount () const |
| Return a count of all connections existing to the group. More... | |
| virtual unsigned int | memberCount () const |
| Return a count of all forwarders (connected or not) in the group. More... | |
| virtual const MAKRti::DtString & | groupName () const |
| Return the group name. More... | |
| virtual DtRtiForwarderGroup::DtRtiForwarderGroupMember * | nextAvailablePortal () |
| Get pointer to next portal available to accept connection from foreign forwarders in load-balance configurations. More... | |
| virtual bool | updateNextAvailablePortal () |
| Update next available portal to select next member in roster capable of acting as a portal. More... | |
Static Public Member Functions | |
| static DtRtiForwarderGroup * | create (const MAKRti::DtString &name, int defaultPort) |
| Creates an instance of a DtRtiForwarderGroup. More... | |
| static void | setCreatorFunction (DtForwarderGroupCreatorFcn creator) |
| Call this function to set an alternate creator function With this function, users can replace this DtRtiForwarderGroup with their own derived class. More... | |
Protected Member Functions | |
| DtRtiForwarderGroup (const MAKRti::DtString &name, int defaultPort) | |
| Constructor. Use create() to instantiate a new group object. More... | |
Protected Attributes | |
| MAKRti::DtString | myName |
| DtPeerToPeerTcpSockMgr * | myConnectionMgr |
| int | myDefaultPort |
| DtForwarderGroupConnectionList | myConnectionSocketMap |
| Connections keyed by socket. More... | |
| DtForwarderGroupMemberList | myConnectionRoster |
| Connections keyed by forwarder name. More... | |
| DtForwarderGroupMemberList | myRoster |
| Group member list keyed by forwarder name. More... | |
| DtForwarderGroupConnectionList | myPortalForwarders |
| Socket lists to simplify the task of determining where to transmit messages to (myPortalForwarders) and receive messages from (myConnectedForwarders). More... | |
| DtForwarderGroupConnectionList | myConnectedForwarders |
| DtRtiForwarderGroup::DtRtiForwarderGroupMember * | myNextAvailablePortal |
| Aid to keep track of which portal in group is next in line to accept connections from foreign groups in load-balanced configurations. More... | |
Static Protected Attributes | |
| static DtForwarderGroupCreatorFcn | theCreator |
| typedef std::map<DtTcpMsgSocket*, DtRtiForwarderGroupMember*> DtRtiForwarderGroup::DtForwarderGroupConnectionList |
| typedef DtRtiForwarderGroup*(* DtRtiForwarderGroup::DtForwarderGroupCreatorFcn)(const MAKRti::DtString &, int) |
DtForwarderPort creator signature.
| typedef std::map<MAKRti::DtString, DtRtiForwarderGroupMember*> DtRtiForwarderGroup::DtForwarderGroupMemberList |
|
protected |
Constructor. Use create() to instantiate a new group object.
|
virtual |
Destructor.
|
virtual |
Add an unconnected forwarder to the group.
Returns true if new forwarder added successfully, false if duplicate forwarder name found.
|
inlinevirtual |
Return a count of all connections existing to the group.
References myConnectedForwarders.
|
inlinevirtual |
Return a map of all forwarders (keyed by socket) that messages may be received from (ie.
all forwarders in this group with which a connection exists)
References myConnectedForwarders.
|
virtual |
Add a connection to a non-portal (receive-only) forwarder in the group.
If socket is supplied the peer forwarder must have initiated the connection. Otherwise if the specified forwarder accepts incoming connections a new connection will be initiated. Returns true if connection successful.
|
virtual |
|
virtual |
Add a connection to a portal (send-and-receive) forwarder in the group.
Returns the number of 'portal' connections already established to the group. If the first form is used and the forwarder name is not supplied next group member in the roster capable of acting as a portal will be selected. The second form is to be used when the remote forwarder has initiated the connection. Note: all forwarders in the local host's group will be considered 'portal' forwarders in order that all forwarders in the same group will be fully-connected to other members of the group.
|
virtual |
|
static |
Creates an instance of a DtRtiForwarderGroup.
|
virtual |
Disconnect from the specified forwarder, but don't remove from the group.
|
virtual |
Disconnect from all forwarders in the group.
|
virtual |
Remove (and disconnect from) all forwarders in the group.
|
virtual |
Return value indicates whether the specified group member is a portal (or at least capable of being one, even if it's not being used as the portal to this group at the moment)
| DtInetAddrAndPort DtRtiForwarderGroup::getForwarderAddrByName | ( | const MAKRti::DtString & | fwderName | ) | const |
Return the IP address of the forwarder based on its name.
| MAKRti::DtString DtRtiForwarderGroup::getForwarderNameByAddr | ( | const DtInetAddrAndPort & | addr | ) | const |
Return the name of the forwarder based on its IP address.
|
inlinevirtual |
Return the group name.
References myName.
|
virtual |
Return true if the specified forwarder is a member of the group.
|
virtual |
|
virtual |
|
inlinevirtual |
Return a count of all forwarders (connected or not) in the group.
References myRoster.
|
virtual |
Return the map of all forwarders (keyed by name) in the group.
Referenced by nextAvailablePortal().
|
inlinevirtual |
Get pointer to next portal available to accept connection from foreign forwarders in load-balance configurations.
References members(), and myNextAvailablePortal.
|
inlinevirtual |
Return the map of portals (keyed by socket) (ie.
forwarders in this group that messages will be sent to)
References myPortalForwarders.
|
inlinevirtual |
Return a count of portal connections to the group.
References myPortalForwarders.
|
virtual |
Remove (and disconnect if necessary) the specified forwarder from the group.
|
virtual |
|
virtual |
Set the connection manager if it is not provided in the ctor.
|
static |
Call this function to set an alternate creator function With this function, users can replace this DtRtiForwarderGroup with their own derived class.
|
inlinevirtual |
Change the group characteristics.
References myDefaultPort.
|
virtual |
Change the group member characteristics.
If a connection (socket) to the specified forwarder already exists it will be maintained. However if no connection exists no attempt will be made to initiate a new one. Only the URL and portal designation flag are alterable. This should be sufficient to allow 'replacement' portals to be designated on-the-fly if future needs dictate.
|
virtual |
|
virtual |
Update next available portal to select next member in roster capable of acting as a portal.
Wraps around to beginning of roster if necessary. This routine is primarily intended to aid setup of forwarder networks employing load-balancing between groups over the WAN, which implies that there will be more than one portal in each Forwarder Group.
|
protected |
Referenced by connectionCount(), and connections().
|
protected |
|
protected |
Connections keyed by forwarder name.
|
protected |
Connections keyed by socket.
|
protected |
Referenced by setDefaultPort().
|
protected |
Referenced by groupName().
|
protected |
Aid to keep track of which portal in group is next in line to accept connections from foreign groups in load-balanced configurations.
Referenced by nextAvailablePortal().
|
protected |
Socket lists to simplify the task of determining where to transmit messages to (myPortalForwarders) and receive messages from (myConnectedForwarders).
Referenced by portalConnections(), and portalCount().
|
protected |
Group member list keyed by forwarder name.
Referenced by memberCount().
|
staticprotected |