com.google.inject.multibindings.ProvidesIntoSet Java Examples

The following examples show how to use com.google.inject.multibindings.ProvidesIntoSet. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: JMXServerModule.java    From james-project with Apache License 2.0 6 votes vote down vote up
@ProvidesIntoSet
InitializationOperation startJmxServer(JMXServer jmxServer,
                                    DomainListManagementMBean domainListManagementMBean,
                                    UsersRepositoryManagementMBean usersRepositoryManagementMBean,
                                    RecipientRewriteTableManagementMBean recipientRewriteTableManagementMBean,
                                    MailboxManagerManagementMBean mailboxManagerManagementMBean,
                                    MailboxCopierManagementMBean mailboxCopierManagementMBean,
                                    ReIndexerManagementMBean reIndexerManagementMBean,
                                    QuotaManagementMBean quotaManagementMBean,
                                    SieveRepositoryManagementMBean sieveRepositoryManagementMBean) {
    return InitilizationOperationBuilder
        .forClass(JMXServer.class)
        .init(() -> {
            jmxServer.start();
            jmxServer.register(JMX_COMPONENT_DOMAINLIST, domainListManagementMBean);
            jmxServer.register(JMX_COMPONENT_USERS_REPOSITORY, usersRepositoryManagementMBean);
            jmxServer.register(JMX_COMPONENT_RECIPIENTREWRITETABLE, recipientRewriteTableManagementMBean);
            jmxServer.register(JMX_COMPONENT_NAME_MAILBOXMANAGERBEAN, mailboxManagerManagementMBean);
            jmxServer.register(JMX_COMPONENT_MAILBOXCOPIER, mailboxCopierManagementMBean);
            jmxServer.register(JMX_COMPONENT_REINDEXER, reIndexerManagementMBean);
            jmxServer.register(JMX_COMPONENT_QUOTA, quotaManagementMBean);
            jmxServer.register(JMX_COMPONENT_SIEVE, sieveRepositoryManagementMBean);
        });
}
 
Example #2
Source File: JMAPServerModule.java    From james-project with Apache License 2.0 5 votes vote down vote up
@ProvidesIntoSet
JMAPRoutesHandler routesHandler(AuthenticationRoutes authenticationRoutes,
                                JMAPApiRoutes jmapApiRoutes,
                                UploadRoutes uploadRoutes,
                                DownloadRoutes  downloadRoutes) {
    return new JMAPRoutesHandler(Version.DRAFT,
        authenticationRoutes,
        jmapApiRoutes,
        uploadRoutes,
        downloadRoutes);
}
 
Example #3
Source File: JMAPServerModule.java    From james-project with Apache License 2.0 5 votes vote down vote up
@ProvidesIntoSet
InitializationOperation startJmap(JMAPServer server, JamesSignatureHandler signatureHandler, JMAPConfiguration jmapConfiguration) {
    return InitilizationOperationBuilder
        .forClass(JMAPServer.class)
        .init(() -> {
            if (jmapConfiguration.isEnabled()) {
                signatureHandler.init();
                server.start();
                registerPEMWithSecurityProvider();
            }
        });
}
 
Example #4
Source File: LMTPServerModule.java    From james-project with Apache License 2.0 5 votes vote down vote up
@ProvidesIntoSet
InitializationOperation configureLmtp(ConfigurationProvider configurationProvider, LMTPServerFactory lmtpServerFactory) {
    return InitilizationOperationBuilder
        .forClass(LMTPServerFactory.class)
        .init(() -> {
            lmtpServerFactory.configure(configurationProvider.getConfiguration("lmtpserver", LoggingLevel.INFO));
            lmtpServerFactory.init();
        });
}
 
Example #5
Source File: ManageSieveServerModule.java    From james-project with Apache License 2.0 5 votes vote down vote up
@ProvidesIntoSet
InitializationOperation configureManageSieve(ConfigurationProvider configurationProvider, ManageSieveServerFactory manageSieveServerFactory) {
    return InitilizationOperationBuilder
        .forClass(ManageSieveServerFactory.class)
        .init(() -> {
            manageSieveServerFactory.configure(configurationProvider.getConfiguration("managesieveserver", LoggingLevel.INFO));
            manageSieveServerFactory.init();
        });
}
 
