Interface SessionStore

  • All Implemented Interfaces:

    @CalledFromNative() 
    public interface SessionStore
    
                        

    The interface to the durable store of session state information for remote clients.

    Author:

    Moxie Marlinspike

    • Constructor Detail

    • Method Detail

      • loadSession

         abstract SessionRecord loadSession(SignalProtocolAddress address)

        Returns a copy of the SessionRecord corresponding to the recipientId + deviceId tuple, or a new SessionRecord if one does not currently exist.

        It is important that implementations return a copy of the current durable information. The returned SessionRecord may be modified, but those changes should not have an effect on the durable session state (what is returned by subsequent calls to this method) without the store method being called here first.

        Parameters:
        address - The name and device ID of the remote client.
        Returns:

        a copy of the SessionRecord corresponding to the recipientId + deviceId tuple, or a new SessionRecord if one does not currently exist.

      • getSubDeviceSessions

         abstract List<Integer> getSubDeviceSessions(String name)

        Returns all known devices with active sessions for a recipient

        Parameters:
        name - the name of the client.
        Returns:

        all known sub-devices with active sessions.

      • deleteAllSessions

         abstract void deleteAllSessions(String name)

        Remove the SessionRecords corresponding to all devices of a recipientId.

        Parameters:
        name - the name of the remote client.