com.pcbsys.nirvana.client.nConstants Class Reference

This class is a container for the various constants that affect the behaviour of various Nirvana Client API calls. More...

Static Public Member Functions

static bool attemptReconnectAfterAccessChange ()
 Returns whether a nirvana nSession will attempt to reconnect to the realm after the realm ACL has been revoked. More...
 
static bool attemptReconnectImmediately ()
 Returns whether a nirvana nSession will attempt to immediately reconnect or whether reconnection attempts will back off over time to prevent a network storm where multiple re-connections can occur all at once More...
 
static long currentTimeMillis ()
 Returns the current time in milliseconds since epoch More...
 
static void enableDebug (bool enabled)
 Sets the debug flag to true or false. More...
 
static int getAccessWaitLimit ()
 Returns the outbound publish queue access wait time. More...
 
static int getBlockLimit ()
 Returns the outbound publish queue block wait time. More...
 
static int getConnectionBlockWeighting ()
 Returns the outbound publish queue block weighting. More...
 
static int getConnectionQueueHighWater ()
 Returns the outbound publish queue high watermark. More...
 
static int getConnectionQueueLowWater ()
 Returns the outbound publish queue low watermark. More...
 
static int getDataGroupQueueSize ()
 Get the current data group event queue size More...
 
static CultureInfo getDefaultCulture ()
 Get the CultureInfo object that is used when the session username is converted to lower case. More...
 
static bool getEnabledPriorityQueues ()
 Get whether priority queueing is enabled for this client. More...
 
static long getEVENTWAIT ()
 This is the maximum time the client API will wait for a response to a specific request from the Nirvana realm. More...
 
static int getHTTPRequestTimeout ()
 Gets the value in ms that HTTP/HTTPS requests will wait before returning without a response More...
 
static int getInitialConnectionTimeout ()
 This returns the current value for the Initial socket connect timeout. More...
 
static long getKeepAliveInterval ()
 Gets the value in ms to wait before sending a Keep Alive. More...
 
static int getPriorityQueueCount ()
 Gets the number of queues used for priority messaging. More...
 
static string getProxyAuthString ()
 Gets the current value set to be used as the proxy authentication for http(s) drivers (username:password) More...
 
static string getProxyString ()
 Gets the current value set to be used as the proxy for http(s) drivers (host:port) More...
 
static int getPushWaitLimit ()
 Returns the outbound publish queue push wait time. More...
 
static long getReconnectInterval ()
 Returns the interval value to use between reconnect attempts when the session is set to reconnect immediately More...
 
static int getSocketReceiveBufferSize ()
 Get the inbound socket buffer size More...
 
static int getSocketSendBufferSize ()
 Get the outbound socket buffer size More...
 
static int getSubHighWater ()
 Retrieves the subscriber queue high watermark. More...
 
static int getSubLowWater ()
 Retrieves the subscriber queue low watermark. More...
 
static int getWriteHandlerType ()
 Returns the current write handling mode that the client is using More...
 
static void honour3rdPartyCookies (bool flag)
 If set the underlying nhp(s) drivers will extract and use the Set-Cookie response from an intermediate proxy. More...
 
static void ignoreProxy (bool ignore)
 If set to true, all proxy settings will be ignored and a direct connection to the realm will be attempted. More...
 
static bool isDebugEnabled ()
 Returns whether the debug flag is set to true or false. More...
 
static bool isHonouring3rdPartyCookies ()
 If set the underlying nhp(s) drivers will extract and use the Set-Cookie response from an intermediate proxy. More...
 
static DateTime milliToDateTime (long milliseconds)
 Convert an Epoch Date in milliseconds to a valid DateTime object More...
 
static long milliToTicks (long milliseconds)
 Convert the milliseconds value to the correct ticks / nano time More...
 
static void setAccessWaitLimit (int p_accessWait)
 Sets the outbound publish queue access wait time. More...
 
static void setBlockLimit (int p_blockWait)
 Sets the outbound publish queue block wait time. More...
 
static void setClientLogFile (string file)
 Specify a file for the client log messages. More...
 
static void setClientLogFileDept (int dept)
 Specify the maximum number of log files that will be kept More...
 
static void setClientLogLevel (int level)
 Sets the log level for the client. More...
 
static void setClientLogSize (long size)
 Specify the maximum size of the log file More...
 
static void setConnectionBlockWeighting (int blockWeighting)
 Sets the outbound publish queue block weighting. More...
 
static void setConnectionQueueHighWater (int high)
 Sets the outbound publish queue high watermark. More...
 
static void setConnectionQueueLowWater (int low)
 Sets the outbound publish queue low watermark. More...
 
static void setDataGroupQueueSize (int queueSize)
 Sets the number of events that are still to ve delivered to the client More...
 
static void setDefaultCulture (CultureInfo culture)
 When a user connects to Nirvana their username is converted to lower case. More...
 
static void setEnabledPriorityQueues (bool doEnable)
 Enable the usage of priority queues for this client. More...
 
static void setEVENTWAIT (long newval)
 This is the maximum time the client API will wait for a response to a specific request from the Nirvana realm. More...
 
static void setHTTPRequestTimeout (int newVal)
 Sets the value in ms that HTTP/HTTPS requests will wait before returning without a response More...
 
static void setInitialConnectionTimeout (int timeout)
 This sets the current value for the Initial socket connect timeout. More...
 
static void setKeepAliveInterval (long newVal)
 Sets the value in ms to wait before sending a Keep Alive. More...
 
static void setPermittedKeepAlivesMissed (int kas)
 Sets the number of keep alives that the client can miss before closing the connection. More...
 
static void setPriorityQueueCount (int queueCount)
 Sets the number of queues to use when allocating priority. More...
 
static void setProxyAuthString (string newVal)
 Sets the values to be used as the proxy authentication for http(s) drivers in colon-separated form (username:password).An optional third parameter can be supplied, which indicates the domain (username:password:domain). More...
 
static void setProxyString (string newVal)
 Sets the current value set to be used as the proxy for http(s) drivers, there is two format's if you wish to use a IPV6 string literal ip address then http(s)://[IPV6 Address]:port or if host is a domain name or IPV4 address then http(s)://host:port More...
 
static void setPushWaitLimit (int p_pushWait)
 Sets the outbound publish queue push wait time. More...
 
static void setReconnectAfterAccessChange (bool recon)
 Sets whether a nirvana nSession will attempt to reconnect to the realm after the realm ACL has been revoked. More...
 
static void setReconnectImmediately (bool recon)
 Sets whether a nirvana nSession will attempt to immediately reconnect or whether reconnection attempts will back off over time to prevent a network storm where multiple re-connections can occur all at once More...
 
static void setReconnectInterval (long interval)
 Returns the interval value to use between reconnect attempts when the session is set to reconnect immediately More...
 
static void setSocketReceiveBufferSize (int size)
 Set the inbound socket buffer size More...
 
static void setSocketSendBufferSize (int size)
 Set the outbound socket buffer size More...
 
static void setStringEncoding (bool doEncode)
 If doEncode is true, the encoding of string properties stored in nEventProperties will be maintained. More...
 
static void setSubHighWater (int high)
 Sets the subscriber queue high watermark. More...
 
static void setSubLowWater (int low)
 Sets the subscriber queue low watermark. More...
 
static void setWriteHandlerType (int type)
 Allows the client to specify the type of write handling that the client code will employ. More...
 

Data Fields

const int CHAN_DELETED_EVENT_ID = -2
 Specifies the CHANNEL DELETED event ID received as result of channel deletion. More...
 
const int sDirectWriteHandler = fConnectionSettings.sDirectWriteHandler
 This write handler only uses a direct write method to the network layer, this reduces latencies but may increase the cpu used
 
const int sFlushWriteHandler = fConnectionSettings.sFlushWriteHandler
 This write handler allows the client to queue events to be handled in batches if possible. More...
 
const int sQueueWriteHandler = fConnectionSettings.sQueueWriteHandler
 This write handler allows the client to queue events that will be sent as the underlying communications fill the buffers or if the queue reaches 0. More...
 
const int sStandardWriteHandler = fConnectionSettings.sPeakWriteHandler
 This write handler uses a combination of direct writing and buffered writing to the network depending on client event load
 

