com.quorum.tessera.partyinfo.P2pClientFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tessera-partyinfo Show documentation
Show all versions of tessera-partyinfo Show documentation
Tessera is a stateless Java system that is used to enable the encryption, decryption, and distribution of private transactions for Quorum.
package com.quorum.tessera.partyinfo;
import com.quorum.tessera.ServiceLoaderUtil;
import com.quorum.tessera.config.CommunicationType;
import com.quorum.tessera.config.Config;
@Deprecated
// TODO: Remove the p2p clint and related factories.
public interface P2pClientFactory {
P2pClient create(Config config);
CommunicationType communicationType();
static P2pClientFactory newFactory(Config config) {
// TODO: return the stream and let the caller deal with it
return ServiceLoaderUtil.loadAll(P2pClientFactory.class)
.filter(c -> c.communicationType() == config.getP2PServerConfig().getCommunicationType())
.findFirst()
.get();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy