public class SessionBuilder
extends java.lang.Object
SessionCipher
can be used to encrypt/decrypt messages in that session.
Sessions are built from one of three different possible vectors:
PreKeyBundle retrieved from a server.PreKeySignalMessage received from a client.| Constructor and Description |
|---|
SessionBuilder(SessionStore sessionStore,
PreKeyStore preKeyStore,
SignedPreKeyStore signedPreKeyStore,
IdentityKeyStore identityKeyStore,
SignalProtocolAddress remoteAddress)
Constructs a SessionBuilder.
|
SessionBuilder(SignalProtocolStore store,
SignalProtocolAddress remoteAddress)
Constructs a SessionBuilder
|
| Modifier and Type | Method and Description |
|---|---|
void |
process(PreKeyBundle preKey)
Build a new session from a
PreKeyBundle retrieved from
a server. |
public SessionBuilder(SessionStore sessionStore, PreKeyStore preKeyStore, SignedPreKeyStore signedPreKeyStore, IdentityKeyStore identityKeyStore, SignalProtocolAddress remoteAddress)
sessionStore - The SessionStore to store the constructed session in.preKeyStore - The PreKeyStore where the client's local PreKeyRecords are stored.identityKeyStore - The IdentityKeyStore containing the client's identity key information.remoteAddress - The address of the remote user to build a session with.public SessionBuilder(SignalProtocolStore store, SignalProtocolAddress remoteAddress)
store - The SignalProtocolStore to store all state information in.remoteAddress - The address of the remote user to build a session with.public void process(PreKeyBundle preKey) throws InvalidKeyException, UntrustedIdentityException
PreKeyBundle retrieved from
a server.preKey - A PreKey for the destination recipient, retrieved from a server.InvalidKeyException - when the PreKeyBundle is
badly formatted.UntrustedIdentityException - when the sender's
IdentityKey is not
trusted.