NLNET::CStandardGateway Class Reference

The standard gateway that interconnect module across process. More...

Inherits NLNET::CModuleBase, NLNET::CModuleGateway, and NLNET::CModuleSocket.

List of all members.

Classes

struct  TKnownModuleInfo
 A structure to hold foreign proxy information. More...

Public Member Functions

 CStandardGateway ()
 ~CStandardGateway ()
CModuleProxygetModuleProxy (TModuleId proxyId)
virtual const std::string & getGatewayName () const
 Return the local name of the gateway.
virtual const std::string & getFullyQualifiedGatewayName () const
 Return the Fully Qualified Gateway Name (FQGN).
virtual void createTransport (const std::string &transportClass, const std::string &instanceName)
 Create and bind to this gateway a new transport.
virtual void deleteTransport (const std::string &instanceName)
 Delete a transport (this will close any open route).
virtual void setTransportPeerInvisible (const std::string &transportInstanceName, bool peerInvisible)
 Activate/stop peer invisible mode on a transport.
virtual void setTransportFirewallMode (const std::string &transportInstanceName, bool firewalled) throw (EGatewayFirewallBreak)
 Activate/stop firewalling mode on a transport.
virtual void transportCommand (const TParsedCommandLine &commandLine)
 Send a command to a transport.
virtual IGatewayTransportgetGatewayTransport (const std::string &transportName) const
 Return a pointer on the named transport interface, or NULL if the transport is unknown.
virtual uint32 getTransportCount () const
 Return the number of transport currently active on this gateway.
virtual uint32 getRouteCount () const
 Return the number route available.
virtual uint32 getReceivedPingCount () const
 Return the number of ping received. This is incremented by special "GW_PING" message for unit testing.
virtual void onRouteAdded (CGatewayRoute *route)
 A new route a added by a transport.
virtual void onRouteRemoved (CGatewayRoute *route)
 A route is removed by a transport.
virtual void onReceiveMessage (CGatewayRoute *from, const CMessage &msgin)
 A transport have received a message.
virtual void createSecurityPlugin (const std::string &className)
 create a security plug-in.
virtual void sendSecurityCommand (const TParsedCommandLine &command)
 Send a command to the security plug-in.
virtual void removeSecurityPlugin ()
 Remove the security plug-in.
void setSecurityData (IModuleProxy *proxy, TSecurityData *securityData)
 Set a security data block.
bool removeSecurityData (IModuleProxy *proxy, uint8 dataTag)
 Clear a block of security data The block is identified by the data tag.
void replaceAllSecurityDatas (IModuleProxy *proxy, TSecurityData *securityData)
void forceSecurityUpdate (IModuleProxy *proxy)
 Ask the gateway to resend the security data.
void onReceiveModuleMessage (CGatewayRoute *from, const CMessage &msgin)
 A gateway receive module operation.
void onReceiveModuleMessageHeader (CGatewayRoute *from, const CMessage &msgin)
void onReceiveModuleUpdate (CGatewayRoute *from, const CMessage &msgin)
 A gateway receive a general update message.
void onReceiveModuleAdd (CGatewayRoute *from, const CMessage &msgin)
 A gateway send new modules informations.
void onReceiveModuleRemove (CGatewayRoute *from, const CMessage &msgin)
void onReceiveModuleDistanceUpdate (CGatewayRoute *from, const CMessage &msgin)
void onReceiveModuleSecurityUpdate (CGatewayRoute *from, const CMessage &msgin)
virtual void onAddModuleProxy (IModuleProxy *addedModule)
 Callback called when the gateway has received some new module and eventually, need to disclose the module information to the connected gateway.
virtual void onRemoveModuleProxy (IModuleProxy *removedModule)
 Callback called when a module become unavailable, either because it is unplugged from it's socket, or, the gateway that disclosed it has been disconnected.
virtual void discloseModule (IModuleProxy *moduleProxy) throw (EGatewayNotConnected)
 Disclose module information to a connected gateway.
virtual IModuleProxygetPluggedModuleProxy (IModule *pluggedModule)
 Retrieve the proxy for a locally plugged module.
virtual uint32 getProxyCount () const
 Return the number of proxies managed by this gateway.
virtual void getModuleProxyList (std::vector< IModuleProxy * > &resultList) const
 Fill a vector with the list of proxies managed here. The module are filled in ascending proxy id order.
virtual void sendModuleMessage (IModuleProxy *senderProxy, IModuleProxy *addresseeProxy, const NLNET::CMessage &message)
 Callback called when a message arrive from a gateway and need to be dispatched.
virtual void dispatchModuleMessage (IModuleProxy *senderProxy, IModuleProxy *addresseeProxy, const CMessage &message)
 Send a message to the module plugged in this gateway.
bool initModule (const TParsedCommandLine &initInfo)
 Module initialization.
std::string buildModuleManifest () const
 Building of the manifest string can involve interceptors.
void onServiceUp (const std::string &, NLNET::TServiceId)
 A Nel layer 5 service has started.
void onServiceDown (const std::string &, NLNET::TServiceId)
 A Nel layer 5 service has stopped.
void onModuleUpdate ()
 Regular update from application.
void onApplicationExit ()
 The service main loop is terminating it job', all module while be disconnected and removed after this callback.
void onModuleUp (IModuleProxy *)
 Called by a socket to inform this module that another module has been created OR has been made accessible (due to a gateway connection).
void onModuleDown (IModuleProxy *)
 Called by a socket to inform this module that another module has been deleted OR has been no more accessible (due to some gateway disconnection).
bool onProcessModuleMessage (IModuleProxy *, const CMessage &message)
 Called internally by basic module imp to process the message by application code.
void onModuleSecurityChange (IModuleProxy *)
 Called by a socket to inform this module that the security data attached to a proxy have changed.
void onModuleSocketEvent (IModuleSocket *, TModuleSocketEvent)
const std::string & getSocketName ()
 Ask derived class to obtain the socket name.
void _sendModuleMessage (IModule *senderModule, TModuleId destModuleProxyId, const NLNET::CMessage &message) throw (EModuleNotReachable, EModuleNotPluggedHere)
virtual void _broadcastModuleMessage (IModule *senderModule, const NLNET::CMessage &message) throw (EModuleNotPluggedHere)
void onModulePlugged (IModule *pluggedModule)
 Called just after a module is plugged in the socket.
void onModuleUnplugged (IModule *unpluggedModule)
 Called just after a module as been effectively unplugged from a socket.
void removeForeignModule (CGatewayRoute *route, TModuleId foreignModuleId)
void sendModuleDistanceUpdate (IModuleProxy *proxy)
bool isModuleProxyVisible (IModuleProxy *proxy, CGatewayRoute *route)
 Check if a module can be seen by a route.
void discloseModuleToRoute (CGatewayRoute *route, IModuleProxy *proxy)
 Disclose module information to a gateway route.
void undiscloseModuleToRoute (CGatewayRoute *route, IModuleProxy *proxy)
 Undisclose module information to a gateway route.
void updateModuleDistanceToRoute (CGatewayRoute *route, IModuleProxy *proxy)
 the distance of a module need to be update to peers
void updateModuleSecurityDataToRoute (CGatewayRoute *route, IModuleProxy *proxy)
 The security data need to be updated to peers.
void sendPendingModuleUpdate (CGatewayRoute *route)
void getModuleList (std::vector< IModuleProxy * > &resultList)
 Fill the resultList with the list of module that are reachable with this socket.
NLMISC_COMMAND_HANDLER_TABLE_END NLMISC_CLASS_COMMAND_DECL (securityRemove)
 NLMISC_CLASS_COMMAND_DECL (securityCommand)
 NLMISC_CLASS_COMMAND_DECL (securityCreate)
 NLMISC_CLASS_COMMAND_DECL (securityListAvailableClass)
 NLMISC_CLASS_COMMAND_DECL (transportRemove)
 NLMISC_CLASS_COMMAND_DECL (transportCmd)
 NLMISC_CLASS_COMMAND_DECL (transportOptions)
 NLMISC_CLASS_COMMAND_DECL (transportAdd)
 NLMISC_CLASS_COMMAND_DECL (transportListAvailableClass)
 NLMISC_CLASS_COMMAND_DECL (dump)
 base module command table

Private Types

typedef map< TModuleId,
TModuleProxyPtr
TModuleProxies
typedef CTwinMap< TStringId,
TModuleProxyPtr
TNamedProxyIdx
typedef multimap< TStringId,
TKnownModuleInfo
TKnownModuleInfos
typedef map< TModuleId, TModuleIdTLocalModuleIndex
typedef map< std::string,
IGatewayTransport * > 
TTransportList
typedef set< CGatewayRoute * > TRouteList
typedef std::list< TLocalMessageTLocalMessageList

Private Attributes

TModuleProxies _ModuleProxies
 Module proxies managed by this gateway. The map key is the module proxy id.
TNamedProxyIdx _NameToProxyIdx
 Index of name to proxy id.
TKnownModuleInfos _KnownModules
 List of known foreign module info.
TLocalModuleIndex _LocalModuleIndex
 Translation table to find module proxies for locally plugged module The map key is the local module id, the data is the associated proxy id.
TTransportList _Transports
 the list of active transport
TRouteList _Routes
CGatewaySecurity_SecurityPlugin
 The security plug-in (if any).
uint32 _PingCounter
 Ping counter for debug purpose.
TLocalMessageList _LocalMessages
 List of local message waiting dispatching at next update.

Detailed Description

The standard gateway that interconnect module across process.

Definition at line 253 of file module_gateway.cpp.


Member Typedef Documentation

Definition at line 275 of file module_gateway.cpp.

Definition at line 299 of file module_gateway.cpp.

Definition at line 280 of file module_gateway.cpp.

Definition at line 258 of file module_gateway.cpp.

Definition at line 262 of file module_gateway.cpp.

Definition at line 289 of file module_gateway.cpp.

typedef map<std::string, IGatewayTransport*> NLNET::CStandardGateway::TTransportList [private]

Definition at line 285 of file module_gateway.cpp.


Constructor & Destructor Documentation

NLNET::CStandardGateway::CStandardGateway (  )  [inline]

Definition at line 305 of file module_gateway.cpp.

NLNET::CStandardGateway::~CStandardGateway (  )  [inline]

Member Function Documentation

virtual void NLNET::CStandardGateway::_broadcastModuleMessage ( IModule senderModule,
const NLNET::CMessage message 
) throw (EModuleNotPluggedHere) [inline, virtual]
void NLNET::CStandardGateway::_sendModuleMessage ( IModule senderModule,
TModuleId  destModuleProxyId,
const NLNET::CMessage message 
) throw (EModuleNotReachable, EModuleNotPluggedHere) [inline, virtual]

Implements NLNET::CModuleSocket.

Definition at line 1570 of file module_gateway.cpp.

References _LocalModuleIndex, _ModuleProxies, nlassert, and sendModuleMessage().

std::string NLNET::CStandardGateway::buildModuleManifest (  )  const [inline, virtual]

Building of the manifest string can involve interceptors.

The system will call this function on each interceptor and concatenate the returned strings to build the manifest string. A default implementation is given that return an emty string.

Reimplemented from NLNET::IModuleInterceptable.

Definition at line 1458 of file module_gateway.cpp.

virtual void NLNET::CStandardGateway::createSecurityPlugin ( const std::string &  className  )  [inline, virtual]

create a security plug-in.

There must be no security plug-in currently created.

Implements NLNET::IModuleGateway.

Definition at line 669 of file module_gateway.cpp.

References _ModuleProxies, _SecurityPlugin, NLNET::CGatewaySecurity::TCtorParam::Gateway, NLMISC_GET_FACTORY, nlwarning, and NLNET::CGatewaySecurity::onNewProxy().