Properties

static string Certificate [get, set]
 Specifies the path to the certificate to use for SSL Client Authentication. More...
 
static string CertificatePasword [get, set]
 Specifies the path to the certificate to use for SSL Client Authentication. More...
 
static
LocalCertificateSelectionCallback 
LocalCertificateValidation [get, set]
 Specifies the LocalCertificateSelectionCallback used when establishing nsps connections, if none supplied will use the system defaults
 
static
RemoteCertificateValidationCallback 
RemoteCertificateValidation [get, set]
 Specifies the RemoteCertificateValidationCallback used when establishing nsps connections, if none supplied will use the system defaults
 

Detailed Description

This class is a container for the various constants that affect the behaviour of various Nirvana Client API calls.

Member Function Documentation

static bool com.pcbsys.nirvana.client.nConstants.attemptReconnectAfterAccessChange ( )
static

Returns whether a nirvana nSession will attempt to reconnect to the realm after the realm ACL has been revoked.

By default, the nSession will not reconnect after one of these incidents, and a manual restart would need to be initiated

Returns
true if reconnect is enabled after realm ACL subject revocation
static bool com.pcbsys.nirvana.client.nConstants.attemptReconnectImmediately ( )
static

Returns whether a nirvana nSession will attempt to immediately reconnect or whether reconnection attempts will back off over time to prevent a network storm where multiple re-connections can occur all at once

Returns
true if reconnect immediately is enabled
static long com.pcbsys.nirvana.client.nConstants.currentTimeMillis ( )
static

Returns the current time in milliseconds since epoch

Returns
the correct epoch time as a millisecond value
static void com.pcbsys.nirvana.client.nConstants.enableDebug ( bool  enabled)
static

Sets the debug flag to true or false.

If true verbose logging will occur for connections to the realm server

By default, debug is not enabled

Parameters
enabled- whether debug is enabled (true) or disabled (false)
static int com.pcbsys.nirvana.client.nConstants.getAccessWaitLimit ( )
static

Returns the outbound publish queue access wait time.

Each Nirvana session that sends events to the server (e.g. publishers) place events into an outbound queue to be sent to the server. When the queue reaches the high watermark the queue is unavailable to the client session until the queue reaches it's low water mark, i.e. the events are delivered to the server. When the low water mark is reached the queue is automatically resumed.

When an outbound queue becomes blocked (unavailable) it is possible to become notified after a period of time that the queue cannot be accessed. This period is called the block access time

Returns
the connection queue access wait

com.pcbsys.nirvana.client.nConnectionQueueListener

static int com.pcbsys.nirvana.client.nConstants.getBlockLimit ( )
static

Returns the outbound publish queue block wait time.

Each Nirvana session that sends events to the server (e.g. publishers) place events into an outbound queue to be sent to the server. When the queue reaches the high watermark the queue is unavailable to the client session until the queue reaches it's low water mark, i.e. the events are delivered to the server. When the low water mark is reached the queue is automatically resumed.

When an outbound queue becomes blocked (unavailable) it is possible to become notified after a configurable period. This period is called the block wait time

Returns
the connection queue block wait

com.pcbsys.nirvana.client.nConnectionQueueListener

static int com.pcbsys.nirvana.client.nConstants.getConnectionBlockWeighting ( )
static

Returns the outbound publish queue block weighting.

Each Nirvana session that sends events to the server (e.g. publishers) place events into an outbound queue to be sent to the server. When the queue reaches the high watermark the queue is unavailable to the client session until the queue reaches it's low water mark, i.e. the events are delivered to the server. When the low water mark is reached the queue is automatically resumed.

When an outbound queue becomes blocked (unavailable) it is possible to become notified after a configurable period. The connection block weighting is a value that is applied to the block wait value in order to control the frequency of these notifications.

Returns
the connection queue block weighting

com.pcbsys.nirvana.client.nConnectionQueueListener

static int com.pcbsys.nirvana.client.nConstants.getConnectionQueueHighWater ( )
static

Returns the outbound publish queue high watermark.

