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) throws nIllegalArgumentException
 Closes a Nirvana session. More...
 
static nSession create (nSessionAttributes attr) throws nIllegalArgumentException
 Creates an nSession object (Nirvana session) based on the nSessionAttributes object supplied. More...
 
static nSession create (nSessionAttributes attr, nReconnectHandler handler) throws nIllegalArgumentException
 Creates an nSession object (Nirvana session) based on the nSessionAttributes object and the specified reconnect handler. More...
 
static nSession create (nSessionAttributes attr, nReconnectHandler handler, String username) throws nIllegalArgumentException
 Creates an nSession object (Nirvana session) based on the nSessionAttributes object and the specified reconnect handler. More...
 
static nSession create (nSessionAttributes attr, nReconnectHandler handler, String username, String password) throws nIllegalArgumentException
 Creates an nSession object (Nirvana session) based on the nSessionAttributes object and the specified reconnect handler. More...
 
static nSession create (nSessionAttributes attr, String username) throws nIllegalArgumentException
 Creates an nSession object (Nirvana session) based on the nSessionAttributes object and the specified reconnect handler. More...
 
static nSession create (nSessionAttributes attr, String username, String password) throws nIllegalArgumentException
 Creates an nSession object (Nirvana session) based on the nSessionAttributes object and the specified reconnect handler. More...
 
static nSession createMultiplexed (nSession session) throws nIllegalArgumentException
 Enable another session to be constructed that shares the physical connection with the nSession being passed. More...
 
static nSession createMultiplexed (nSession session, String user) throws nIllegalArgumentException
 Enable another session to be constructed that shares the physical connection with the nSession being passed. More...
 
static nSession createMultiplexed (nSession session, String user, String passwd) throws nIllegalArgumentException
 Enable another session to be constructed that shares the physical connection with the nSession being passed. More...
 
static nSession createMultiplexed (nSessionAttributes sessionAttributes) throws nIllegalArgumentException, nSessionNotConnectedException
 Enable another session to be constructed that shares the physical connection with the nSession whose nSessionAttributes are being passed. More...
 
static nSession createMultiplexed (nSessionAttributes sessionAttributes, String userName) throws nIllegalArgumentException, nSessionNotConnectedException
 Enable another session to be constructed that shares the physical connection with the nSession whose nSessionAttributes are being passed. More...
 
static nSession createMultiplexed (nSessionAttributes sessionAttributes, String userName, String passwd) throws nIllegalArgumentException, nSessionNotConnectedException
 Enable another session to be constructed that shares the physical connection with the nSession whose nSessionAttributes are being passed. 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) throws nIllegalArgumentException
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) throws nIllegalArgumentException
static

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

Parameters
attrThe 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  attr,
nReconnectHandler  handler 
) throws nIllegalArgumentException
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
Returns
the newly created nSession object
Exceptions
nIllegalArgumentExceptionif the nSessionAttributes is invalid
static nSession com.pcbsys.nirvana.client.nSessionFactory.create ( nSessionAttributes  attr,
nReconnectHandler  handler,
String  username 
) throws nIllegalArgumentException
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
See Also
nReconnectHandler
static nSession com.pcbsys.nirvana.client.nSessionFactory.create ( nSessionAttributes  attr,
nReconnectHandler  handler,
String  username,
String  password 
) throws nIllegalArgumentException
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
passwordAn optional (may be null) password that can be associated with the userName parameter
Returns
the newly created nSession object
Exceptions
nIllegalArgumentExceptionif the nSessionAttributes is invalid
See Also
nReconnectHandler
static nSession com.pcbsys.nirvana.client.nSessionFactory.create ( nSessionAttributes  attr,
String  username 
) throws nIllegalArgumentException
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
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,
String  username,
String  password 
) throws nIllegalArgumentException
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
usernameThe user name to be used by this session to authenticate
passwordAn optional (may be null) password that can be associated with the userName parameter
Returns
the newly created nSession object
Exceptions
nIllegalArgumentExceptionif the nSessionAttributes is invalid or the username
static nSession com.pcbsys.nirvana.client.nSessionFactory.createMultiplexed ( nSession  session) throws nIllegalArgumentException
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 by any browser / host machine to specific hosts, since the connection count will only ever be 1.

Parameters
sessionthe session to multiplex the connection with
Returns
a multiplexed session
Exceptions
nIllegalArgumentExceptionif the session is null
static nSession com.pcbsys.nirvana.client.nSessionFactory.createMultiplexed ( nSession  session,
String  user 
) throws nIllegalArgumentException
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 by any browser / host machine to specific hosts, since the connection count will only ever be 1.

Parameters
sessionthe session to multiplex the connection with
userthe username of the multiplexed session
Returns
a multiplexed session instance
Exceptions
nIllegalArgumentExceptionif session is null this exception will be thrown
static nSession com.pcbsys.nirvana.client.nSessionFactory.createMultiplexed ( nSession  session,
String  user,
String  passwd 
) throws nIllegalArgumentException
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 by any browser / host machine to specific hosts, since the connection count will only ever be 1.

Parameters
sessionthe session to multiplex the connection with
userthe username of the multiplexed session
passwdAn optional (may be null) password that can be associated with the userName parameter
Returns
a multiplexed session instance
Exceptions
nIllegalArgumentExceptionif session is null this exception will be thrown
static nSession com.pcbsys.nirvana.client.nSessionFactory.createMultiplexed ( nSessionAttributes  sessionAttributes) throws nIllegalArgumentException, nSessionNotConnectedException
static

Enable another session to be constructed that shares the physical connection with the nSession whose nSessionAttributes are 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 by any browser / host machine to specific hosts, since the connection count will only ever be 1.

Parameters
sessionAttributesthe sessionAttributes of the session with which to multiplex the connection
Returns
a multiplexed session
Exceptions
nIllegalArgumentExceptionif the sessionAttributes supplied is not valid
static nSession com.pcbsys.nirvana.client.nSessionFactory.createMultiplexed ( nSessionAttributes  sessionAttributes,
String  userName 
) throws nIllegalArgumentException, nSessionNotConnectedException
static

Enable another session to be constructed that shares the physical connection with the nSession whose nSessionAttributes are 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 by any browser / host machine to specific hosts, since the connection count will only ever be 1.

Parameters
sessionAttributesthe sessionAttributes of the session with which to multiplex the connection
userNamethe user name used when no physical connection exists to the desired realm
Returns
a multiplexed session
Exceptions
nIllegalArgumentExceptionif the sessionAttributes supplied is not valid
static nSession com.pcbsys.nirvana.client.nSessionFactory.createMultiplexed ( nSessionAttributes  sessionAttributes,
String  userName,
String  passwd 
) throws nIllegalArgumentException, nSessionNotConnectedException
static

Enable another session to be constructed that shares the physical connection with the nSession whose nSessionAttributes are 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 by any browser / host machine to specific hosts, since the connection count will only ever be 1.

Parameters
sessionAttributesThe sessionAttributes of the session with which to multiplex the connection
userNameThe user name used when no physical connection exists to the desired realm
passwdAn optional (may be null) password that can be associated with the userName parameter
Returns
a multiplexed session
Exceptions
nIllegalArgumentExceptionif the sessionAttributes supplied is not valid
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