Referenced by NLMISC_CLASS_COMMAND_DECL().

virtual void NLNET::CStandardGateway::createTransport ( const std::string &  transportClass,
const std::string &  instanceName 
) [inline, virtual]

Create and bind to this gateway a new transport.

Implements NLNET::IModuleGateway.

Definition at line 355 of file module_gateway.cpp.

References _Transports, NLNET::IGatewayTransport::TCtorParam::Gateway, nldebug, NLMISC_GET_FACTORY, and nlwarning.

Referenced by NLMISC_CLASS_COMMAND_DECL().

virtual void NLNET::CStandardGateway::deleteTransport ( const std::string &  instanceName  )  [inline, virtual]

Delete a transport (this will close any open route).

Implements NLNET::IModuleGateway.

Definition at line 382 of file module_gateway.cpp.

References _Transports, nldebug, and nlwarning.

Referenced by NLMISC_CLASS_COMMAND_DECL(), onApplicationExit(), and ~CStandardGateway().

virtual void NLNET::CStandardGateway::discloseModule ( IModuleProxy moduleProxy  )  throw (EGatewayNotConnected) [inline, virtual]

Disclose module information to a connected gateway.

This can also be this gateway itself.

Implements NLNET::IModuleGateway.

Definition at line 1255 of file module_gateway.cpp.

References NLNET::IModule::_onModuleUp(), NLNET::CModuleSocket::_PluggedModules, NLMISC::CTwinMap< TypeA, TypeB >::getAToBMap(), NLNET::IModule::getModuleId(), and nlassert.

Referenced by onAddModuleProxy().

void NLNET::CStandardGateway::discloseModuleToRoute ( CGatewayRoute route,
IModuleProxy proxy 
) [inline]
virtual void NLNET::CStandardGateway::dispatchModuleMessage ( IModuleProxy senderProxy,
IModuleProxy addresseeProxy,
const CMessage message 
) [inline, virtual]
void NLNET::CStandardGateway::forceSecurityUpdate ( IModuleProxy proxy  )  [inline]

Ask the gateway to resend the security data.

The plug-in call this method after having changed the security info for a plug-in outside of the onNewProxy call.

Definition at line 804 of file module_gateway.cpp.

References _Routes, isModuleProxyVisible(), and updateModuleSecurityDataToRoute().

Referenced by NLNET::CGatewaySecurity::forceSecurityUpdate().

virtual const std::string& NLNET::CStandardGateway::getFullyQualifiedGatewayName (  )  const [inline, virtual]

Return the Fully Qualified Gateway Name (FQGN).

Implements NLNET::IModuleGateway.

Definition at line 349 of file module_gateway.cpp.

References NLNET::CModuleBase::getModuleFullyQualifiedName().

virtual const std::string& NLNET::CStandardGateway::getGatewayName (  )  const [inline, virtual]

Return the local name of the gateway.

Implements NLNET::IModuleGateway.

Definition at line 345 of file module_gateway.cpp.

References NLNET::CModuleBase::getModuleName().

Referenced by onReceiveModuleAdd(), onReceiveModuleDistanceUpdate(), and removeForeignModule().

virtual IGatewayTransport* NLNET::CStandardGateway::getGatewayTransport ( const std::string &  transportName  )  const [inline, virtual]

Return a pointer on the named transport interface, or NULL if the transport is unknown.

Implements NLNET::IModuleGateway.

Definition at line 538 of file module_gateway.cpp.

References _Transports.

void NLNET::CStandardGateway::getModuleList ( std::vector< IModuleProxy * > &  resultList  )  [inline, virtual]

Fill the resultList with the list of module that are reachable with this socket.

Note that the result vector is not cleared before filling.

Implements NLNET::IModuleSocket.

Definition at line 2100 of file module_gateway.cpp.

References _ModuleProxies.