Each Nirvana session that sends events to the server (e.g. publishers) place events into an outbound queue to be sent to the server. When the queue reaches the high watermark the queue is unavailable to the client session until the queue reaches it's low water mark, i.e. the events are delivered to the server. When the low water mark is reached the queue is automatically resumed.

Returns
the outbound connection queue high water mark

com.pcbsys.nirvana.client.nConnectionQueueListener

static int com.pcbsys.nirvana.client.nConstants.getConnectionQueueLowWater ( )
static

Returns the outbound publish queue low watermark.

Each Nirvana session that sends events to the server (e.g. publishers) place events into an outbound queue to be sent to the server. When the queue reaches the high watermark the queue is unavailable to the client session until the queue reaches it's low water mark, i.e. the events are delivered to the server. When the low water mark is reached the queue is automatically resumed.

Returns
the outbound connection queue low water mark

com.pcbsys.nirvana.client.nConnectionQueueListener

static int com.pcbsys.nirvana.client.nConstants.getDataGroupQueueSize ( )
static

Get the current data group event queue size

Returns
The current data group event queue size
static CultureInfo com.pcbsys.nirvana.client.nConstants.getDefaultCulture ( )
static

Get the CultureInfo object that is used when the session username is converted to lower case.

static bool com.pcbsys.nirvana.client.nConstants.getEnabledPriorityQueues ( )
static

Get whether priority queueing is enabled for this client.

static long com.pcbsys.nirvana.client.nConstants.getEVENTWAIT ( )
static

This is the maximum time the client API will wait for a response to a specific request from the Nirvana realm.

The default value is 60 secs and typically if you get a nRequestTimedOutException the cause would be:

  1. There is a protocol mismatch between the client library in use and server you are connected to.
  1. The realm is really so busy that has not managed to respond to your request within the specified maximum interval.
Returns
a long specifying the maximum wait time for a protocol request (in ms)
static int com.pcbsys.nirvana.client.nConstants.getHTTPRequestTimeout ( )
static

Gets the value in ms that HTTP/HTTPS requests will wait before returning without a response

Returns
The HTTP timeout value in milliseconds
static int com.pcbsys.nirvana.client.nConstants.getInitialConnectionTimeout ( )
static

This returns the current value for the Initial socket connect timeout.

This timeout is specified in the actual underlying Socket connect, and enables connections made to non existent or unreachable hosts to be returned within a configurable time frame.

Returns
the socket connect timeout value, default is 30000ms
static long com.pcbsys.nirvana.client.nConstants.getKeepAliveInterval ( )
static

Gets the value in ms to wait before sending a Keep Alive.

This is relevant to the local JVM only.

Returns
the keep alive internal
static int com.pcbsys.nirvana.client.nConstants.getPriorityQueueCount ( )
static

Gets the number of queues used for priority messaging.

If priority messaging is disabled, this method will return 0

Returns
Returns an integer between 1 and 10 if priority queues are enabled for this client. 0 otherwise.
static string com.pcbsys.nirvana.client.nConstants.getProxyAuthString ( )
static

Gets the current value set to be used as the proxy authentication for http(s) drivers (username:password)

Returns
The string username:password for proxy authentication
static string com.pcbsys.nirvana.client.nConstants.getProxyString ( )
static

Gets the current value set to be used as the proxy for http(s) drivers (host:port)

Returns
The string proxy setting (host:port)
static int com.pcbsys.nirvana.client.nConstants.getPushWaitLimit ( )
static

Returns the outbound publish queue push wait time.

Each Nirvana session that sends events to the server (e.g. publishers) place events into an outbound queue to be sent to the server. When the queue reaches the high watermark the queue is unavailable to the client session until the queue reaches it's low water mark, i.e. the events are delivered to the server. When the low water mark is reached the queue is automatically resumed.

When an outbound queue becomes blocked (unavailable) it is possible to become notified after a period of time that events cannot be pushed to the queue. This period is called the push wait time

Returns
the connection queue push wait

com.pcbsys.nirvana.client.nConnectionQueueListener

static long com.pcbsys.nirvana.client.nConstants.getReconnectInterval ( )
static

Returns the interval value to use between reconnect attempts when the session is set to reconnect immediately

