com.pcbsys.nirvana.nAdminAPI.nHTTPInterface Class Reference

This class contains all the configuration required by the Nirvana Realm server to start and control the HTTP interface. More...

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

Public Member Functions

void enabled_HTTP_1_1 (boolean flag)
 set the use of HTTP1.1 More...
 
void enabledWebSockets (boolean flag)
 Sets the use of WebSockets. More...
 
Long getAjaxLPActiveDelay ()
 Returns the time to wait (for additional events) before delivering to Long Poll style subscribers. More...
 
Long getAjaxLPIdleDelay ()
 Returns the time to wait before returning from a Long Poll call if no events have been received. More...
 
String getAllowedOrigins ()
 Returns the currently set allowed origins for CORS. More...
 
ArrayList< nCustomHeadergetCustomHeaders ()
 Returns a ArrayList of nCustomHeader which will be sent to javascript clients. More...
 
int getMinimumBytesBeforeGZIP ()
 The minimum number of bytes in a packet before GZIP is enabled, default 1000. More...
 
Vector getPlugin ()
 Get the name of the plugin to use. More...
 
boolean isAllowCrossOriginCredentials ()
 This allows credentials header to be sent with CORS requests. More...
 
boolean isEnableGZIP ()
 Enable GZIP compression for javascript longpoll connections. More...
 
boolean isHTTP_1_1_Enabled ()
 Returns true if HTTP 1.1 is enabled.
 
boolean isNativeCometAllowed ()
 Returns whether this interface has javascript enabled or not. More...
 
boolean isWebSocketEnabled ()
 Returns true if WebSockets are enabled.
 
 nHTTPInterface (String adapter, int port) throws nAdminIllegalArgumentException
 Creates a HTTP interface on the supplied adapter:port. More...
 
 nHTTPInterface (String adapter, int port, boolean autostart) throws nAdminIllegalArgumentException
 Creates a HTTP interface on the supplied adapter:port with the supplied autostart flag. More...
 
void setAjaxLPActiveDelay (Long ajaxLPActiveDelay)
 Sets the time to wait (for additional events) before delivering to Long Poll style subscribers. More...
 
void setAjaxLPIdleDelay (Long ajaxLPIdleDelay)
 Set the time to wait before returning from a Long Poll call if no events have been received. More...
 
void setAllowCrossOriginCredentials (boolean myAllowCrossOriginCredentials)
 Set to true to send the allow credentails header to be sent with CORS requests. More...
 
void setAllowedOrigins (String allowedOrigins)
 Sets the Allowed Origins for CORS. More...
 
void setCustomHeaders (ArrayList< nCustomHeader > customHeaders)
 Sets the custom headers that will be sent to javascript clients. More...
 
void setEnableGZIP (boolean enableGZIP)
 Sets whether or not GZIP compression is enabled for javascript longpoll connections. More...
 
void setMinimumBytesBeforeGZIP (int minimumBytesBeforeGZIP)
 The minimum number of bytes in a packet before GZIP is enabled, default 1000. More...
 
void setNativeCometAllowed (boolean nativeCometAllowed)
 Sets whether javascript is enabled on the interface. More...
 
void setPlugin (Vector config)
 Get the name of the plugin to use. More...
 
void setThreadCount (int count) throws nAdminIllegalArgumentException
 Changes the thread pool size handling the client connections, specifically the processing of HTTP headers and preparing the payload. More...
 
- Public Member Functions inherited from com.pcbsys.nirvana.nAdminAPI.nInterface
boolean canAdvertise ()
 Will this interface be used by other realms to send client redirects to. More...
 
String getAdapaterAlias ()
 Returns the interfaces known alias's. More...
 
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...
 
int getBacklog ()
 The number of socket connect requests that the Operating System will queue before sending a reject to the remote client. More...
 
String getProtocol ()
 Returns the protocol string used by this interface. More...
 
