com.pcbsys.nirvana.client.nSessionAttributes Class Reference

This class is a container for the attributes necessary to create a Nirvana session. More...

Public Member Functions

string getConnectionDetail (int idx)
 Returns the rname indexed by idx. More...
 
long getInitialConnectionRetryCount ()
 Gets the inital connection retry count More...
 
int getNumberOfConnections ()
 Returns the number of protocols used by this nSession More...
 
 nSessionAttributes (string url)
 Constructs an nSessionAttributes object with the string URL specified. More...
 
 nSessionAttributes (string url, long initialConnectionRetry)
 Constructs an nSessionAttributes object with the string URL specified and retry count for initial connection attempts. More...
 
 nSessionAttributes (string[] urls)
 Constructs an nSessionAttributes object with the collection of string URLs specified. More...
 
 nSessionAttributes (string[] urls, long initialConnectionRetry)
 Constructs an nSessionAttributes object with the collection of string URLs specified. More...
 
void setSASLMechPrefs (nSASLMechanism[] mechPrefs)
 Sets preferences for SASL Authentication More...
 

Properties

bool RequestPriorityConnection [get, set]
 Accessor methods for the property which requests a priority connection to the server. More...
 
bool RequestUnthrottledConnection [get, set]
 Accessor methods for the property which requests an unthrottled connection to the server. More...
 

Detailed Description

This class is a container for the attributes necessary to create a Nirvana session.

Constructor & Destructor Documentation

com.pcbsys.nirvana.client.nSessionAttributes.nSessionAttributes ( string  url)

Constructs an nSessionAttributes object with the string URL specified.

Parameters
urlA string in the form protocol://host:port e.g. nsp://127.0.0.1:9000 Protocol can be one of nsp, nhp, nsps, nhps
Exceptions
nIllegalArgumentExceptionif the url is invalid
com.pcbsys.nirvana.client.nSessionAttributes.nSessionAttributes ( string  url,
long  initialConnectionRetry 
)

Constructs an nSessionAttributes object with the string URL specified and retry count for initial connection attempts.

Parameters
urlA string in the form protocol://host:port e.g. nsp://127.0.0.1:9000 Protocol can be one of nsp, nhp, nsps, nhps
initialConnectionRetryA long specfiying amount of times to retry for inital connection
Exceptions
nIllegalArgumentExceptionif the url is invalid
com.pcbsys.nirvana.client.nSessionAttributes.nSessionAttributes ( string[]  urls)

Constructs an nSessionAttributes object with the collection of string URLs specified.

Parameters
urlsA string[], containing strings in the form protocol://host:port e.g. nsp://127.0.0.1:9000 Protocol can be one of nsp, nhp, nsps, nhps
Exceptions
nIllegalArgumentExceptionif the url is invalid
com.pcbsys.nirvana.client.nSessionAttributes.nSessionAttributes ( string[]  urls,
long  initialConnectionRetry 
)

Constructs an nSessionAttributes object with the collection of string URLs specified.

Parameters
urlsA string[], containing strings in the form protocol://host:port e.g. nsp://127.0.0.1:9000 Protocol can be one of nsp, nhp, nsps, nhps
initialConnectionRetryA long specfiying amount of times to retry for inital connection
Exceptions
nIllegalArgumentExceptionif the url is invalid

Member Function Documentation

string com.pcbsys.nirvana.client.nSessionAttributes.getConnectionDetail ( int  idx)

Returns the rname indexed by idx.

These where passed in when the initial nSession was created

Parameters
idxthe index of the connection details to return
Returns
String RNAME value
Exceptions
ExceptionIf the index is out of bounds
long com.pcbsys.nirvana.client.nSessionAttributes.getInitialConnectionRetryCount ( )

Gets the inital connection retry count

Returns
a long specifying the number of retry attempts for establishing initial connection
int com.pcbsys.nirvana.client.nSessionAttributes.getNumberOfConnections ( )

Returns the number of protocols used by this nSession

Returns
Number of rnames used by this nSession
void com.pcbsys.nirvana.client.nSessionAttributes.setSASLMechPrefs ( nSASLMechanism[]  mechPrefs)

Sets preferences for SASL Authentication

Parameters
mechPrefsAn array of mechanisms to use in order of preference (highest preference first)

Property Documentation

bool com.pcbsys.nirvana.client.nSessionAttributes.RequestPriorityConnection
getset

Accessor methods for the property which requests a priority connection to the server.

If this is true, sessions started with these session attributes will request their connection be a priority connection.

bool com.pcbsys.nirvana.client.nSessionAttributes.RequestUnthrottledConnection
getset

Accessor methods for the property which requests an unthrottled connection to the server.

If this is true, sessions started with these session attributes will request that the server not throttle this connection when the available memory on the server is low. This is only necessary if the server has the EnableFlowControl config item set to true and the session has publishes to the server. Otherwise the connection will not be throttled regardless.