com.pcbsys.nirvana.client.nSessionFactory Class Reference

This class is used with a nSessionAttributes object to create a Nirvana session. More...

Static Public Member Functions

static void close (nSession session)
 Closes a Nirvana session More...
 
static nSession create (nSessionAttributes attr, nReconnectHandler handler, string username=null)
 Creates an nSession object (Nirvana session) based on the nSessionAttributes object and the specified reconnect handler. More...
 
static nSession create (nSessionAttributes attr, string username=null)
 Creates an nSession object (Nirvana session) based on the nSessionAttributes object and supplied credentials More...
 
static nSession create (nSessionAttributes attr, nReconnectHandler handler, string username, SecureString password)
 Creates an nSession object (Nirvana session) based on the nSessionAttributes object and the specified reconnect handler. More...
 
static nSession create (nSessionAttributes attr, string username, SecureString password)
 Creates an nSession object (Nirvana session) based on the nSessionAttributes object and supplied credentials More...
 
static nSession create (nSessionAttributes attr, NetworkCredential creds)
 Creates an nSession object (Nirvana session) based on the nSessionAttributes object and supplied credentials More...
 
static nSession create (nSessionAttributes attr, nReconnectHandler handler, NetworkCredential creds)
 Creates an nSession object (Nirvana session) based on the nSessionAttributes object and the specified reconnect handler. More...
 
static nSession createMultiplexed (nSession session, NetworkCredential newCreds=null)
 Enable another session to be constructed that shares the physical connection with the nSession being passed. More...
 
static nSession createMultiplexed (nSession session, String newUsername)
 Creation of multiplexed session is not supported in C#/C++ API. More...
 
static nSession createMultiplexed (nSession session, String newUsername, SecureString newPassword)
 Creation of multiplexed session is not supported in C#/C++ API. More...
 
static nSession createMultiplexed (nSessionAttributes sessionAttributes, string userName)
 Creation of multiplexed session is not supported in C#/C++ API. More...
 
static nSession createMultiplexed (nSessionAttributes sessionAttributes, string userName, SecureString password)
 Creation of multiplexed session is not supported in C#/C++ API. More...
 
static nSession createMultiplexed (nSessionAttributes sessionAttributes, NetworkCredential creds=null)
 Creation of multiplexed session is not supported in C#/C++ API. More...
 
static int getNoVended ()
 Gets the number of nirvana sessions vended More...
 
static void shutdown ()
 Shuts down the session factory by closing all nirvana sessions that have been created
 

Detailed Description

This class is used with a nSessionAttributes object to create a Nirvana session.

Member Function Documentation

static void com.pcbsys.nirvana.client.nSessionFactory.close ( nSession  session)
static

Closes a Nirvana session

Parameters
sessionThe nSession object to be closed
Exceptions
nIllegalArgumentExceptionif the nSession is invalid
static nSession com.pcbsys.nirvana.client.nSessionFactory.create ( nSessionAttributes  attr,
nReconnectHandler  handler,
string  username = null 
)
static

Creates an nSession object (Nirvana session) based on the nSessionAttributes object and the specified reconnect handler.

Parameters
attrThe nSessionAttributes object containing the parameters for the session to be created
handlerA nReconnectHandler to use if the connection to the Server is lost
usernameThe user name to be used by this session to authenticate
Returns
the newly created nSession object
Exceptions
nIllegalArgumentExceptionif the nSessionAttributes is invalid

nReconnectHandler

static nSession com.pcbsys.nirvana.client.nSessionFactory.create ( nSessionAttributes  attr,
string  username = null 
)
static

Creates an nSession object (Nirvana session) based on the nSessionAttributes object and supplied credentials

Parameters
attrThe nSessionAttributes object containing the parameters for the session to be created
usernameThe user name to be used by this session to authenticate
Returns
the newly created nSession object
Exceptions
nIllegalArgumentExceptionif the nSessionAttributes is invalid or the username
static nSession com.pcbsys.nirvana.client.nSessionFactory.create ( nSessionAttributes  attr,
nReconnectHandler  handler,
string  username,
SecureString  password 
)
static

Creates an nSession object (Nirvana session) based on the nSessionAttributes object and the specified reconnect handler.

Parameters
attrThe nSessionAttributes object containing the parameters for the session to be created
handlerA nReconnectHandler to use if the connection to the Server is lost
usernameThe user name to be used by this session to authenticate
passwordThe password to be used by this session to authenticate
Returns
the newly created nSession object
Exceptions
nIllegalArgumentExceptionif the nSessionAttributes is invalid

nReconnectHandler

