com::pcbsys::nirvana::nAdminAPI::nInterfaceManager Class Reference

This class exposes the Realm Servers interface management API so that the control and management of the interfaces can be performed by an authorised Administrator. More...

#include <nInterfaceManager.h>

Inherits Observable, and com::pcbsys::nirvana::nAdminAPI::nPkgCloseListener.

Public Member Functions

virtual void addInterface (nInterface *pNewInterface)
 Adds a new interface to the Realm Server. More...
 
virtual void closed (nRealmNode *pClose)
 Called when a realm node is closed, for internal use only. More...
 
virtual void delInterface (nInterface *pDelInterface)
 Deletes an existing Interface from the Realm Server. More...
 
virtual nInterfaceStatusfindInterface (const std::string &name)
 Finds the nInterface object identified by the string supplied. More...
 
virtual nInterfaceStatus ** getInterfaces (int &numInterface)
 Returns an array of nInterfaceStatus objects that are currently configured on the Realm Server. More...
 
virtual int getNumberOfNHP ()
 Returns the number of NHP interfaces that are currently configured on the Realm Server. More...
 
virtual int getNumberOfNHPS ()
 Returns the number of NHPS interfaces that are currently configured on the Realm Server. More...
 
virtual int getNumberOfNSP ()
 Returns the number of NSP interfaces that are currently configured on the Realm Server. More...
 
virtual int getNumberOfNSPS ()
 Returns the number of NSPS interfaces that are currently configured on the Realm Server. More...
 
virtual int getNumberOfSHM ()
 Returns the number of SHM interfaces that are currently configured on the Realm Server. More...
 
std::list
< nInterfacePluginConfiguration * > & 
getPluginConfiguration ()
 Returns a list of nInterfacePluginConfiguration objects. More...
 
virtual int getType ()
 Returns the type of this object, for internal use only. More...
 
virtual void modInterface (nInterface *pModInterface)
 Changes the existing interface so that it takes the new settings supplied. More...
 
 nInterfaceManager (nRealmNode *pNode)
 Creates a new nInterfaceManager. More...
 
virtual void startInterface (nInterface *pInter)
 Starts the interface, specified in the nInterface object, on the Realm Server. More...
 
virtual void stopInterface (nInterface *pInter)
 Stops the specified interface on the Realm Server. More...
 

Detailed Description

This class exposes the Realm Servers interface management API so that the control and management of the interfaces can be performed by an authorised Administrator.

Constructor & Destructor Documentation

com::pcbsys::nirvana::nAdminAPI::nInterfaceManager::nInterfaceManager ( nRealmNode pNode)

Creates a new nInterfaceManager.

Parameters
*pNodethe node to be associated with this Interface Manager

Member Function Documentation

virtual void com::pcbsys::nirvana::nAdminAPI::nInterfaceManager::addInterface ( nInterface pNewInterface)
virtual

Adds a new interface to the Realm Server.

If Autostart is set to true then the interface is also started

Parameters
newInterfaceThe new interface configuration
Exceptions
nSessionNotConnectedExceptionis thrown if the underlying session to perform the AdminAPI request is not connected
nUnexpectedResponseExceptionis thrown if the server responds with an unexpected protocol response
nRequestTimedOutExceptionis thrown if the protocol request times out
nAdminIllegalArgumentExceptionis thrown if null is passed as the interface to be added
nAdminSecurityExceptionis thrown if used on a virtual realm
nSessionPausedExceptionis thrown if session paused
virtual void com::pcbsys::nirvana::nAdminAPI::nInterfaceManager::closed ( nRealmNode pClose)
virtual

Called when a realm node is closed, for internal use only.

Parameters
*pClosethe node which has been closed
virtual void com::pcbsys::nirvana::nAdminAPI::nInterfaceManager::delInterface ( nInterface pDelInterface)
virtual

Deletes an existing Interface from the Realm Server.

All current connections on this interface are disconnected immediatly.

Parameters
delInterfaceThe interface to delete
Exceptions
nSessionNotConnectedExceptionis thrown if the underlying session to perform the AdminAPI request is not connected
nUnexpectedResponseExceptionis thrown if the server responds with an unexpected protocol response
nRequestTimedOutExceptionis thrown if the protocol request times out
nAdminIllegalArgumentExceptionif null is passed as the interface to be added
nAdminSecurityExceptionis thrown if used on a virtual realm
nSessionPausedExceptionis thrown if session paused
virtual nInterfaceStatus* com::pcbsys::nirvana::nAdminAPI::nInterfaceManager::findInterface ( const std::string &  name)
virtual

Finds the nInterface object identified by the string supplied.

Parameters
namenull if the interface does not exist
Returns
an nInterfaceStatus object for the nInterface found or null of none could be found.
Exceptions
nAdminIllegalArgumentExceptionif null or a zero length string is passed as the name of the interface to be found
virtual nInterfaceStatus** com::pcbsys::nirvana::nAdminAPI::nInterfaceManager::getInterfaces ( int &  numInterface)
virtual

Returns an array of nInterfaceStatus objects that are currently configured on the Realm Server.

@param numInterface[out]- contains the length of the returned array
Returns
an array of nInterfaceStatus objects
See Also
nInterfaceStatus
virtual int com::pcbsys::nirvana::nAdminAPI::nInterfaceManager::getNumberOfNHP ( )
virtual

Returns the number of NHP interfaces that are currently configured on the Realm Server.

Returns
a count of NHP interfaces
virtual int com::pcbsys::nirvana::nAdminAPI::nInterfaceManager::getNumberOfNHPS ( )
virtual

Returns the number of NHPS interfaces that are currently configured on the Realm Server.

Returns
a count of NHPS interfaces
virtual int com::pcbsys::nirvana::nAdminAPI::nInterfaceManager::getNumberOfNSP ( )
virtual

Returns the number of NSP interfaces that are currently configured on the Realm Server.

Returns
a count of NSP interfaces
virtual int com::pcbsys::nirvana::nAdminAPI::nInterfaceManager::getNumberOfNSPS ( )
virtual

Returns the number of NSPS interfaces that are currently configured on the Realm Server.

Returns
a count of NSPS interfaces
virtual int com::pcbsys::nirvana::nAdminAPI::nInterfaceManager::getNumberOfSHM ( )
virtual

Returns the number of SHM interfaces that are currently configured on the Realm Server.

Returns
a count of SHM interfaces
std::list<nInterfacePluginConfiguration*>& com::pcbsys::nirvana::nAdminAPI::nInterfaceManager::getPluginConfiguration ( )

Returns a list of nInterfacePluginConfiguration objects.

See Also
nInterfacePluginConfiguration
Returns
Vector
virtual int com::pcbsys::nirvana::nAdminAPI::nInterfaceManager::getType ( )
virtual

Returns the type of this object, for internal use only.

Returns
the type of the object
virtual void com::pcbsys::nirvana::nAdminAPI::nInterfaceManager::modInterface ( nInterface pModInterface)
virtual

Changes the existing interface so that it takes the new settings supplied.

This method will automatically start and stop the interface.

Note : When this method is called in the interface that you are connected to, the interface will drop your connection and you will be either reconnected and this method will return or an Exception will be thrown.

Parameters
modInterfaceChanged settings for the interface
Exceptions
nSessionNotConnectedExceptionis thrown if the underlying session to perform the AdminAPI request is not connected
nUnexpectedResponseExceptionis thrown if the server responds with an unexpected protocol response
nRequestTimedOutExceptionis thrown if the protocol request times out
nAdminIllegalArgumentExceptionif null is passed as the interface to be deleted
nSessionPausedExceptionis thrown if session paused
virtual void com::pcbsys::nirvana::nAdminAPI::nInterfaceManager::startInterface ( nInterface pInter)
virtual

Starts the interface, specified in the nInterface object, on the Realm Server.

Parameters
interThe interface to start
Exceptions
nSessionNotConnectedExceptionis thrown if the underlying session to perform the AdminAPI request is not connected
nRequestTimedOutExceptionis thrown if the protocol request times out
nAdminIllegalArgumentExceptionif null is passed as the interface to be started, or the interface specified can not be found
virtual void com::pcbsys::nirvana::nAdminAPI::nInterfaceManager::stopInterface ( nInterface pInter)
virtual

Stops the specified interface on the Realm Server.

Parameters
interThe interface to stop
Exceptions
nSessionNotConnectedExceptionis thrown if the underlying session to perform the AdminAPI request is not connected
nRequestTimedOutExceptionis thrown if the protocol request times out
nAdminIllegalArgumentExceptionif null is passed as the interface to be stopped, or the interface specified can not be found