Package | com.pcbsys.nirvana.client |
Class | public class nSessionFactory |
Inheritance | nSessionFactory ![]() |
Property | Defined By | ||
---|---|---|---|
enableDebugLogging : Boolean [static]
Returns the current state of the debug flag
| nSessionFactory | ||
largeBufferIdleDetection : int [static]
Returns the current idle detection time in milliseconds
| nSessionFactory |
Method | Defined By | ||
---|---|---|---|
[static]
Closes a Nirvana session
| nSessionFactory | ||
create(attributes:nSessionAttributes, userName:String, appName:String, errorCB:Function = null):nSession [static]
Creates an nSession object (Nirvana session) based on the nSessionAttributes object and
the specified reconnect handler. | nSessionFactory | ||
createMultiplexed(session:nSession, newSessionCallback:Function, errorCB:Function, username:String = null):void [static]
Enable another session to be constructed that shares the physical connection with the nSession being passed. | nSessionFactory | ||
createMultiplexedWithAttributes(sessionAttributes:nSessionAttributes, newSessionCallback:Function, userName:String, appName:String, errorCB:Function = null):void [static]
Create a multiplexed session with the given session attributes, and call new SessionCallback upon creation
| nSessionFactory | ||
[static]
Gets the number of nirvana sessions vended
| nSessionFactory | ||
shutdown():void [static]
Shuts down the session factory by closing all nirvana sessions that have
been created
| nSessionFactory |
enableDebugLogging | property |
enableDebugLogging:Boolean
Returns the current state of the debug flag
Implementation
public static function get enableDebugLogging():Boolean
public static function set enableDebugLogging(value:Boolean):void
largeBufferIdleDetection | property |
largeBufferIdleDetection:int
Returns the current idle detection time in milliseconds
Implementation
public static function get largeBufferIdleDetection():int
public static function set largeBufferIdleDetection(value:int):void
close | () | method |
public static function close(session:nSession):void
Closes a Nirvana session
Parameters
session:nSession — The nSession object to be closed
|
create | () | method |
public static function create(attributes:nSessionAttributes, userName:String, appName:String, errorCB:Function = null):nSession
Creates an nSession object (Nirvana session) based on the nSessionAttributes object and the specified reconnect handler.
Parameters
attributes:nSessionAttributes — The nSessionAttributes object containing the parameters for the session to be created.
| |
userName:String — The user name to be used by this session to authenticate.
| |
appName:String — The Name of the application.
| |
errorCB:Function (default = null ) — The errorCB for any server exceptions that cannot be dealt with in their respective functions
|
nSession — the newly created nSession object.
|
Throws
nSessionAttributesNullError — If a null nSessionAttributes is supplied
| |
nSessionUsernameNullError — If a null username is supplied
|
createMultiplexed | () | method |
public static function createMultiplexed(session:nSession, newSessionCallback:Function, errorCB:Function, username:String = null):void
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:nSession — the session to multiplex the connection with
| |
newSessionCallback:Function — will callback with the new session once setup.
| |
errorCB:Function — the error handling function to call upon failure
| |
username:String (default = null ) — the username to set for the new session, if not supplied the nSession username will be used.
|
Throws
nIllegalArgumentError
— |
createMultiplexedWithAttributes | () | method |
public static function createMultiplexedWithAttributes(sessionAttributes:nSessionAttributes, newSessionCallback:Function, userName:String, appName:String, errorCB:Function = null):void
Create a multiplexed session with the given session attributes, and call new SessionCallback upon creation
Parameters
sessionAttributes:nSessionAttributes — the attributes used to create a session
| |
newSessionCallback:Function — the callback that will receive the new nSession or a nSessionNotInitialisedError if a existing session to the same realm is not initialised.
| |
userName:String — the user name used for this session
| |
appName:String — the appName used when no physical connection exists to the desired realm
| |
errorCB:Function (default = null ) — The errorCB for this session with any server exceptions that cannot be dealt with in their respective functions
|
getNumberOfVendedConnections | () | method |
public static function getNumberOfVendedConnections():int
Gets the number of nirvana sessions vended
Returnsint — int specifying the number of nirvana sessions vended with this
session factory
|
shutdown | () | method |
public static function shutdown():void
Shuts down the session factory by closing all nirvana sessions that have been created