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. | |
| 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. | |
| 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. | |
| 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. | |
| static nSession | create (nSessionAttributes attr) throws nIllegalArgumentException |
| Creates an nSession object (Nirvana session) based on the nSessionAttributes object supplied. | |
| static nSession | createMultiplexed (nSession session) throws nIllegalArgumentException |
| Enable another session to be constructed that shares the physical connection with the nSession being passed. | |
| static int | getNoVended () |
| Gets the number of nirvana sessions vended. | |
| 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:
-
session The nSession object to be closed
- Exceptions:
-
nIllegalArgumentException if the nSession is invalid
| 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:
-
attr The nSessionAttributes object containing the parameters for the session to be created username The user name to be used by this session to authenticate
- Returns:
- the newly created nSession object
- Exceptions:
-
nIllegalArgumentException if the nSessionAttributes is invalid or the username
| 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:
-
attr The nSessionAttributes object containing the parameters for the session to be created handler A nReconnectHandler to use if the connection to the Server is lost username A String token to use when authenticating with the server
- Returns:
- the newly created nSession object
- Exceptions:
-
nIllegalArgumentException if the nSessionAttributes is invalid
- See also:
- nReconnectHandler
| 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:
-
attr The nSessionAttributes object containing the parameters for the session to be created handler A nReconnectHandler to use if the connection to the Server is lost
- Returns:
- the newly created nSession object
- Exceptions:
-
nIllegalArgumentException if the nSessionAttributes 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:
-
attr The nSessionAttributes object containing the parameters for the session to be created
- Returns:
- the newly created nSession object
- Exceptions:
-
nIllegalArgumentException if the nSessionAttributes is invalid
| 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:
-
session the session to muliplex the connection with
- Returns:
- a multiplexed session
- Exceptions:
-
nIllegalArgumentException
| 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 | ( | ) | [static] |
Shuts down the session factory by closing all nirvana sessions that have been created.