CModuleProxy* NLNET::CStandardGateway::getModuleProxy ( TModuleId  proxyId  )  [inline]
virtual void NLNET::CStandardGateway::getModuleProxyList ( std::vector< IModuleProxy * > &  resultList  )  const [inline, virtual]

Fill a vector with the list of proxies managed here. The module are filled in ascending proxy id order.

Implements NLNET::IModuleGateway.

Definition at line 1293 of file module_gateway.cpp.

References _ModuleProxies.

virtual IModuleProxy* NLNET::CStandardGateway::getPluggedModuleProxy ( IModule pluggedModule  )  [inline, virtual]

Retrieve the proxy for a locally plugged module.

Each local module plugged in a gateway has an associated proxy. This method return this proxy or NULL if the module is not plugged here.

Implements NLNET::IModuleGateway.

Definition at line 1273 of file module_gateway.cpp.

References _LocalModuleIndex, _ModuleProxies, NLNET::IModule::getModuleId(), and nlassert.

virtual uint32 NLNET::CStandardGateway::getProxyCount (  )  const [inline, virtual]

Return the number of proxies managed by this gateway.

Implements NLNET::IModuleGateway.

Definition at line 1287 of file module_gateway.cpp.

References _ModuleProxies.

virtual uint32 NLNET::CStandardGateway::getReceivedPingCount (  )  const [inline, virtual]

Return the number of ping received. This is incremented by special "GW_PING" message for unit testing.

Implements NLNET::IModuleGateway.

Definition at line 558 of file module_gateway.cpp.

References _PingCounter.

virtual uint32 NLNET::CStandardGateway::getRouteCount (  )  const [inline, virtual]

Return the number route available.

Implements NLNET::IModuleGateway.

Definition at line 553 of file module_gateway.cpp.

References _Routes.

const std::string& NLNET::CStandardGateway::getSocketName (  )  [inline, virtual]

Ask derived class to obtain the socket name.

Implements NLNET::IModuleSocket.

Definition at line 1565 of file module_gateway.cpp.

References NLNET::CModuleBase::getModuleName().

virtual uint32 NLNET::CStandardGateway::getTransportCount (  )  const [inline, virtual]

Return the number of transport currently active on this gateway.

Implements NLNET::IModuleGateway.

Definition at line 548 of file module_gateway.cpp.

References _Transports.

bool NLNET::CStandardGateway::initModule ( const TParsedCommandLine initInfo  )  [inline, virtual]

Module initialization.

If the initialization return false, then the module manager deleted the module immediately.

Reimplemented from NLNET::CModuleBase.

Definition at line 1446 of file module_gateway.cpp.

References NLNET::CModuleGateway::registerGateway(), and NLNET::CModuleSocket::registerSocket().

bool NLNET::CStandardGateway::isModuleProxyVisible ( IModuleProxy proxy,
CGatewayRoute route 
) [inline]
NLNET::CStandardGateway::NLMISC_CLASS_COMMAND_DECL ( dump   )  [inline]
NLNET::CStandardGateway::NLMISC_CLASS_COMMAND_DECL ( transportListAvailableClass   )  [inline]

Definition at line 2307 of file module_gateway.cpp.

References NLMISC_GET_FACTORY, and NLNET::nlunreferenced().

NLNET::CStandardGateway::NLMISC_CLASS_COMMAND_DECL ( transportAdd   )  [inline]

Definition at line 2288 of file module_gateway.cpp.

References _Transports, createTransport(), and NLNET::nlunreferenced().

NLNET::CStandardGateway::NLMISC_CLASS_COMMAND_DECL ( transportOptions   )  [inline]
NLNET::CStandardGateway::NLMISC_CLASS_COMMAND_DECL ( transportCmd   )  [inline]
NLNET::CStandardGateway::NLMISC_CLASS_COMMAND_DECL ( transportRemove   )  [inline]

Definition at line 2217 of file module_gateway.cpp.

References deleteTransport(), and NLNET::nlunreferenced().

NLNET::CStandardGateway::NLMISC_CLASS_COMMAND_DECL ( securityListAvailableClass   )  [inline]