Example #6
Source File: DNSServiceModule.java    From james-project with Apache License 2.0 5 votes vote down vote up
@ProvidesIntoSet
InitializationOperation configureDNS(ConfigurationProvider configurationProvider, DNSJavaService dnsService) {
    return InitilizationOperationBuilder
        .forClass(DNSJavaService.class)
        .init(() -> {
            dnsService.configure(configurationProvider.getConfiguration("dnsservice"));
            dnsService.init();
        });
}
 
Example #7
Source File: WebAdminReIndexingTaskSerializationModule.java    From james-project with Apache License 2.0 4 votes vote down vote up
@Named(DTOModuleInjections.WEBADMIN_DTO)
@ProvidesIntoSet
public AdditionalInformationDTOModule<? extends TaskExecutionDetails.AdditionalInformation, ? extends  AdditionalInformationDTO> singleMailboxReindexingAdditionalInformation(MailboxId.Factory mailboxIdFactory) {
    return WebAdminSingleMailboxReindexingTaskAdditionalInformationDTO.serializationModule(mailboxIdFactory);
}
 
Example #8
Source File: WebAdminReIndexingTaskSerializationModule.java    From james-project with Apache License 2.0 4 votes vote down vote up
@Named(DTOModuleInjections.WEBADMIN_DTO)
@ProvidesIntoSet
public AdditionalInformationDTOModule<? extends TaskExecutionDetails.AdditionalInformation, ? extends  AdditionalInformationDTO> fullReindexAdditionalInformation(MailboxId.Factory mailboxIdFactory) {
    return WebAdminReprocessingContextInformationDTO.WebAdminFullIndexationDTO.serializationModule(mailboxIdFactory);
}
 
Example #9
Source File: VaultTaskSerializationModule.java    From james-project with Apache License 2.0 4 votes vote down vote up
@ProvidesIntoSet
public TaskDTOModule<? extends Task, ? extends TaskDTO> deletedMessagesVaultRestoreTask(DeletedMessagesVaultRestoreTaskDTO.Factory factory) {
    return DeletedMessagesVaultRestoreTaskDTO.module(factory);
}
 
Example #10
Source File: WebAdminReIndexingTaskSerializationModule.java    From james-project with Apache License 2.0 4 votes vote down vote up
@Named(DTOModuleInjections.WEBADMIN_DTO)
@ProvidesIntoSet
public AdditionalInformationDTOModule<? extends TaskExecutionDetails.AdditionalInformation, ? extends  AdditionalInformationDTO> userReindexingAdditionalInformation(MailboxId.Factory mailboxIdFactory) {
    return WebAdminUserReindexingTaskAdditionalInformationDTO.serializationModule(mailboxIdFactory);
}
 
Example #11
Source File: CassandraConsistencyTaskSerializationModule.java    From james-project with Apache License 2.0 4 votes vote down vote up
@Named(DTOModuleInjections.WEBADMIN_DTO)
@ProvidesIntoSet
public AdditionalInformationDTOModule<? extends TaskExecutionDetails.AdditionalInformation, ? extends  AdditionalInformationDTO> webAdminCassandraMappingsSolveInconsistenciesAdditionalInformation() {
    return MappingsSourcesMigrationTaskAdditionalInformationDTO.module(CassandraMappingsSolveInconsistenciesTask.TYPE);
}
 
Example #12
Source File: CassandraConsistencyTaskSerializationModule.java    From james-project with Apache License 2.0 4 votes vote down vote up
@ProvidesIntoSet
public TaskDTOModule<? extends Task, ? extends TaskDTO> migrationTask(MigrationTask.Factory factory) {
    return MigrationTaskDTO.module(factory);
}
 
Example #13
Source File: WebadminMailboxTaskSerializationModule.java    From james-project with Apache License 2.0 4 votes vote down vote up
@Named(DTOModuleInjections.WEBADMIN_DTO)
@ProvidesIntoSet
public AdditionalInformationDTOModule<? extends TaskExecutionDetails.AdditionalInformation, ? extends  AdditionalInformationDTO> webAdminRecomputeCurrentQuotasAdditionalInformation() {
    return RecomputeCurrentQuotasTaskAdditionalInformationDTO.module();
}
 
