Search in sources :

Example 1 with InvitationManager

use of io.kamax.mxisd.invitation.InvitationManager in project mxisd by kamax-io.

the class Mxisd method build.

private void build() {
    httpClient = HttpClients.custom().setUserAgent(Agent).setMaxConnPerRoute(Integer.MAX_VALUE).setMaxConnTotal(Integer.MAX_VALUE).build();
    FederationDnsOverwrite fedDns = new FederationDnsOverwrite(cfg.getDns().getOverwrite());
    HomeserverFederationResolver resolver = new HomeserverFederationResolver(fedDns, httpClient);
    IdentityServerUtils.setHttpClient(httpClient);
    srvFetcher = new RemoteIdentityServerFetcher(httpClient);
    store = new OrmLiteSqlStorage(cfg);
    keyMgr = CryptoFactory.getKeyManager(cfg.getKey());
    signMgr = CryptoFactory.getSignatureManager(cfg, keyMgr);
    clientDns = new ClientDnsOverwrite(cfg.getDns().getOverwrite());
    synapse = new Synapse(cfg.getSynapseSql());
    BridgeFetcher bridgeFetcher = new BridgeFetcher(cfg.getLookup().getRecursive().getBridge(), srvFetcher);
    ServiceLoader.load(IdentityStoreSupplier.class).iterator().forEachRemaining(p -> p.accept(this));
    ServiceLoader.load(NotificationHandlerSupplier.class).iterator().forEachRemaining(p -> p.accept(this));
    idStrategy = new RecursivePriorityLookupStrategy(cfg.getLookup(), ThreePidProviders.get(), bridgeFetcher);
    pMgr = new ProfileManager(ProfileProviders.get(), clientDns, httpClient);
    notifMgr = new NotificationManager(cfg.getNotification(), NotificationHandlers.get());
    sessMgr = new SessionManager(cfg.getSession(), cfg.getMatrix(), store, notifMgr);
    invMgr = new InvitationManager(cfg, store, idStrategy, keyMgr, signMgr, resolver, notifMgr, pMgr);
    authMgr = new AuthManager(cfg, AuthProviders.get(), idStrategy, invMgr, clientDns, httpClient);
    dirMgr = new DirectoryManager(cfg.getDirectory(), clientDns, httpClient, DirectoryProviders.get());
    regMgr = new RegistrationManager(cfg.getRegister(), httpClient, clientDns, invMgr);
    asHander = new AppSvcManager(this);
}
Also used : ProfileManager(io.kamax.mxisd.profile.ProfileManager) IRemoteIdentityServerFetcher(io.kamax.mxisd.lookup.fetcher.IRemoteIdentityServerFetcher) RemoteIdentityServerFetcher(io.kamax.mxisd.lookup.provider.RemoteIdentityServerFetcher) BridgeFetcher(io.kamax.mxisd.lookup.provider.BridgeFetcher) RegistrationManager(io.kamax.mxisd.registration.RegistrationManager) OrmLiteSqlStorage(io.kamax.mxisd.storage.ormlite.OrmLiteSqlStorage) InvitationManager(io.kamax.mxisd.invitation.InvitationManager) NotificationManager(io.kamax.mxisd.notification.NotificationManager) AuthManager(io.kamax.mxisd.auth.AuthManager) SessionManager(io.kamax.mxisd.session.SessionManager) DirectoryManager(io.kamax.mxisd.directory.DirectoryManager) ClientDnsOverwrite(io.kamax.mxisd.dns.ClientDnsOverwrite) Synapse(io.kamax.mxisd.backend.sql.synapse.Synapse) AppSvcManager(io.kamax.mxisd.as.AppSvcManager) HomeserverFederationResolver(io.kamax.mxisd.matrix.HomeserverFederationResolver) RecursivePriorityLookupStrategy(io.kamax.mxisd.lookup.strategy.RecursivePriorityLookupStrategy) FederationDnsOverwrite(io.kamax.mxisd.dns.FederationDnsOverwrite)

Aggregations

AppSvcManager (io.kamax.mxisd.as.AppSvcManager)1 AuthManager (io.kamax.mxisd.auth.AuthManager)1 Synapse (io.kamax.mxisd.backend.sql.synapse.Synapse)1 DirectoryManager (io.kamax.mxisd.directory.DirectoryManager)1 ClientDnsOverwrite (io.kamax.mxisd.dns.ClientDnsOverwrite)1 FederationDnsOverwrite (io.kamax.mxisd.dns.FederationDnsOverwrite)1 InvitationManager (io.kamax.mxisd.invitation.InvitationManager)1 IRemoteIdentityServerFetcher (io.kamax.mxisd.lookup.fetcher.IRemoteIdentityServerFetcher)1 BridgeFetcher (io.kamax.mxisd.lookup.provider.BridgeFetcher)1 RemoteIdentityServerFetcher (io.kamax.mxisd.lookup.provider.RemoteIdentityServerFetcher)1 RecursivePriorityLookupStrategy (io.kamax.mxisd.lookup.strategy.RecursivePriorityLookupStrategy)1 HomeserverFederationResolver (io.kamax.mxisd.matrix.HomeserverFederationResolver)1 NotificationManager (io.kamax.mxisd.notification.NotificationManager)1 ProfileManager (io.kamax.mxisd.profile.ProfileManager)1 RegistrationManager (io.kamax.mxisd.registration.RegistrationManager)1 SessionManager (io.kamax.mxisd.session.SessionManager)1 OrmLiteSqlStorage (io.kamax.mxisd.storage.ormlite.OrmLiteSqlStorage)1