Definition at line 2195 of file module_gateway.cpp.

References NLMISC_GET_FACTORY, and NLNET::nlunreferenced().

NLNET::CStandardGateway::NLMISC_CLASS_COMMAND_DECL ( securityCreate   )  [inline]
NLNET::CStandardGateway::NLMISC_CLASS_COMMAND_DECL ( securityCommand   )  [inline]
NLMISC_COMMAND_HANDLER_TABLE_END NLNET::CStandardGateway::NLMISC_CLASS_COMMAND_DECL ( securityRemove   )  [inline]
virtual void NLNET::CStandardGateway::onAddModuleProxy ( IModuleProxy addedModule  )  [inline, virtual]

Callback called when the gateway has received some new module and eventually, need to disclose the module information to the connected gateway.

The default behavior is to disclose the module to all connected gateway.

Implements NLNET::IModuleGateway.

Definition at line 1201 of file module_gateway.cpp.

References _Routes, discloseModule(), discloseModuleToRoute(), H_AUTO, and isModuleProxyVisible().

Referenced by onModulePlugged(), and onReceiveModuleAdd().

void NLNET::CStandardGateway::onApplicationExit (  )  [inline, virtual]

The service main loop is terminating it job', all module while be disconnected and removed after this callback.

Implements NLNET::IModule.

Definition at line 1525 of file module_gateway.cpp.

References _Transports, and deleteTransport().

void NLNET::CStandardGateway::onModuleDown ( IModuleProxy moduleProxy  )  [inline, virtual]

Called by a socket to inform this module that another module has been deleted OR has been no more accessible (due to some gateway disconnection).

Implements NLNET::IModuleInterceptable.

Definition at line 1537 of file module_gateway.cpp.

void NLNET::CStandardGateway::onModulePlugged ( IModule pluggedModule  )  [inline, virtual]
void NLNET::CStandardGateway::onModuleSecurityChange ( IModuleProxy moduleProxy  )  [inline, virtual]

Called by a socket to inform this module that the security data attached to a proxy have changed.

Implements NLNET::IModuleInterceptable.

Definition at line 1553 of file module_gateway.cpp.

void NLNET::CStandardGateway::onModuleSocketEvent ( IModuleSocket ,
TModuleSocketEvent   
) [inline, virtual]

Implements NLNET::IModule.

Definition at line 1557 of file module_gateway.cpp.

void NLNET::CStandardGateway::onModuleUnplugged ( IModule unpluggedModule  )  [inline, virtual]
void NLNET::CStandardGateway::onModuleUp ( IModuleProxy moduleProxy  )  [inline, virtual]

Called by a socket to inform this module that another module has been created OR has been made accessible (due to a gateway connection).

Implements NLNET::IModuleInterceptable.

Definition at line 1534 of file module_gateway.cpp.

void NLNET::CStandardGateway::onModuleUpdate (  )  [inline, virtual]

Regular update from application.

If the application is a service, then it call CModuleManager::updateModules at each service loop. If the application is a regular application, then you have to call manually CModuleManager::updateModules at regular intervals.

Implements NLNET::IModule.

Definition at line 1470 of file module_gateway.cpp.

References _LocalMessages, _Routes, _Transports, NLNET::TLocalMessage::AddresseProxyId, dispatchModuleMessage(), getModuleProxy(), NLNET::CMessage::getName(), H_AUTO, NLNET::TLocalMessage::Message, nlwarning, NLNET::TLocalMessage::SenderProxyId, sendPendingModuleUpdate(), and NLNET::IGatewayTransport::update().

bool NLNET::CStandardGateway::onProcessModuleMessage ( IModuleProxy senderModuleProxy,
const CMessage message 
) [inline, virtual]

Called internally by basic module imp to process the message by application code.

The system will call each interceptor until one return true.

Implements NLNET::IModuleInterceptable.

Definition at line 1540 of file module_gateway.cpp.

References _PingCounter, and NLNET::CMessage::getName().

virtual void NLNET::CStandardGateway::onReceiveMessage ( CGatewayRoute from,
const CMessage msgin 
) [inline, virtual]
void NLNET::CStandardGateway::onReceiveModuleAdd ( CGatewayRoute from,
const CMessage msgin 
) [inline]
void NLNET::CStandardGateway::onReceiveModuleDistanceUpdate ( CGatewayRoute from,
const CMessage msgin 
) [inline]
void NLNET::CStandardGateway::onReceiveModuleMessage ( CGatewayRoute from,
const CMessage msgin 
) [inline]
void NLNET::CStandardGateway::onReceiveModuleMessageHeader ( CGatewayRoute from,
const CMessage msgin 
) [inline]
void NLNET::CStandardGateway::onReceiveModuleRemove ( CGatewayRoute from,
const CMessage msgin 
) [inline]

Definition at line 1026 of file module_gateway.cpp.

References H_AUTO, nlRead, and removeForeignModule().

Referenced by onReceiveModuleUpdate().

void NLNET::CStandardGateway::onReceiveModuleSecurityUpdate ( CGatewayRoute from,
const CMessage msgin 
) [inline]
void NLNET::CStandardGateway::onReceiveModuleUpdate ( CGatewayRoute from,
const CMessage msgin 
) [inline]
virtual void NLNET::CStandardGateway::onRemoveModuleProxy ( IModuleProxy removedModule  )  [inline, virtual]

Callback called when a module become unavailable, either because it is unplugged from it's socket, or, the gateway that disclosed it has been disconnected.

Implements NLNET::IModuleGateway.

Definition at line 1222 of file module_gateway.cpp.

References NLNET::IModule::_onModuleDown(), NLNET::CModuleSocket::_PluggedModules, _Routes, NLMISC::CTwinMap< TypeA, TypeB >::getAToBMap(), NLNET::IModuleProxy::getForeignModuleId(), NLNET::IModuleProxy::getGatewayRoute(), NLNET::IModule::getModuleId(), H_AUTO, isModuleProxyVisible(), and undiscloseModuleToRoute().

Referenced by onModuleUnplugged(), and removeForeignModule().

virtual void NLNET::CStandardGateway::onRouteAdded ( CGatewayRoute route  )  [inline, virtual]

A new route a added by a transport.

Implements NLNET::IModuleGateway.

Definition at line 563 of file module_gateway.cpp.

References _ModuleProxies, _Routes, discloseModuleToRoute(), isModuleProxyVisible(), and nlassert.

virtual void NLNET::CStandardGateway::onRouteRemoved ( CGatewayRoute route  )  [inline, virtual]
void NLNET::CStandardGateway::onServiceDown ( const std::string &  serviceName,
NLNET::TServiceId  serviceId 
) [inline, virtual]

A Nel layer 5 service has stopped.

Implements NLNET::IModule.

Definition at line 1467 of file module_gateway.cpp.

void NLNET::CStandardGateway::onServiceUp ( const std::string &  serviceName,
NLNET::TServiceId  serviceId 
) [inline, virtual]

A Nel layer 5 service has started.

Implements NLNET::IModule.

Definition at line 1464 of file module_gateway.cpp.

void NLNET::CStandardGateway::removeForeignModule ( CGatewayRoute route,
TModuleId  foreignModuleId 
) [inline]
bool NLNET::CStandardGateway::removeSecurityData ( IModuleProxy proxy,
uint8  dataTag 
) [inline]

Clear a block of security data The block is identified by the data tag.

Definition at line 750 of file module_gateway.cpp.

References NLNET::TSecurityData::DataTag, NLNET::IModuleProxy::getModuleGateway(), NLNET::TSecurityData::NextItem, and nlassert.

Referenced by NLNET::CGatewaySecurity::removeSecurityData(), and setSecurityData().

virtual void NLNET::CStandardGateway::removeSecurityPlugin (  )  [inline, virtual]

Remove the security plug-in.

Implements NLNET::IModuleGateway.

