-
Notifications
You must be signed in to change notification settings - Fork 7
Session Manager
The SessionManager object manages all sessions instantiated by the client.
-
- sessions: A list of active Session Objects currently being managed
-
readinessState: An object containing:
- status: property indicating the number of sessions being managed
- value: property containing platform specific information, a boolean ready indicating that the driver is ready to accept new connections
-
-
createSession(requestBody) - takes the HTTP request body as an arugment. It instantiates a Session object by calling its constructor with requestBody as an argument which performs further validation. If no error is thrown by the Session object constructor, the newly created session is added to the SessionManager object's sessions list. A sessionConfig object is created and returned detailing the session's supported capabilties.
-
findSession(sessionID) - accepts a uuid v1 string identifying a session which it uses to find a specific session within its sessions list. Throws an InvalidSessionId error if the session id is not in the list of active sessions.
-
deleteSession(currentSession, request) - accepts the current Session Object and a string (request) indicating the command to be processed by the Session Object's process method. Finds the index of the current Session Object and removes it from the active sessions list once the Session's process method has completed execution.
-
getReadinessState - updates the SessionManager's readiness state status property before returning the readinesss state.
-