com::pcbsys::nirvana::client::nSessionFactory Class Reference

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

#include <nSessionFactory.h>

Static Public Member Functions

static void close (nSession *pSession)
 Closes a Nirvana session. More...
 
static nSessioncreate (nSessionAttributes *pAttr)
 Creates an nSession object (Nirvana session) based on the nSessionAttributes object supplied. More...
 
static nSessioncreate (nSessionAttributes *pAttr, std::string &name)
 Creates an nSession object (Nirvana session) based on the nSessionAttributes object and the specified reconnect handler. More...
 
static nSessioncreate (nSessionAttributes *pAttr, nReconnectHandler *pHandler)
 Creates an nSession object (Nirvana session) based on the nSessionAttributes object and the specified reconnect handler. More...
 
static nSessioncreate (nSessionAttributes *pAttr, nReconnectHandler *pHandler, std::string &userName)
 Creates an nSession object (Nirvana session) based on the nSessionAttributes object and the specified reconnect handler. More...
 
static UM_DEPRECATED nSessioncreateMultiplexed (nSession *pSession)
 Creation of multiplexed session is not supported in C#/C++ API. More...
 
static UM_DEPRECATED nSessioncreateMultiplexed (nSessionAttributes *sessionAttributes)
 Creation of multiplexed session is not supported in C#/C++ API. More...
 
static UM_DEPRECATED nSessioncreateMultiplexed (nSessionAttributes *sessionAttributes, std::string userName)
 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 (bool closeAllThreads=false)
 Shuts down the session factory by closing all nirvana sessions that have been created. More...
 

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 pSession)
static

Closes a Nirvana session.

Parameters
*pSessionThe nSession object to be closed
Exceptions
nIllegalArgumentExceptionif the nSession is invalid
static nSession* com::pcbsys::nirvana::client::nSessionFactory::create ( nSessionAttributes pAttr)
static

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

Parameters
*pAttrThe nSessionAttributes object containing the parameters for the session to be created
Returns
the newly created nSession object
Exceptions
nIllegalArgumentExceptionif the nSessionAttributes is invalid
static nSession* com::pcbsys::nirvana::client::nSessionFactory::create ( nSessionAttributes pAttr,
std::string &  name 
)
static

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

Parameters
*pAttrThe nSessionAttributes object containing the parameters for the session to be created
nameThe 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 pAttr,
nReconnectHandler pHandler 
)
static

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

Parameters
*pAttrThe nSessionAttributes object containing the parameters for the session to be created
*pHandlerA nReconnectHandler to use if the connection to the Server is lost
Returns
the newly created nSession object
Exceptions
nIllegalArgumentExceptionif the nSessionAttributes is invalid
static nSession* com::pcbsys::nirvana::client::nSessionFactory::create ( nSessionAttributes pAttr,
nReconnectHandler pHandler,
std::string &  userName 
)
static

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

Parameters
*pAttrThe nSessionAttributes object containing the parameters for the session to be created
*pHandlerA nReconnectHandler to use if the connection to the Server is lost
userNameA String token to use when authenticating with the server
Returns
the newly created nSession object
Exceptions
nIllegalArgumentExceptionif the nSessionAttributes is invalid
See Also
nReconnectHandler
static UM_DEPRECATED nSession* com::pcbsys::nirvana::client::nSessionFactory::createMultiplexed ( nSession pSession)
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 credentials

Parameters
pSessionthis session attributes will be used to create new standard session
Returns
new standard session
Deprecated:
Creation of multiplexed sessions is deprecated since 10.7 and will be removed in future releases. Standard sessions should be used instead
static UM_DEPRECATED nSession* com::pcbsys::nirvana::client::nSessionFactory::createMultiplexed ( nSessionAttributes sessionAttributes)
static

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

A standard session is created instead based on the nSessionAttributes object

Parameters
sessionAttributesthe nSessionAttributes object containing the parameters for the session to be created
Returns
new standard session
Deprecated:
Creation of multiplexed sessions is deprecated since 10.7 and will be removed in future releases. Standard sessions should be used instead
static UM_DEPRECATED nSession* com::pcbsys::nirvana::client::nSessionFactory::createMultiplexed ( nSessionAttributes sessionAttributes,
std::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 the provided 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
Deprecated:
Creation of multiplexed sessions is deprecated since 10.7 and will be removed in future releases. Standard sessions should be used instead
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
static void com::pcbsys::nirvana::client::nSessionFactory::shutdown ( bool  closeAllThreads = false)
static

Shuts down the session factory by closing all nirvana sessions that have been created.