All Downloads are FREE. Search and download functionalities are using the official Maven repository.

it.auties.whatsapp.model.signal.session.SessionChainBuilder Maven / Gradle / Ivy

package it.auties.whatsapp.model.signal.session;

public class SessionChainBuilder {
    private java.util.concurrent.atomic.AtomicInteger counter;
    private java.util.concurrent.atomic.AtomicReference key;
    private java.util.concurrent.ConcurrentHashMap messageKeys;

    public SessionChainBuilder() {
        counter = it.auties.protobuf.builtin.ProtobufAtomicMixin.newAtomicInt();
        key = it.auties.protobuf.builtin.ProtobufAtomicMixin.newAtomicReference();
        messageKeys = new java.util.concurrent.ConcurrentHashMap();
    }

    public SessionChainBuilder counter(java.lang.Integer counter) {
        this.counter = it.auties.protobuf.builtin.ProtobufAtomicMixin.ofAtomic(counter);
        return this;
    }

    public SessionChainBuilder key(byte[] key) {
        this.key = it.auties.protobuf.builtin.ProtobufAtomicMixin.ofAtomic(key);
        return this;
    }

    public SessionChainBuilder messageKeys(java.util.concurrent.ConcurrentHashMap messageKeys) {
        this.messageKeys = messageKeys;
        return this;
    }

    public it.auties.whatsapp.model.signal.session.SessionChain build() {
        return new it.auties.whatsapp.model.signal.session.SessionChain(counter, key, messageKeys);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy