# class Session

###

Module | akonadi
Namespace | Akonadi
Class | Session
Inherits | QObject

A communication session with the Akonadi storage. Every Job object has to be associated with a Session. The session is responsible of scheduling its jobs. For now only a simple serial execution is impleneted (the IMAP-like protocol to communicate with the storage backend is capable of parallel execution on a single session though).

### methods

- Session (sessionId, parent)

  returns ctor

  Argument | Type | Default
  --- | --- | ---
  sessionId | QByteArray | QByteArray()
  parent | QObject | 0

  Open a new session to the Akonadi storage.

  sessionId - The identifier for this session, will be a random vaule if empty.

  parent - The parent object.

  See also defaultSession()

- clear ( )

  returns Nothing

  Stops all jobs queued for execution.

- defaultSession ( )

  returns Akonadi.Session
  static

  Returns the default session for this thread.

- sessionId ( )

  returns QByteArray

  Returns the session identifier.