int getRecvBufferSize ()
 Return the socket buffer size in bytes used by this interface when receiving data. More...
 
int getSelectThreadSize ()
 Returns the number of select threads used by NIO. More...
 
int getSendBufferSize ()
 Return the socket buffer size in bytes used by this interface when sending data. More...
 
int getThreadCount ()
 Returns the current Thread Pool size that handles client socket connections. More...
 
nACL getViaList ()
 Retrieves the interfaces Via list. More...
 
boolean isAllowNIO ()
 Returns whether NIO is enabled on this interface. More...
 
boolean isClientConnectionsAllowed ()
 Returns whether this interface can be used by clients to connect. More...
 
boolean isInterRealmAllow ()
 Returns whether this interface is allowed to be used in inter realm / cluster communication. More...
 
void setAdapterAlias (String alias)
 Sets the interfaces alias. More...
 
void setAdvertise (boolean flag)
 Change the current advertise status for this interface. More...
 
void setAllowClientConnections (boolean clientconnections)
 Sets whether this interface can accept client connections or not. More...
 
void setAllowNIO (boolean allowNIO)
 Set whether NIO is enabled on the interface. More...
 
void setAuthTimeOut (int timeout) throws nAdminIllegalArgumentException
 Changes the number of milliseconds that the remote client has to authenticate with the server. More...
 
void setBacklog (int backlog) throws nAdminIllegalArgumentException
 Changes the number of connections to queue before the Operating System will send rejects to the remote client. More...
 
void setInterRealmAllow (boolean interealmAllow)
 Sets whether this interface is allowed to be used in inter realm / cluster communication. More...
 
void setManager (nInterfaceManager im)
 Set the Interface Manager. More...
 
void setRecvBufferSize (int myRecvBufferSize)
 Set the socket buffer size in bytes used by this interface when receiving data. More...
 
void setSelectThreadSize (int selectThreadSize)
 Sets the number of select threads used by NIO. More...
 
void setSendBufferSize (int mySendBufferSize)
 Set the socket buffer size in bytes used by this interface when sending data. More...
 
void setThreadCount (int count) throws nAdminIllegalArgumentException
 Changes the thread pool size handling the client connections. More...
 
void setViaList (nACL acl) throws nInsufficientPrivilegesException, nNodeException, nBaseAdminException
 Commits the nACL object passed in with the Realm Server. More...
 
String toString ()
 Return a string representation of the interface details. More...
 
- Public Member Functions inherited from com.pcbsys.nirvana.nAdminAPI.nBaseInterface
String getAdapter ()
 Get the adapter that this interface will use. More...
 
String getName ()
 Get the name of this interface. More...
 
int getPort ()
 Get the port that this interface will bind to at startup. More...
 
String getURL ()
 Get the URL that specifies this interface. More...
 
void setAutostart (boolean flag)
 Change the current Autostart status for this interface. More...
 
boolean willAutostart ()
 Will this interface automatically be started when the Realm Server starts. More...
 

Detailed Description

This class contains all the configuration required by the Nirvana Realm server to start and control the HTTP interface.

Constructor & Destructor Documentation

com.pcbsys.nirvana.nAdminAPI.nHTTPInterface.nHTTPInterface ( String  adapter,
int  port 
) throws nAdminIllegalArgumentException

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
com.pcbsys.nirvana.nAdminAPI.nHTTPInterface.nHTTPInterface ( String  adapter,
int  port,
boolean  autostart 
) throws nAdminIllegalArgumentException

Creates a HTTP interface on the supplied adapter:port with the supplied autostart flag.

Parameters
adapterto bind to
portto bind to
autostartShould be autostarted or not
Exceptions
nAdminIllegalArgumentExceptionif adapter is null or the port range is invalid

Member Function Documentation

void com.pcbsys.nirvana.nAdminAPI.nHTTPInterface.enabled_HTTP_1_1 ( boolean  flag)

set the use of HTTP1.1

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

Sets the use of WebSockets.