Example #14
Source File: WebadminMailboxExportTaskSerializationModule.java    From james-project with Apache License 2.0 4 votes vote down vote up
@ProvidesIntoSet
public TaskDTOModule<? extends Task, ? extends TaskDTO> mailboxesExportTask(ExportService exportService) {
    return MailboxesExportTask.module(exportService);
}
 
Example #15
Source File: PeriodicalHealthChecksModule.java    From james-project with Apache License 2.0 4 votes vote down vote up
@ProvidesIntoSet
InitializationOperation configurePeriodicalHealthChecks(PeriodicalHealthChecks periodicalHealthChecks) {
    return InitilizationOperationBuilder
        .forClass(PeriodicalHealthChecks.class)
        .init(periodicalHealthChecks::start);
}
 
Example #16
Source File: CassandraDomainListModule.java    From james-project with Apache License 2.0 4 votes vote down vote up
@ProvidesIntoSet
InitializationOperation configureDomainList(DomainListConfiguration configuration, CassandraDomainList cassandraDomainList) {
    return InitilizationOperationBuilder
        .forClass(CassandraDomainList.class)
        .init(() -> cassandraDomainList.configure(configuration));
}
 
Example #17
Source File: VaultTaskSerializationModule.java    From james-project with Apache License 2.0 4 votes vote down vote up
@Named(DTOModuleInjections.WEBADMIN_DTO)
@ProvidesIntoSet
public AdditionalInformationDTOModule<? extends TaskExecutionDetails.AdditionalInformation, ? extends  AdditionalInformationDTO> webAdminDeletedMessagesVaultDeleteAdditionalInformation(MessageId.Factory factory) {
    return WebAdminDeletedMessagesVaultDeleteTaskAdditionalInformationDTO.module(factory);
}
 
Example #18
Source File: WebAdminReIndexingTaskSerializationModule.java    From james-project with Apache License 2.0 4 votes vote down vote up
@Named(DTOModuleInjections.WEBADMIN_DTO)
@ProvidesIntoSet
public AdditionalInformationDTOModule<? extends TaskExecutionDetails.AdditionalInformation, ? extends  AdditionalInformationDTO> messageIdReindexingAdditionalInformation(MessageId.Factory messageIdFactory) {
    return MessageIdReindexingTaskAdditionalInformationDTO.module(messageIdFactory);
}
 
Example #19
Source File: WebadminMailboxTaskSerializationModule.java    From james-project with Apache License 2.0 4 votes vote down vote up
@ProvidesIntoSet
public TaskDTOModule<? extends Task, ? extends TaskDTO> eventDeadLettersRedeliverOneTask(EventDeadLettersRedeliverService service) {
    return EventDeadLettersRedeliverOneTaskDTO.module(service);
}
 
Example #20
Source File: WebAdminReIndexingTaskSerializationModule.java    From james-project with Apache License 2.0 4 votes vote down vote up
@Named(DTOModuleInjections.WEBADMIN_DTO)
@ProvidesIntoSet
public AdditionalInformationDTOModule<? extends TaskExecutionDetails.AdditionalInformation, ? extends  AdditionalInformationDTO> errorRecoveryAdditionalInformation(MailboxId.Factory mailboxIdFactory) {
    return WebAdminReprocessingContextInformationDTO.WebAdminErrorRecoveryIndexationDTO.serializationModule(mailboxIdFactory);
}
 
Example #21
Source File: MailQueueTaskSerializationModule.java    From james-project with Apache License 2.0 4 votes vote down vote up
@Named(DTOModuleInjections.WEBADMIN_DTO)
@ProvidesIntoSet
public AdditionalInformationDTOModule<? extends TaskExecutionDetails.AdditionalInformation, ? extends  AdditionalInformationDTO> webAdminDeleteMailsFromMailQueueAdditionalInformation() {
    return WebAdminDeleteMailsFromMailQueueTaskAdditionalInformationDTO.module();
}
 
Example #22
Source File: DistributedTaskSerializationModule.java    From james-project with Apache License 2.0 4 votes vote down vote up
@ProvidesIntoSet
public EventDTOModule<? extends Event, ? extends EventDTO> taskCompletedSerialization(JsonTaskSerializer jsonTaskSerializer,
                                                       DTOConverter<TaskExecutionDetails.AdditionalInformation, AdditionalInformationDTO> additionalInformationConverter,
                                                       DTOConverter<Task, TaskDTO> taskConverter) {
    return TasksSerializationModule.COMPLETED.create(jsonTaskSerializer, additionalInformationConverter, taskConverter);
}
 
Example #23
Source File: CassandraConsistencyTaskSerializationModule.java    From james-project with Apache License 2.0 4 votes vote down vote up
@Named(DTOModuleInjections.WEBADMIN_DTO)
@ProvidesIntoSet
public AdditionalInformationDTOModule<? extends TaskExecutionDetails.AdditionalInformation, ? extends  AdditionalInformationDTO> webAdminSolveMailboxInconsistenciesAdditionalInformation() {
    return SolveMailboxInconsistenciesTaskAdditionalInformationDTO.module();
}
 
Example #24
Source File: MailQueueTaskSerializationModule.java    From james-project with Apache License 2.0 4 votes vote down vote up
@ProvidesIntoSet
public AdditionalInformationDTOModule<? extends TaskExecutionDetails.AdditionalInformation, ? extends  AdditionalInformationDTO> clearMailQueueAdditionalInformation() {
    return ClearMailQueueTaskAdditionalInformationDTO.module();
}
 
Example #25
Source File: CassandraConsistencyTaskSerializationModule.java    From james-project with Apache License 2.0 4 votes vote down vote up
@Named(DTOModuleInjections.WEBADMIN_DTO)
@ProvidesIntoSet
public AdditionalInformationDTOModule<? extends TaskExecutionDetails.AdditionalInformation, ? extends  AdditionalInformationDTO> webAdminMigrationTaskAdditionalInformation() {
    return WebAdminMigrationTaskAdditionalInformationDTO.module();
}
 
Example #26
Source File: DistributedTaskSerializationModule.java    From james-project with Apache License 2.0 4 votes vote down vote up
@ProvidesIntoSet
public EventDTOModule<? extends Event, ? extends EventDTO> taskCancelledSerialization(JsonTaskSerializer jsonTaskSerializer,
                                                       DTOConverter<TaskExecutionDetails.AdditionalInformation, AdditionalInformationDTO> additionalInformationConverter,
                                                       DTOConverter<Task, TaskDTO> taskConverter) {
    return TasksSerializationModule.CANCELLED.create(jsonTaskSerializer, additionalInformationConverter, taskConverter);
}
 
Example #27
Source File: JmapTaskSerializationModule.java    From james-project with Apache License 2.0 4 votes vote down vote up
@Named(DTOModuleInjections.WEBADMIN_DTO)
@ProvidesIntoSet
public AdditionalInformationDTOModule<? extends TaskExecutionDetails.AdditionalInformation, ? extends  AdditionalInformationDTO> webAdminRecomputeUserJmapPreviewsAdditionalInformation() {
    return RecomputeUserFastViewTaskAdditionalInformationDTO.module();
}
 
Example #28
Source File: JmapTaskSerializationModule.java    From james-project with Apache License 2.0 4 votes vote down vote up
@ProvidesIntoSet
public AdditionalInformationDTOModule<? extends TaskExecutionDetails.AdditionalInformation, ? extends  AdditionalInformationDTO> recomputeUserJmapPreviewsAdditionalInformation() {
    return RecomputeUserFastViewTaskAdditionalInformationDTO.module();
}
 
Example #29
Source File: VaultTaskSerializationModule.java    From james-project with Apache License 2.0 4 votes vote down vote up
@ProvidesIntoSet
public TaskDTOModule<? extends Task, ? extends TaskDTO> blobStoreVaultGarbageCollectionTask(BlobStoreVaultGarbageCollectionTask.Factory factory) {
    return BlobStoreVaultGarbageCollectionTaskDTO.module(factory);
}
 
Example #30
Source File: CassandraConsistencyTaskSerializationModule.java    From james-project with Apache License 2.0 4 votes vote down vote up
@ProvidesIntoSet
public TaskDTOModule<? extends Task, ? extends TaskDTO> solveMailboxInconsistenciesTask(SolveMailboxInconsistenciesService service) {
    return SolveMailboxInconsistenciesTaskDTO.module(service);
}