Returns
true if reconnect immediately is enabled
static int com.pcbsys.nirvana.client.nConstants.getSocketReceiveBufferSize ( )
static

Get the inbound socket buffer size

static int com.pcbsys.nirvana.client.nConstants.getSocketSendBufferSize ( )
static

Get the outbound socket buffer size

static int com.pcbsys.nirvana.client.nConstants.getSubHighWater ( )
static

Retrieves the subscriber queue high watermark.

Each Nirvana subscriber uses a queue to store events retrieved from the server prior to performing the callback to the registered event listeners. When the queue reaches the high watermark the subscription is suspended to allow the event listener to catch up and control the amount of memory used on the client. When the queue reaches the low watermark, the subscription is automatically resumed.

Returns
an int specifying the number of events to be used as a queue high watermark
static int com.pcbsys.nirvana.client.nConstants.getSubLowWater ( )
static

Retrieves the subscriber queue low watermark.

Each Nirvana subscriber uses a queue to store events retrieved from the server prior to performing the callback to the registered event listeners. When the queue reaches the high watermark the subscription is suspended to allow the event listener to catch up and control the amount of memory used on the client. When the queue reaches the low watermark, the subscription is automatically resumed.

Returns
an int specifying the number of events to be used as a queue low watermark
static int com.pcbsys.nirvana.client.nConstants.getWriteHandlerType ( )
static

Returns the current write handling mode that the client is using

Returns
an int of either sStandardWriteHandler or sDirectWriteHandler
static void com.pcbsys.nirvana.client.nConstants.honour3rdPartyCookies ( bool  flag)
static

If set the underlying nhp(s) drivers will extract and use the Set-Cookie response from an intermediate proxy.

Useful for load balancers

Parameters
flagEnable or Disable the use of the HTTP Cookie header
static void com.pcbsys.nirvana.client.nConstants.ignoreProxy ( bool  ignore)
static

If set to true, all proxy settings will be ignored and a direct connection to the realm will be attempted.

Parameters
ignoreIf a direct connection should be used instead of the system default or otherwise specified proxy.
static bool com.pcbsys.nirvana.client.nConstants.isDebugEnabled ( )
static

Returns whether the debug flag is set to true or false.

By default, debug is not enabled

Returns
whether debug is enabled (true) or disabled (false)
static bool com.pcbsys.nirvana.client.nConstants.isHonouring3rdPartyCookies ( )
static

If set the underlying nhp(s) drivers will extract and use the Set-Cookie response from an intermediate proxy.

Useful for load balancers

returns>the current state of the http cookie header use

static DateTime com.pcbsys.nirvana.client.nConstants.milliToDateTime ( long  milliseconds)
static

Convert an Epoch Date in milliseconds to a valid DateTime object

Returns
valid DateTime representation of the Epoch time supplied
static long com.pcbsys.nirvana.client.nConstants.milliToTicks ( long  milliseconds)
static

Convert the milliseconds value to the correct ticks / nano time

Returns
the correct ticks value represented by the millisecond value
static void com.pcbsys.nirvana.client.nConstants.setAccessWaitLimit ( int  p_accessWait)
static

Sets the outbound publish queue access wait time.

Each Nirvana session that sends events to the server (e.g. publishers) place events into an outbound queue to be sent to the server. When the queue reaches the high watermark the queue is unavailable to the client session until the queue reaches it's low water mark, i.e. the events are delivered to the server. When the low water mark is reached the queue is automatically resumed.

When an outbound queue becomes blocked (unavailable) it is possible to become notified after a period of time that the queue cannot be accessed. This period is called the block access time

Parameters
p_accessWaitthe connection queue access wait

com.pcbsys.nirvana.client.nConnectionQueueListener

static void com.pcbsys.nirvana.client.nConstants.setBlockLimit ( int  p_blockWait)
static

Sets the outbound publish queue block wait time.

Each Nirvana session that sends events to the server (e.g. publishers) place events into an outbound queue to be sent to the server. When the queue reaches the high watermark the queue is unavailable to the client session until the queue reaches it's low water mark, i.e. the events are delivered to the server. When the low water mark is reached the queue is automatically resumed.

When an outbound queue becomes blocked (unavailable) it is possible to become notified after a configurable period. This period is called the block wait time

Parameters
p_blockWaitthe connection queue block wait

com.pcbsys.nirvana.client.nConnectionQueueListener

static void com.pcbsys.nirvana.client.nConstants.setClientLogFile ( string  file)
static

Specify a file for the client log messages.

Defaults to stdout.

Parameters
filethe log file you wish the nirvana messages to be written to
static void com.pcbsys.nirvana.client.nConstants.setClientLogFileDept ( int  dept)
static

Specify the maximum number of log files that will be kept

Parameters
deptthe max number of log files that will be kept. By default it is set to 10. If value less than 0 is passed, then only 1 file will be kept.
static void com.pcbsys.nirvana.client.nConstants.setClientLogLevel ( int  level)
static

Sets the log level for the client.

All Nirvana client api code contains useful logging messages. The messages are set at specific levels from 0-7. This method allows you to choose what log level you wish to see. Setting to log level 0 will provide verbose output, whereas level 7 will be fairly quiet.

By default, these messages will be sent to a console

Parameters
levelthe log level you wish to set the client application to for nirvana messages
static void com.pcbsys.nirvana.client.nConstants.setClientLogSize ( long  size)
static

Specify the maximum size of the log file

Parameters
sizethe max size of the log file. By default it is set to 100000000. Min value is 1000000 (~1MB) and if a value less than this is passed it will be automatically adjusted.
static void com.pcbsys.nirvana.client.nConstants.setConnectionBlockWeighting ( int  blockWeighting)
static

Sets the outbound publish queue block weighting.

Each Nirvana session that sends events to the server (e.g. publishers) place events into an outbound queue to be sent to the server. When the queue reaches the high watermark the queue is unavailable to the client session until the queue reaches it's low water mark, i.e. the events are delivered to the server. When the low water mark is reached the queue is automatically resumed.

When an outbound queue becomes blocked (unavailable) it is possible to become notified after a configurable period. The connection block weighting is a value that is applied to the block wait value in order to control the frequency of these notifications.

Parameters
blockWeightingthe connection queue block weighting

com.pcbsys.nirvana.client.nConnectionQueueListener

static void com.pcbsys.nirvana.client.nConstants.setConnectionQueueHighWater ( int  high)
static

Sets the outbound publish queue high watermark.

Each Nirvana session that sends events to the server (e.g. publishers) place events into an outbound queue to be sent to the server. When the queue reaches the high watermark the queue is unavailable to the client session until the queue reaches it's low water mark, i.e. the events are delivered to the server. When the low water mark is reached the queue is automatically resumed.

Parameters
highthe outbound connection queue high water mark

com.pcbsys.nirvana.client.nConnectionQueueListener

static void com.pcbsys.nirvana.client.nConstants.setConnectionQueueLowWater ( int  low)
static

Sets the outbound publish queue low watermark.

Each Nirvana session that sends events to the server (e.g. publishers) place events into an outbound queue to be sent to the server. When the queue reaches the high watermark the queue is unavailable to the client session until the queue reaches it's low water mark, i.e. the events are delivered to the server. When the low water mark is reached the queue is automatically resumed.

Parameters
lowthe outbound connection queue low water mark

com.pcbsys.nirvana.client.nConnectionQueueListener

static void com.pcbsys.nirvana.client.nConstants.setDataGroupQueueSize ( int  queueSize)
static

Sets the number of events that are still to ve delivered to the client

Parameters
queueSizenumber of events that the queue will hold before blocking
static void com.pcbsys.nirvana.client.nConstants.setDefaultCulture ( CultureInfo  culture)
static

When a user connects to Nirvana their username is converted to lower case.

This can cause internationalisation problems so the username is converted using a CultureInfo object (default : CultureInfo.InvariantCulture).

Parameters
cultureCultureInfo to be used when the username is converted to lower case
static void com.pcbsys.nirvana.client.nConstants.setEnabledPriorityQueues ( bool  doEnable)
static

Enable the usage of priority queues for this client.

This will give delivery preference to messages marked high priority for this client.

