com::pcbsys::nirvana::nAdminAPI::nHTTPInterface Class Reference

Creates a HTTP interface on the supplied adapter:port. More...

#include <nHTTPInterface.h>

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

Public Member Functions

void enabled_HTTP_1_1 (bool flag)
 set the use of HTTP1.1 More...
 
void enabledWebSockets (bool flag)
 Sets the use of WebSockets. More...
 
longlong getAjaxLPActiveDelay ()
 Returns the time to wait (for additional events) before delivering to Long Poll style subscribers. More...
 
longlong getAjaxLPIdleDelay ()
 Returns the time to wait before returning from a Long Poll call if no events have been received. More...
 
std::list< nCustomHeader * > * getCustomHeaders ()
 Returns a List of nCustomHeader which will be sent to javascript clients. More...
 
std::string getInitialJavascript ()
 Returns the javascript code that will be sent to comet / iframe users on initialisation. More...
 
bool isHTTP_1_1_Enabled ()
 Returns true if HTTP 1.1 is enabled. More...
 
bool isNativeCometAllowed ()
 Returns whether this interface has javascript enabled or not. More...
 
bool isWebSocketEnabled ()
 Returns true if WebSockets are enabled. More...
 
 nHTTPInterface (fHTTPConfig *pCfg, nInterfaceManager *pIm)
 Creates a new HTTP interface. More...
 
void setAjaxLPActiveDelay (longlong ajaxLPActiveDelay)
 Sets the time to wait (for additional events) before delivering to Long Poll style subscribers. More...
 
void setAjaxLPIdleDelay (longlong ajaxLPIdleDelay)
 Set the time to wait before returning from a Long Poll call if no events have been received. More...
 
void setCustomHeaders (std::list< nCustomHeader * > *customHeaders)
 Sets the custom headers that will be sent to javascript clients. More...
 
void setInitialJavascript (std::string initialJavascript)
 Set the javascript code that will be sent to comet / iframe users on initialisation. More...
 
void setNativeCometAllowed (bool nativeCometAllowed)
 Sets whether javascript is enabled on the interface. More...
 
- Public Member Functions inherited from com::pcbsys::nirvana::nAdminAPI::nInterface
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

Creates a HTTP interface on the supplied adapter:port.

Parameters
adapterto bind to
portto bind to
Exceptions
nAdminIllegalArgumentExceptionif adapter is null or the port range is invalid

Constructor & Destructor Documentation

com::pcbsys::nirvana::nAdminAPI::nHTTPInterface::nHTTPInterface ( fHTTPConfig *  pCfg,
nInterfaceManager pIm 
)

Creates a new HTTP interface.

Parameters
*pCfgconfiguration to use
*pIMinterface manager for this interface

Member Function Documentation

void com::pcbsys::nirvana::nAdminAPI::nHTTPInterface::enabled_HTTP_1_1 ( bool  flag)

set the use of HTTP1.1

Parameters
flagif true, interface will use HTTP 1.1
void com::pcbsys::nirvana::nAdminAPI::nHTTPInterface::enabledWebSockets ( bool  flag)

Sets the use of WebSockets.

Parameters
flagif true, interface will use websockets
longlong com::pcbsys::nirvana::nAdminAPI::nHTTPInterface::getAjaxLPActiveDelay ( )

Returns the time to wait (for additional events) before delivering to Long Poll style subscribers.

Returns
the time in milliseconds
longlong com::pcbsys::nirvana::nAdminAPI::nHTTPInterface::getAjaxLPIdleDelay ( )

Returns the time to wait before returning from a Long Poll call if no events have been received.

Returns
the time in milliseconds
std::list<nCustomHeader*>* com::pcbsys::nirvana::nAdminAPI::nHTTPInterface::getCustomHeaders ( )

Returns a List of nCustomHeader which will be sent to javascript clients.

Returns
a List of nCustomHeader
std::string com::pcbsys::nirvana::nAdminAPI::nHTTPInterface::getInitialJavascript ( )

Returns the javascript code that will be sent to comet / iframe users on initialisation.

This can be used, for example to set document.domain

Returns
the javascript code to send on initialisation
bool com::pcbsys::nirvana::nAdminAPI::nHTTPInterface::isHTTP_1_1_Enabled ( )

Returns true if HTTP 1.1 is enabled.

Returns
true if HTTP 1.1 is enabled
bool com::pcbsys::nirvana::nAdminAPI::nHTTPInterface::isNativeCometAllowed ( )

Returns whether this interface has javascript enabled or not.

Returns
whether this interface has javascript enabled
bool com::pcbsys::nirvana::nAdminAPI::nHTTPInterface::isWebSocketEnabled ( )

Returns true if WebSockets are enabled.

Returns
true if WebSockets are enabled
void com::pcbsys::nirvana::nAdminAPI::nHTTPInterface::setAjaxLPActiveDelay ( longlong  ajaxLPActiveDelay)

Sets the time to wait (for additional events) before delivering to Long Poll style subscribers.

Parameters
ajaxLPActiveDelaythe time to wait in milliseconds
void com::pcbsys::nirvana::nAdminAPI::nHTTPInterface::setAjaxLPIdleDelay ( longlong  ajaxLPIdleDelay)

Set the time to wait before returning from a Long Poll call if no events have been received.

Parameters
ajaxLPIdleDelaythe time in milliseconds
void com::pcbsys::nirvana::nAdminAPI::nHTTPInterface::setCustomHeaders ( std::list< nCustomHeader * > *  customHeaders)

Sets the custom headers that will be sent to javascript clients.

Parameters
customHeadersList of nCustomHeader
void com::pcbsys::nirvana::nAdminAPI::nHTTPInterface::setInitialJavascript ( std::string  initialJavascript)

Set the javascript code that will be sent to comet / iframe users on initialisation.

This can be used, for example, to set document.domain

Parameters
initialJavascriptthe javascript code to send to comet users on initialisation
void com::pcbsys::nirvana::nAdminAPI::nHTTPInterface::setNativeCometAllowed ( bool  nativeCometAllowed)

Sets whether javascript is enabled on the interface.

Parameters
nativeCometAllowedtrue to enable javascript communication via this interface