- com
- pcbsys
- nirvana
- client
- nConstants
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 boolean | allowStoreCaching () |
Channel lookup are cached to avoid subsequent lookups resulting in a server call. More... | |
static boolean | attemptReconnectAfterAccessChange () |
Returns whether a nirvana nSession will attempt to reconnect to the realm after the realm ACL has been revoked. More... | |
static boolean | 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 void | enableDebug (boolean 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 () |
static boolean | getEnableAutoGC () |
The client can enable / disable the um code from monitoring and managing the memory. More... | |
static boolean | 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 | 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 | getMaxUnackedEvents () |
Get the maximum number of events that can be received by a consumer on a shared named object (shared durable) before the consumer need to acknowledge or rollback. More... | |
static int | getPriorityQueueCount () |
Gets the number of queues used for priority messaging. More... | |
static nProxyAuthenticatorHelper | getProxyAuthenticatorHelper () |
Gets the connection helper for proxy connections. 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 boolean | getSupportExtendedFiltering () |
Returns whether extended filtering is supported. More... | |
static int | getThreadReuseQueueSize () |
Gets the size of the reusable threads pool. More... | |
static int | getWriteHandlerType () |
Returns the current write handling mode that the client is using. More... | |
static void | honour3rdPartyCookies (boolean flag) |
If set the underlying nhp(s) drivers will extract and use the Set-Cookie response from an intermediate proxy. More... | |
static boolean | isDebugEnabled () |
Returns whether the debug flag is set to true or false. More... | |
static boolean | isHonouring3rdPartyCookies () |
static void | resetCertificateAlias () |
Resets the certificate alias to be used for SSL connections to the one selected by default by the key manager. | |
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 | setCertificateAlias (String alias) |
Set the certificate alias to be used for SSL connections, overrides the default selection of the key manager. More... | |
static void | setClientLogLevel (int level) |
Sets the log level for the client. 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 | setDefaultStoreCapacity (int cap) |
Sets the capacity that will be used for any channels or queues created within this JVM. More... | |
static void | setDefaultStoreTTL (int ttl) |
Sets the ttl that will be used for any channels or queues created within this JVM. More... | |
static void | setEnableAutoGC (boolean flag) |
The client will monitor the memory usage within the JVM, if it exceeds 85% used it will attempt to free memory by calling gc(). More... | |
static void | setEnabledPriorityQueues (boolean enabled) |
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 | 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 | setMaxUnackedEvents (int maxUnackedEvents) |
Set the maximum number of events that can be received by a consumer on a shared named object (shared durable) before the consumer need to acknowledge or rollback. 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 | setProxyAuthenticatorHelper (nProxyAuthenticatorHelper helper) |
Sets the authentication helper for proxy connections. More... | |
static void | setPushWaitLimit (int p_pushWait) |
Sets the outbound publish queue push wait time. More... | |
static void | setReconnectAfterAccessChange (boolean recon) |
Sets whether a nirvana nSession will attempt to reconnect to the realm after the realm ACL has been revoked. More... | |
static void | setReconnectImmediately (boolean 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 bufSize) |
Set the inbound socket buffer size. More... | |
static void | setSocketSendBufferSize (int bufSize) |
Set the outbound socket buffer size. 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 | setSupportExtendedFiltering (boolean flag) |
The client can enable / disable extended filtering *. More... | |
static void | setThreadReuseQueueSize (int size) |
Sets the size of the reusable threads pool. More... | |
static void | setWriteHandlerType (int type) |
Allows the client to specify the type of write handling that the client code will employ. More... | |
static boolean | stripJMSMessageIdPrefix () |
Unused. More... | |
Static Public Attributes | |
static final 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. | |
static final int | sQueuedWriteHandler = fConnectionSettings.sBufferedWriteHandler |
This write handler implements the older method of buffering and sending requests and flushing once the queue was emtpy this maximised the network usage but latency can suffer. | |
static final int | sStandardWriteHandler = fConnectionSettings.sPeakWriteHandler |
This write handler uses a combination of direct writing and buffered writing to the network depending on client event load. | |
This class is a container for the various constants that affect the behaviour of various Nirvana Client API calls.
|
static |
Channel lookup are cached to avoid subsequent lookups resulting in a server call.
Defaults to true.
|
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
|
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.
|
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
enabled | - whether debug is enabled (true) or disabled (false) |
|
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
|
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
|
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.
|
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.
|
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.
|
static |
|
static |
The client can enable / disable the um code from monitoring and managing the memory.
|
static |
Get whether priority queueing is enabled for this client.
|
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:
|
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 timeframe, rather than relying on the underlying JVM and OS timeout value
|
static |
Gets the value in ms to wait before sending a Keep Alive.
This is relevant to the local JVM only.
|
static |
Get the maximum number of events that can be received by a consumer on a shared named object (shared durable) before the consumer need to acknowledge or rollback.
The default value is 10.
|
static |
Gets the number of queues used for priority messaging.
If priority messaging is disabled, this method will return 0.
|
static |
Gets the connection helper for proxy connections.
This will return the last value passed to setProxyAuthenticatorHelper
|
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
|
static |
Returns the interval value to use between reconnect attempts when the session is set to reconnect immediately.
|
static |
Get the inbound socket buffer size.
|
static |
Get the outbound socket buffer size.
|
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.
|
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.
|
static |
Returns whether extended filtering is supported.
|
static |
Gets the size of the reusable threads pool.
|
static |
Returns the current write handling mode that the client is using.
|
static |
If set the underlying nhp(s) drivers will extract and use the Set-Cookie response from an intermediate proxy.
Useful for load balancers
flag | - Enable or Disable the use of the HTTP Cookie header |
|
static |
Returns whether the debug flag is set to true or false.
By default, debug is not enabled
|
static |
|
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
p_accessWait | the connection queue access wait |
|
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
p_blockWait | the connection queue block wait |
|
static |
Set the certificate alias to be used for SSL connections, overrides the default selection of the key manager.
If the specified alias is not found, the standrd key manager selection is used instead.
alias | the alias name of the certificate to be used |
|
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 System.out
level | the log level you wish to set the client application to for nirvana messages |
|
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.
blockWeighting | the connection queue block weighting |
|
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.
high | the outbound connection queue high water mark |
|
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.
low | the outbound connection queue low water mark |
|
static |
Sets the number of events that are still to ve delivered to the client.
queueSize | number of events that the queue will hold before blocking |
|
static |
Sets the capacity that will be used for any channels or queues created within this JVM.
cap | the capacity to set on the channels / queues |
|
static |
Sets the ttl that will be used for any channels or queues created within this JVM.
ttl | the ttl to set on the channels / queues |
|
static |
The client will monitor the memory usage within the JVM, if it exceeds 85% used it will attempt to free memory by calling gc().
If this is not required then, by calling this function, this behaviour is disabled. Please note that the memory management and OOME that may arise needs to be handled by the client.
flag | - boolean flag indicating the required functionality |
|
static |
Enable the usage of priority queues for this client.
This will give delivery preference to messages marked high priority for this client.
enabled | boolean true will enable priority queueing for this client, false will disable it. |
|
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:
Calling this method will only have effect on the local JVM. 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 |
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 timeframe.
timeout | the socket connect timeout value to be set, default is 30000ms |
|
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.
|
static |
Set the maximum number of events that can be received by a consumer on a shared named object (shared durable) before the consumer need to acknowledge or rollback.
The default value is 10.
maxUnackedEvents | the maximum number of events that a consumer can have unacknowledged at one time |
|
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.
kas | Number of keep alive messages the client will miss before determining the connection as broken |
|
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.
queueCount | The number of queues to use for priority allocation |
IllegalArgumentException | if the supplied integer is not between 1 and 10, then this method will throw an IllegalArgumentException |
|
static |
Sets the authentication helper for proxy connections.
helper | The helper to use for proxy connections. |
|
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
p_pushWait | the connection queue push wait |
|
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
recon | true - will reconnect continually until successful, false, will disabled reconnect |
|
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.
recon | true - will reconnect immediately, and use the value set in |
|
static |
Returns the interval value to use between reconnect attempts when the session is set to reconnect immediately.
interval | value in milliseconds specifying the interval between reconnect attempts |
|
static |
Set the inbound socket buffer size.
bufSize | the size in bytes for the inbound buffer size |
|
static |
Set the outbound socket buffer size.
bufSize | the size in bytes for the outbound buffer size |
|
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.
high | sets the subscriber high water mark |
|
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.
low | the low water ,ark for the subscriber |
|
static |
The client can enable / disable extended filtering *.
flag | - boolean flag indicating whether extended filtering is supported |
|
static |
Sets the size of the reusable threads pool.
size | The new size of the reusable threads pool |
|
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.
type | sStandardWriteHandler, sQueuedWriteHandler or sDirectWriteHandler |
|
static |