static nSession com.pcbsys.nirvana.client.nSessionFactory.create ( nSessionAttributes  attr,
string  username,
SecureString  password 
)
static

Creates an nSession object (Nirvana session) based on the nSessionAttributes object and supplied credentials

Parameters
attrThe nSessionAttributes object containing the parameters for the session to be created
usernameThe user name to be used by this session to authenticate
passwordThe password to be used by this session to authenticate
Returns
the newly created nSession object
Exceptions
nIllegalArgumentExceptionif the nSessionAttributes is invalid or the username
static nSession com.pcbsys.nirvana.client.nSessionFactory.create ( nSessionAttributes  attr,
NetworkCredential  creds 
)
static

Creates an nSession object (Nirvana session) based on the nSessionAttributes object and supplied credentials

Parameters
attrThe nSessionAttributes object containing the parameters for the session to be created
credsThe credentials to be used by this session to authenticate
Returns
the newly created nSession object
Exceptions
nIllegalArgumentExceptionif the nSessionAttributes is invalid or the username
static nSession com.pcbsys.nirvana.client.nSessionFactory.create ( nSessionAttributes  attr,
nReconnectHandler  handler,
NetworkCredential  creds 
)
static

Creates an nSession object (Nirvana session) based on the nSessionAttributes object and the specified reconnect handler.

Parameters
attrThe nSessionAttributes object containing the parameters for the session to be created
handlerA nReconnectHandler to use if the connection to the Server is lost
credsThe credential to be used by this session to authenticate
Returns
the newly created nSession object
Exceptions
nIllegalArgumentExceptionif the nSessionAttributes is invalid

nReconnectHandler

static nSession com.pcbsys.nirvana.client.nSessionFactory.createMultiplexed ( nSession  session,
NetworkCredential  newCreds = null 
)
static

Enable another session to be constructed that shares the physical connection with the nSession being passed.

Allows applications to subscribe twice to the same channel or queue using different filters, or reduce the impact of any connection limits imposed

Parameters
sessionsession the session to muliplex the connection with
newCredsThe credentials to be used by this session to authenticate
Returns
a multiplexed session
static nSession com.pcbsys.nirvana.client.nSessionFactory.createMultiplexed ( nSession  session,
String  newUsername 
)
static

Creation of multiplexed session is not supported in C#/C++ API.

A standard session is created instead based on the nSessionAttributes object contained in the passed session and the supplied username

Parameters
sessionThis session attributes will be used to create new standard session
newUsernameThe user name to be used by this session to authenticate
Returns
new standard session
static nSession com.pcbsys.nirvana.client.nSessionFactory.createMultiplexed ( nSession  session,
String  newUsername,
SecureString  newPassword 
)
static

Creation of multiplexed session is not supported in C#/C++ API.

A standard session is created instead based on the nSessionAttributes object contained in the passed session and supplied username and password

Parameters
sessionThis session attributes will be used to create new standard session
newUsernameThe user name to be used by this session to authenticate
newPasswordThe password to be used by this session to authenticate
Returns
new standard session
static nSession com.pcbsys.nirvana.client.nSessionFactory.createMultiplexed ( nSessionAttributes  sessionAttributes,
string  userName 
)
static

Creation of multiplexed session is not supported in C#/C++ API.

A standard session is created instead based on the nSessionAttributes object and supplied username

Parameters
sessionAttributesThe nSessionAttributes object containing the parameters for the session to be created
userNameThe user name to be used by this session to authenticate
Returns
new standard session
static nSession com.pcbsys.nirvana.client.nSessionFactory.createMultiplexed ( nSessionAttributes  sessionAttributes,
string  userName,
SecureString  password 
)
static

Creation of multiplexed session is not supported in C#/C++ API.

A standard session is created instead based on the nSessionAttributes object and supplied username and password

Parameters
sessionAttributesThe nSessionAttributes object containing the parameters for the session to be created
userNameThe user name to be used by this session to authenticate
passwordThe password to be used by this session to authenticate
Returns
new standard session
static nSession com.pcbsys.nirvana.client.nSessionFactory.createMultiplexed ( nSessionAttributes  sessionAttributes,
NetworkCredential  creds = null 
)
static

Creation of multiplexed session is not supported in C#/C++ API.

A standard session is created instead based on the nSessionAttributes object and supplied credentials

Parameters
sessionAttributesThe nSessionAttributes object containing the parameters for the session to be created
credsThe credentials to be used by this session to authenticate
Returns
new standard session
static int com.pcbsys.nirvana.client.nSessionFactory.getNoVended ( )
static

Gets the number of nirvana sessions vended

Returns
an int specifying the number of nirvana sessions vended with this session factory