Parameters
doEnabletrue will enable priority queueing for this client, false will disable it
static void com.pcbsys.nirvana.client.nConstants.setEVENTWAIT ( long  newval)
static

This is the maximum time the client API will wait for a response to a specific request from the Nirvana realm.

The default value is 60 secs and typically if you get a nRequestTimedOutException the cause would be:

  1. There is a protocol mismatch between the client library in use and server you are connected to.
  1. The realm is really so busy that has not managed to respond to your request within the specified maximum interval.

Calling this method will only have effect on the local client. Alternatively if you change this value through on the realm configuration using the Admin API, all subsequent Nirvana clients that connect will be affected.

static void com.pcbsys.nirvana.client.nConstants.setHTTPRequestTimeout ( int  newVal)
static

Sets the value in ms that HTTP/HTTPS requests will wait before returning without a response

Parameters
newValThe HTTP timeout value in milliseconds
static void com.pcbsys.nirvana.client.nConstants.setInitialConnectionTimeout ( int  timeout)
static

This sets the current value for the Initial socket connect timeout.

This timeout is specified in the actual underlying Socket connect, and enables connections made to non existent or unreachable hosts to be returned within a configurable time frame.

Parameters
timeoutthe socket connect timeout value to be set, default is 30000ms
static void com.pcbsys.nirvana.client.nConstants.setKeepAliveInterval ( long  newVal)
static

Sets the value in ms to wait before sending a Keep Alive.

This is applied to the local JVM only and is NOT sent to the realm.

Parameters
newValvalue in milliseconds specifying the interval between keep alives sent
static void com.pcbsys.nirvana.client.nConstants.setPermittedKeepAlivesMissed ( int  kas)
static

Sets the number of keep alives that the client can miss before closing the connection.

If 0, the client does not check for any missed keep alives from the server and will continue sending its own keep alive events, until the connection is detected as lost. If > 0, say 1, when the client has not received a message for 1 X the KeepAlive time + 20000ms, the underlying connection will be closed by the client and reconnection will be attempted.

Parameters
kasNumber of keep alive messages the client will miss before determining the connection as broken.
static void com.pcbsys.nirvana.client.nConstants.setPriorityQueueCount ( int  queueCount)
static

Sets the number of queues to use when allocating priority.

This can be a number between 1 and 10. The number of queues control how priority is arranged, smaller queue counts will coalese priority bands. For example, a queue count of 5 will result in priority 1 and 2, 3 and 4, 5 and 6, 7 and 8, 9 and 10 grouped together.

Parameters
queueCountThe number of queues to use for priority allocation. If this parameter is not between 1 and 10 a ArgumentOutOfRangeException will be thrown
static void com.pcbsys.nirvana.client.nConstants.setProxyAuthString ( string  newVal)
static

Sets the values to be used as the proxy authentication for http(s) drivers in colon-separated form (username:password).An optional third parameter can be supplied, which indicates the domain (username:password:domain).

Parameters
newValthe string username:password or username:password:domain used for proxy authentication
static void com.pcbsys.nirvana.client.nConstants.setProxyString ( string  newVal)
static

Sets the current value set to be used as the proxy for http(s) drivers, there is two format's if you wish to use a IPV6 string literal ip address then http(s)://[IPV6 Address]:port or if host is a domain name or IPV4 address then http(s)://host:port

Parameters
newValThe string proxy setting (host:port)
static void com.pcbsys.nirvana.client.nConstants.setPushWaitLimit ( int  p_pushWait)
static

Sets the outbound publish queue push wait time.

Each Nirvana session that sends events to the server (e.g. publishers) place events into an outbound queue to be sent to the server. When the queue reaches the high watermark the queue is unavailable to the client session until the queue reaches it's low water mark, i.e. the events are delivered to the server. When the low water mark is reached the queue is automatically resumed.

When an outbound queue becomes blocked (unavailable) it is possible to become notified after a period of time that events cannot be pushed to the queue. This period is called the push wait time

Parameters
p_pushWaitthe connection queue push wait

com.pcbsys.nirvana.client.nConnectionQueueListener

static void com.pcbsys.nirvana.client.nConstants.setReconnectAfterAccessChange ( bool  recon)
static