Parameters
flagif true, interface will use websockets
Long 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
Long 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
String com.pcbsys.nirvana.nAdminAPI.nHTTPInterface.getAllowedOrigins ( )

Returns the currently set allowed origins for CORS.

Returns
the allowed origins for CORS support
ArrayList<nCustomHeader> com.pcbsys.nirvana.nAdminAPI.nHTTPInterface.getCustomHeaders ( )

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

Returns
ArrayList<nCustomHeader>
int com.pcbsys.nirvana.nAdminAPI.nHTTPInterface.getMinimumBytesBeforeGZIP ( )

The minimum number of bytes in a packet before GZIP is enabled, default 1000.

Returns
int the number of bytes before enabling GZIP
Vector com.pcbsys.nirvana.nAdminAPI.nHTTPInterface.getPlugin ( )

Get the name of the plugin to use.

Not yet implemented. For future use ONLY

boolean com.pcbsys.nirvana.nAdminAPI.nHTTPInterface.isAllowCrossOriginCredentials ( )

This allows credentials header to be sent with CORS requests.

Returns
true if the allow credentials header is to be sent for CORS
boolean com.pcbsys.nirvana.nAdminAPI.nHTTPInterface.isEnableGZIP ( )

Enable GZIP compression for javascript longpoll connections.

Returns
true if GZIP compression is on
boolean com.pcbsys.nirvana.nAdminAPI.nHTTPInterface.isNativeCometAllowed ( )

Returns whether this interface has javascript enabled or not.

Returns
whether this interface has javascript enabled
void com.pcbsys.nirvana.nAdminAPI.nHTTPInterface.setAjaxLPActiveDelay ( Long  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 ( Long  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.setAllowCrossOriginCredentials ( boolean  myAllowCrossOriginCredentials)

Set to true to send the allow credentails header to be sent with CORS requests.

Parameters
myAllowCrossOriginCredentialstrue to enable header
void com.pcbsys.nirvana.nAdminAPI.nHTTPInterface.setAllowedOrigins ( String  allowedOrigins)

Sets the Allowed Origins for CORS.

Parameters
allowedOriginsa comma seperated list of origins allowed with CORS or * to allow all
void com.pcbsys.nirvana.nAdminAPI.nHTTPInterface.setCustomHeaders ( ArrayList< nCustomHeader customHeaders)

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

Parameters
customHeadersArrayList of nCustomHeader
void com.pcbsys.nirvana.nAdminAPI.nHTTPInterface.setEnableGZIP ( boolean  enableGZIP)

Sets whether or not GZIP compression is enabled for javascript longpoll connections.

Parameters
enableGZIPset to true to enable
void com.pcbsys.nirvana.nAdminAPI.nHTTPInterface.setMinimumBytesBeforeGZIP ( int  minimumBytesBeforeGZIP)

The minimum number of bytes in a packet before GZIP is enabled, default 1000.

Parameters
minimumBytesBeforeGZIPthe number of bytes before GZIPing a packet, as smaller packets do not benefit due to CPU overhead.
void com.pcbsys.nirvana.nAdminAPI.nHTTPInterface.setNativeCometAllowed ( boolean  nativeCometAllowed)

Sets whether javascript is enabled on the interface.

Parameters
nativeCometAllowedtrue to enable javascript communication via this interface
void com.pcbsys.nirvana.nAdminAPI.nHTTPInterface.setPlugin ( Vector  config)

Get the name of the plugin to use.

Not yet implemented. For future use ONLY

Parameters
configthe configuration of the plugin
void com.pcbsys.nirvana.nAdminAPI.nHTTPInterface.setThreadCount ( int  count) throws nAdminIllegalArgumentException

Changes the thread pool size handling the client connections, specifically the processing of HTTP headers and preparing the payload.

Parameters
countThe maximum size the thread pool will increase to when under load
Exceptions
nAdminIllegalArgumentExceptionIf the size is less than or equal to 0