com::pcbsys::nirvana::nAdminAPI::nInterface Class Referenceabstract

Abstract Class nInterface. More...

#include <nInterface.h>

Inheritance diagram for com::pcbsys::nirvana::nAdminAPI::nInterface:
com::pcbsys::nirvana::nAdminAPI::nHTTPInterface com::pcbsys::nirvana::nAdminAPI::nSocketInterface com::pcbsys::nirvana::nAdminAPI::nHTTPSInterface com::pcbsys::nirvana::nAdminAPI::nSSLInterface

Public Member Functions

bool canAdvertise ()
 Will this interface be used by other realms to send client redirects to. More...
 
virtual bool Equals (const std::string &item)
 Compares the name of this interface with the string parameter. More...
 
virtual bool Equals (nInterface *pItem)
 Compares this nInterface object with another object. More...
 
virtual const std::string & getAdapaterAlias ()
 Returns the interfaces known alias's. More...
 
virtual const std::string & getAdapter ()
 Get the adapter that this interface will use. More...
 
virtual int getAuthTimeOut ()
 Returns the number of milliseconds that the remote client has to authenticate with the server before the server closes the communications with the client. More...
 
virtual int getBacklog ()
 The number of socket connect requests that the Operating System will queue before sending a reject to the remote client. More...
 
virtual const std::string & getName ()
 Get the name of this interface. More...
 
virtual int getPort ()
 Get the port that this interface will bind to at startup. More...
 
virtual const std::string & getProtocol ()
 Returns the protocol string used by this interface. More...
 
virtual int getRecvBufferSize ()
 Return the socket buffer size in bytes used by this interface when receiving data. More...
 
virtual int getSelectThreadSize ()
 Returns the number of select threads used by NIO. More...
 
virtual int getSendBufferSize ()
 Return the socket buffer size in bytes used by this interface when sending data. More...
 
virtual int getThreadCount ()
 Returns the current Thread Pool size that handles client socket connections. More...
 
virtual std::string getURL ()
 Get the URL that specifies this interface. More...
 
virtual nACLgetViaList ()
 Retrieves the interfaces Via list. More...
 
virtual bool isAllowNIO ()
 Returns whether NIO is enabled on this interface. More...
 
virtual bool isClientConnectionsAllowed ()
 Returns whether this interface can be used by clients to connect. More...
 
virtual bool isInterRealmAllow ()
 Returns whether this interface is allowed to be used in inter realm / cluster communication. More...
 
 nInterface (fDriverConfig *pCfg, nInterfaceManager *pIm)
 Creates a new nInterface object from the supplied fDriverConfig and nInterfaceManager. More...
 
virtual void setAdapterAlias (const std::string &alias)
 Sets the interfaces alias. More...
 
virtual void setAdvertise (bool flag)
 Change the current advertise status for this interface. More...
 
virtual void setAllowClientConnections (bool clientconnections)
 Sets whether this interface can accept client connections or not. More...
 
virtual void setAllowNIO (bool allowNIO)
 Set whether NIO is enabled on the interface. More...
 
virtual void setAuthTimeOut (int timeout)
 Changes the number of milliseconds that the remote client has to authenticate with the server. More...
 
virtual void setAutostart (bool flag)
 Change the current Autostart status for this interface. More...
 
virtual void setBacklog (int backlog)
 Changes the number of connections to queue before the Operating System will send rejects to the remote client. More...
 
virtual void setInterRealmAllow (bool interealmAllow)
 Sets whether this interface is allowed to be used in inter realm / cluster communication. More...
 
virtual void setManager (nInterfaceManager *pIm)
 Set the Interface Manager. More...
 
virtual void setRecvBufferSize (int recvBufferSize)
 Set the socket buffer size in bytes used by this interface when receiving data. More...
 
virtual void setSelectThreadSize (int selectThreadSize)
 Sets the number of select threads used by NIO. More...
 
virtual void setSendBufferSize (int sendBufferSize)
 Set the socket buffer size in bytes used by this interface when sending data. More...
 
virtual void setThreadCount (int count)
 Changes the thread pool size handling the client connections. More...
 
virtual void setUseForProxyForward (bool useForproxyForward)
 Set if ProxyForwarding is to be used. More...
 
virtual void setViaList (nACL *pAcl)
 Commits the nACL object passed in with the Realm Server. More...
 
virtual std::string toString ()
 Return a string representation of the interface details. More...
 
virtual bool useForProxyForward ()
 Returns true if proxy forwarding is enabled. More...
 
virtual bool willAutostart ()
 Will this interface automatically be started when the Realm Server starts. More...
 

Detailed Description

Abstract Class nInterface.

This class exposes the common attributes to all Nirvana Realm interfaces.

Constructor & Destructor Documentation

com::pcbsys::nirvana::nAdminAPI::nInterface::nInterface ( fDriverConfig *  pCfg,
nInterfaceManager pIm 
)

Creates a new nInterface object from the supplied fDriverConfig and nInterfaceManager.

Parameters
*pCfgthe fDriverConfig associated with this interface
*pImthe Interface Manager for this interface

Member Function Documentation

bool com::pcbsys::nirvana::nAdminAPI::nInterface::canAdvertise ( )

Will this interface be used by other realms to send client redirects to.

Returns
true if this interface can send redirects
virtual bool com::pcbsys::nirvana::nAdminAPI::nInterface::Equals ( const std::string &  item)
virtual

Compares the name of this interface with the string parameter.

Parameters
itemthe string name to compare to this interface name
Returns
true if these names match
virtual bool com::pcbsys::nirvana::nAdminAPI::nInterface::Equals ( nInterface pItem)
virtual

Compares this nInterface object with another object.

Parameters
annInterface object
Returns
true if these objects are equal.
virtual const std::string& com::pcbsys::nirvana::nAdminAPI::nInterface::getAdapaterAlias ( )
virtual

Returns the interfaces known alias's.

This is used by the server to tell other servers how to contact it if it is behind a NAT or Proxy server. It is specified as a HOST:PORT syntax

Returns
String alias
virtual const std::string& com::pcbsys::nirvana::nAdminAPI::nInterface::getAdapter ( )
virtual

Get the adapter that this interface will use.

Reserved interfaces are

0.0.0.0 - Bind to all physical interfaces on the machine 127.0.0.1 - Bind to local loopback

Returns
The current interface
virtual int com::pcbsys::nirvana::nAdminAPI::nInterface::getAuthTimeOut ( )
virtual

Returns the number of milliseconds that the remote client has to authenticate with the server before the server closes the communications with the client.

Returns
The current timeout
virtual int com::pcbsys::nirvana::nAdminAPI::nInterface::getBacklog ( )
virtual

The number of socket connect requests that the Operating System will queue before sending a reject to the remote client.

Returns
The current setting
virtual const std::string& com::pcbsys::nirvana::nAdminAPI::nInterface::getName ( )
virtual

Get the name of this interface.

This is the unique name for this interface on the realm

Returns
String name of the interface
virtual int com::pcbsys::nirvana::nAdminAPI::nInterface::getPort ( )
virtual

Get the port that this interface will bind to at startup.

Returns
Integer value of the port
virtual const std::string& com::pcbsys::nirvana::nAdminAPI::nInterface::getProtocol ( )
virtual

Returns the protocol string used by this interface.

Can be one of nsp, nsps, nhps or nhp

Returns
The protocol used by this interface
virtual int com::pcbsys::nirvana::nAdminAPI::nInterface::getRecvBufferSize ( )
virtual

Return the socket buffer size in bytes used by this interface when receiving data.

Returns
the inbound socket buffer size in bytes used by this interface
virtual int com::pcbsys::nirvana::nAdminAPI::nInterface::getSelectThreadSize ( )
virtual

Returns the number of select threads used by NIO.

Returns
the number of select threads used
virtual int com::pcbsys::nirvana::nAdminAPI::nInterface::getSendBufferSize ( )
virtual

Return the socket buffer size in bytes used by this interface when sending data.

Returns
the outbound socket buffer size in bytes used by this interface
virtual int com::pcbsys::nirvana::nAdminAPI::nInterface::getThreadCount ( )
virtual

Returns the current Thread Pool size that handles client socket connections.

Depending on the number of connections/second this size should be around 1 or 2 anything more may not really gain any improvement

Returns
The current size
virtual std::string com::pcbsys::nirvana::nAdminAPI::nInterface::getURL ( )
virtual

Get the URL that specifies this interface.

It is made up from the protocol the adapter and port

Returns
URL string
virtual nACL* com::pcbsys::nirvana::nAdminAPI::nInterface::getViaList ( )
virtual

Retrieves the interfaces Via list.

This list is contained in a nACL object.

See Also
nACL
Returns
nACL
virtual bool com::pcbsys::nirvana::nAdminAPI::nInterface::isAllowNIO ( )
virtual

Returns whether NIO is enabled on this interface.

Returns
if NIO is enabled
virtual bool com::pcbsys::nirvana::nAdminAPI::nInterface::isClientConnectionsAllowed ( )
virtual

Returns whether this interface can be used by clients to connect.

Returns
whether this interface is allowed for client communication
virtual bool com::pcbsys::nirvana::nAdminAPI::nInterface::isInterRealmAllow ( )
virtual

Returns whether this interface is allowed to be used in inter realm / cluster communication.

Returns
whether this interface is allowed for cluster communication
virtual void com::pcbsys::nirvana::nAdminAPI::nInterface::setAdapterAlias ( const std::string &  alias)
virtual

Sets the interfaces alias.

This string is of the format HOST:PORT where HOST is the alias interface and port is the number used to communicate with the server.

Parameters
aliasan alias hostname for the interface
virtual void com::pcbsys::nirvana::nAdminAPI::nInterface::setAdvertise ( bool  flag)
virtual

Change the current advertise status for this interface.

Parameters
flagTrue or False
virtual void com::pcbsys::nirvana::nAdminAPI::nInterface::setAllowClientConnections ( bool  clientconnections)
virtual

Sets whether this interface can accept client connections or not.

Parameters
clientconnectionswhether this interface can be used by clients
virtual void com::pcbsys::nirvana::nAdminAPI::nInterface::setAllowNIO ( bool  allowNIO)
virtual

Set whether NIO is enabled on the interface.

Parameters
allowNIOwhether NIO is enabled
virtual void com::pcbsys::nirvana::nAdminAPI::nInterface::setAuthTimeOut ( int  timeout)
virtual

Changes the number of milliseconds that the remote client has to authenticate with the server.

Parameters
timeouttime in milliseconds
virtual void com::pcbsys::nirvana::nAdminAPI::nInterface::setAutostart ( bool  flag)
virtual

Change the current Autostart status for this interface.

Parameters
flagTrue or False
virtual void com::pcbsys::nirvana::nAdminAPI::nInterface::setBacklog ( int  backlog)
virtual

Changes the number of connections to queue before the Operating System will send rejects to the remote client.

Parameters
backlogMust be between 1 and 100
virtual void com::pcbsys::nirvana::nAdminAPI::nInterface::setInterRealmAllow ( bool  interealmAllow)
virtual

Sets whether this interface is allowed to be used in inter realm / cluster communication.

Parameters
interealmAllowwhether this interface is allowed for cluster commincation
virtual void com::pcbsys::nirvana::nAdminAPI::nInterface::setManager ( nInterfaceManager pIm)
virtual

Set the Interface Manager.

Parameters
pImthe interface manager to use
virtual void com::pcbsys::nirvana::nAdminAPI::nInterface::setRecvBufferSize ( int  recvBufferSize)
virtual

Set the socket buffer size in bytes used by this interface when receiving data.

Parameters
recvBufferSizethe inbound socket buffer size in bytes used by this interface
virtual void com::pcbsys::nirvana::nAdminAPI::nInterface::setSelectThreadSize ( int  selectThreadSize)
virtual

Sets the number of select threads used by NIO.

Parameters
selectThreadSizethe number of select threads used
virtual void com::pcbsys::nirvana::nAdminAPI::nInterface::setSendBufferSize ( int  sendBufferSize)
virtual

Set the socket buffer size in bytes used by this interface when sending data.

Parameters
sendBufferSizethe size to set the outbound buffer size to
virtual void com::pcbsys::nirvana::nAdminAPI::nInterface::setThreadCount ( int  count)
virtual

Changes the thread pool size handling the client connections.

Parameters
countMust be between 1 and 5 inclussive
virtual void com::pcbsys::nirvana::nAdminAPI::nInterface::setUseForProxyForward ( bool  useForproxyForward)
virtual

Set if ProxyForwarding is to be used.

Parameters
useForproxyForwarduse Proxy forwarding if true
virtual void com::pcbsys::nirvana::nAdminAPI::nInterface::setViaList ( nACL pAcl)
virtual

Commits the nACL object passed in with the Realm Server.

This causes these nInterfaceViaEntry to be active once the function returns. The nACL object can be retrieved by calling the getViaList() function which returns the interface current VIA list.

Parameters
pAclA nACL containing nInterfaceViaEntry
Exceptions
nInsufficientPrivilegesExceptionIf the user is not permissioned to perform this operation
nNodeExceptionif the ACLs being set are invalid
nBaseAdminExceptionif unable to perform the operation, check the message for further information
virtual std::string com::pcbsys::nirvana::nAdminAPI::nInterface::toString ( )
virtual

Return a string representation of the interface details.

Returns
a string representation of the interface details
virtual bool com::pcbsys::nirvana::nAdminAPI::nInterface::useForProxyForward ( )
virtual

Returns true if proxy forwarding is enabled.

Returns
true if proxy forwarding is enabled
virtual bool com::pcbsys::nirvana::nAdminAPI::nInterface::willAutostart ( )
virtual

Will this interface automatically be started when the Realm Server starts.

Returns
true if the interface will automatically start