Sets whether a nirvana nSession will attempt to reconnect to the realm after the realm ACL has been revoked.

By default, the nSession will not reconnect after one of these incidents, and a manual restart would need to be initiated

Parameters
recontrue - will reconnect continually until successful, false, will disabled reconnect
static void com.pcbsys.nirvana.client.nConstants.setReconnectImmediately ( bool  recon)
static

Sets whether a nirvana nSession will attempt to immediately reconnect or whether reconnection attempts will back off over time to prevent a network storm where multiple re-connections can occur all at once

Parameters
recontrue - will reconnect immediately, and use the value set in
static void com.pcbsys.nirvana.client.nConstants.setReconnectInterval ( long  interval)
static

Returns the interval value to use between reconnect attempts when the session is set to reconnect immediately

Parameters
intervalvalue in milliseconds specifying the interval between reconnect attempts
static void com.pcbsys.nirvana.client.nConstants.setSocketReceiveBufferSize ( int  size)
static

Set the inbound socket buffer size

Parameters
sizethe size in bytes for the inbound buffer size
static void com.pcbsys.nirvana.client.nConstants.setSocketSendBufferSize ( int  size)
static

Set the outbound socket buffer size

Parameters
sizethe size in bytes for the outbound buffer size
static void com.pcbsys.nirvana.client.nConstants.setStringEncoding ( bool  doEncode)
static

If doEncode is true, the encoding of string properties stored in nEventProperties will be maintained.

Encoding is off by default because it produces a small performance hit, however this reduces the character set.

Parameters
doEncodeIf true, the encoding of strings will be maintained allowing for alternative character sets.
static void com.pcbsys.nirvana.client.nConstants.setSubHighWater ( int  high)
static

Sets the subscriber queue high watermark.

Each Nirvana subscriber uses a queue to store events retrieved from the server prior to performing the callback to the registered event listeners. When the queue reaches the high watermark the subscription is suspended to allow the event listener to catch up and control the amount of memory used on the client. When the queue reaches the low watermark, the subscription is automatically resumed.

Parameters
highsets the subscriber high water mark
static void com.pcbsys.nirvana.client.nConstants.setSubLowWater ( int  low)
static

Sets the subscriber queue low watermark.

Each Nirvana subscriber uses a queue to store events retrieved from the server prior to performing the callback to the registered event listeners. When the queue reaches the high watermark the subscription is suspended to allow the event listener to catch up and control the amount of memory used on the client. When the queue reaches the low watermark, the subscription is automatically resumed.

Parameters
lowthe low water ,ark for the subscriber
static void com.pcbsys.nirvana.client.nConstants.setWriteHandlerType ( int  type)
static

Allows the client to specify the type of write handling that the client code will employ.

Please note this needs to be set prior to any nSession creation.

Parameters
typeEither sStandardWriteHandler or sDirectWriteHandler

Field Documentation

const int com.pcbsys.nirvana.client.nConstants.CHAN_DELETED_EVENT_ID = -2

Specifies the CHANNEL DELETED event ID received as result of channel deletion.

This event is send only when async subscriber is used

const int com.pcbsys.nirvana.client.nConstants.sFlushWriteHandler = fConnectionSettings.sFlushWriteHandler

This write handler allows the client to queue events to be handled in batches if possible.

This allows the client to optimally send over a latency prone link with the lowest possible latency

const int com.pcbsys.nirvana.client.nConstants.sQueueWriteHandler = fConnectionSettings.sQueueWriteHandler

This write handler allows the client to queue events that will be sent as the underlying communications fill the buffers or if the queue reaches 0.

This facilitates the batching of events into 1 packet to be sent to the server.

Property Documentation

string com.pcbsys.nirvana.client.nConstants.Certificate
staticgetset

Specifies the path to the certificate to use for SSL Client Authentication.

If not set, the default will be to use the first certificate match from the current users' certificate store

string com.pcbsys.nirvana.client.nConstants.CertificatePasword
staticgetset

Specifies the path to the certificate to use for SSL Client Authentication.

If not set, the default will be to use the first certificate match from the current users' certificate store