Class GroupSessionBuilder
- java.lang.Object
-
- org.signal.libsignal.protocol.groups.GroupSessionBuilder
-
public class GroupSessionBuilder extends java.lang.ObjectGroupSessionBuilder is responsible for setting up group SenderKey encrypted sessions. Once a session has been established,GroupCiphercan be used to encrypt/decrypt messages in that session.The built sessions are unidirectional: they can be used either for sending or for receiving, but not both. Sessions are constructed per (senderName + deviceId) tuple, with sending additionally parameterized on a per-group distributionId. Remote logical users are identified by their senderName, and each logical user can have multiple physical devices. This class is not thread-safe.
-
-
Constructor Summary
Constructors Constructor Description GroupSessionBuilder(SenderKeyStore senderKeyStore)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SenderKeyDistributionMessagecreate(SignalProtocolAddress sender, java.util.UUID distributionId)Construct a group session for sending messages.voidprocess(SignalProtocolAddress sender, SenderKeyDistributionMessage senderKeyDistributionMessage)Construct a group session for receiving messages from sender.
-
-
-
Constructor Detail
-
GroupSessionBuilder
public GroupSessionBuilder(SenderKeyStore senderKeyStore)
-
-
Method Detail
-
process
public void process(SignalProtocolAddress sender, SenderKeyDistributionMessage senderKeyDistributionMessage)
Construct a group session for receiving messages from sender.- Parameters:
sender- The address of the device that sent the message.senderKeyDistributionMessage- A received SenderKeyDistributionMessage.
-
create
public SenderKeyDistributionMessage create(SignalProtocolAddress sender, java.util.UUID distributionId)
Construct a group session for sending messages.- Parameters:
sender- The address of the current client.distributionId- An opaque identifier that uniquely identifies the group (but isn't the group ID).- Returns:
- A SenderKeyDistributionMessage that is individually distributed to each member of the group.
-
-