Definition at line 711 of file module_gateway.cpp.

References _SecurityPlugin, nlwarning, and NLNET::CGatewaySecurity::onDelete().

Referenced by NLMISC_CLASS_COMMAND_DECL(), and ~CStandardGateway().

void NLNET::CStandardGateway::replaceAllSecurityDatas ( IModuleProxy proxy,
TSecurityData securityData 
) [inline]
void NLNET::CStandardGateway::sendModuleDistanceUpdate ( IModuleProxy proxy  )  [inline]
virtual void NLNET::CStandardGateway::sendModuleMessage ( IModuleProxy senderProxy,
IModuleProxy addresseeProxy,
const NLNET::CMessage message 
) [inline, virtual]
void NLNET::CStandardGateway::sendPendingModuleUpdate ( CGatewayRoute route  )  [inline]
virtual void NLNET::CStandardGateway::sendSecurityCommand ( const TParsedCommandLine command  )  [inline, virtual]

Send a command to the security plug-in.

Implements NLNET::IModuleGateway.

Definition at line 698 of file module_gateway.cpp.

References _SecurityPlugin, nlwarning, and NLNET::CGatewaySecurity::onCommand().

Referenced by NLMISC_CLASS_COMMAND_DECL().

void NLNET::CStandardGateway::setSecurityData ( IModuleProxy proxy,
TSecurityData securityData 
) [inline]

Set a security data block.

If a bloc of the same type already exist in the list, the new one will replace the existing one.

Definition at line 729 of file module_gateway.cpp.

References NLNET::CModuleProxy::_SecurityData, NLNET::TSecurityData::DataTag, NLNET::IModuleProxy::getModuleGateway(), NLNET::TSecurityData::NextItem, nlassert, and removeSecurityData().

Referenced by NLNET::CGatewaySecurity::setSecurityData().

virtual void NLNET::CStandardGateway::setTransportFirewallMode ( const std::string &  transportInstanceName,
bool  firewalled 
) throw (EGatewayFirewallBreak) [inline, virtual]
virtual void NLNET::CStandardGateway::setTransportPeerInvisible ( const std::string &  transportInstanceName,
bool  peerInvisible 
) [inline, virtual]
virtual void NLNET::CStandardGateway::transportCommand ( const TParsedCommandLine commandLine  )  [inline, virtual]
void NLNET::CStandardGateway::undiscloseModuleToRoute ( CGatewayRoute route,
IModuleProxy proxy 
) [inline]
void NLNET::CStandardGateway::updateModuleDistanceToRoute ( CGatewayRoute route,
IModuleProxy proxy 
) [inline]
void NLNET::CStandardGateway::updateModuleSecurityDataToRoute ( CGatewayRoute route,
IModuleProxy proxy 
) [inline]

Member Data Documentation

List of known foreign module info.

Definition at line 278 of file module_gateway.cpp.

Referenced by onReceiveModuleAdd(), onReceiveModuleDistanceUpdate(), and removeForeignModule().

List of local message waiting dispatching at next update.

Definition at line 301 of file module_gateway.cpp.

Referenced by onModuleUnplugged(), onModuleUpdate(), and sendModuleMessage().

Translation table to find module proxies for locally plugged module The map key is the local module id, the data is the associated proxy id.

Definition at line 283 of file module_gateway.cpp.

Referenced by _broadcastModuleMessage(), _sendModuleMessage(), getPluggedModuleProxy(), onModulePlugged(), and onModuleUnplugged().

Index of name to proxy id.

Definition at line 264 of file module_gateway.cpp.

Referenced by onModulePlugged(), onModuleUnplugged(), onReceiveModuleAdd(), and removeForeignModule().

Ping counter for debug purpose.

Definition at line 297 of file module_gateway.cpp.

Referenced by getReceivedPingCount(), and onProcessModuleMessage().


The documentation for this class was generated from the following file:

Generated on Thu Jan 7 08:30:21 2010 for NeL by  doxygen 1.6.1