InMemorySessionStore class
In-memory implementation of SessionStore.
This implementation stores sessions in a Map and is suitable for testing and prototyping. For production use, implement a persistent store backed by a database or secure storage.
Note: This implementation does NOT persist data across app restarts. It therefore meets none of the durability requirements in SessionStore — every restart is a full rollback of the ratchet, which is why it must not be used for real conversations. durable_file_stores.dart shows a persistent store that does meet them.
- Implemented types
Constructors
Properties
Methods
-
clear(
) → void - Clears all stored sessions.
-
containsSession(
ProtocolAddress address) → Future< bool> -
Checks if a session exists for the given address.
override
-
deleteAllSessions(
String name) → Future< void> -
Deletes all sessions for the given name (user).
override
-
deleteSession(
ProtocolAddress address) → Future< void> -
Deletes the session for the given address.
override
-
getSubDeviceSessions(
String name) → Future< List< int> > -
Gets all device IDs with sessions for the given name (user).
override
-
loadSession(
ProtocolAddress address) → Future< SessionRecord?> -
Loads a session record for the given address.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
storeSession(
ProtocolAddress address, SessionRecord record) → Future< void> -
Stores a session record for the given address.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited