com.google.inject.multibindings.ProvidesIntoSet源码实例Demo

类com.google.inject.multibindings.ProvidesIntoSet源码实例Demo

下面列出了com.google.inject.multibindings.ProvidesIntoSet 类实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: james-project   文件: JMXServerModule.java
@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);
        });
}
 
源代码2 项目: james-project   文件: JMAPServerModule.java
@ProvidesIntoSet
InitializationOperation startJmap(JMAPServer server, JamesSignatureHandler signatureHandler, JMAPConfiguration jmapConfiguration) {
    return InitilizationOperationBuilder
        .forClass(JMAPServer.class)
        .init(() -> {
            if (jmapConfiguration.isEnabled()) {
                signatureHandler.init();
                server.start();
                registerPEMWithSecurityProvider();
            }
        });
}
 
源代码3 项目: james-project   文件: JMAPServerModule.java
@ProvidesIntoSet
JMAPRoutesHandler routesHandler(AuthenticationRoutes authenticationRoutes,
                                JMAPApiRoutes jmapApiRoutes,
                                UploadRoutes uploadRoutes,
                                DownloadRoutes  downloadRoutes) {
    return new JMAPRoutesHandler(Version.DRAFT,
        authenticationRoutes,
        jmapApiRoutes,
        uploadRoutes,
        downloadRoutes);
}
 
源代码4 项目: james-project   文件: DNSServiceModule.java
@ProvidesIntoSet
InitializationOperation configureDNS(ConfigurationProvider configurationProvider, DNSJavaService dnsService) {
    return InitilizationOperationBuilder
        .forClass(DNSJavaService.class)
        .init(() -> {
            dnsService.configure(configurationProvider.getConfiguration("dnsservice"));
            dnsService.init();
        });
}
 
源代码5 项目: james-project   文件: ManageSieveServerModule.java
@ProvidesIntoSet
InitializationOperation configureManageSieve(ConfigurationProvider configurationProvider, ManageSieveServerFactory manageSieveServerFactory) {
    return InitilizationOperationBuilder
        .forClass(ManageSieveServerFactory.class)
        .init(() -> {
            manageSieveServerFactory.configure(configurationProvider.getConfiguration("managesieveserver", LoggingLevel.INFO));
            manageSieveServerFactory.init();
        });
}
 
源代码6 项目: james-project   文件: LMTPServerModule.java
@ProvidesIntoSet
InitializationOperation configureLmtp(ConfigurationProvider configurationProvider, LMTPServerFactory lmtpServerFactory) {
    return InitilizationOperationBuilder
        .forClass(LMTPServerFactory.class)
        .init(() -> {
            lmtpServerFactory.configure(configurationProvider.getConfiguration("lmtpserver", LoggingLevel.INFO));
            lmtpServerFactory.init();
        });
}
 
源代码7 项目: presto   文件: SystemConnectorModule.java
@ProvidesIntoSet
public static Procedure getKillQueryProcedure(KillQueryProcedure procedure)
{
    return procedure.getProcedure();
}
 
源代码8 项目: presto   文件: HandleJsonModule.java
@ProvidesIntoSet
public static com.fasterxml.jackson.databind.Module tableHandleModule(HandleResolver resolver)
{
    return new AbstractTypedJacksonModule<ConnectorTableHandle>(ConnectorTableHandle.class, resolver::getId, resolver::getTableHandleClass) {};
}
 
源代码9 项目: presto   文件: HandleJsonModule.java
@ProvidesIntoSet
public static com.fasterxml.jackson.databind.Module tableLayoutHandleModule(HandleResolver resolver)
{
    return new AbstractTypedJacksonModule<ConnectorTableLayoutHandle>(ConnectorTableLayoutHandle.class, resolver::getId, resolver::getTableLayoutHandleClass) {};
}
 
@ProvidesIntoSet
public AdditionalInformationDTOModule<? extends TaskExecutionDetails.AdditionalInformation, ? extends  AdditionalInformationDTO> messageIdReindexingAdditionalInformation(MessageId.Factory messageIdFactory) {
    return MessageIdReindexingTaskAdditionalInformationDTO.module(messageIdFactory);
}
 
源代码11 项目: presto   文件: HandleJsonModule.java
@ProvidesIntoSet
public static com.fasterxml.jackson.databind.Module splitModule(HandleResolver resolver)
{
    return new AbstractTypedJacksonModule<ConnectorSplit>(ConnectorSplit.class, resolver::getId, resolver::getSplitClass) {};
}
 
源代码12 项目: presto   文件: HandleJsonModule.java
@ProvidesIntoSet
public static com.fasterxml.jackson.databind.Module outputTableHandleModule(HandleResolver resolver)
{
    return new AbstractTypedJacksonModule<ConnectorOutputTableHandle>(ConnectorOutputTableHandle.class, resolver::getId, resolver::getOutputTableHandleClass) {};
}
 
源代码13 项目: presto   文件: HandleJsonModule.java
@ProvidesIntoSet
public static com.fasterxml.jackson.databind.Module insertTableHandleModule(HandleResolver resolver)
{
    return new AbstractTypedJacksonModule<ConnectorInsertTableHandle>(ConnectorInsertTableHandle.class, resolver::getId, resolver::getInsertTableHandleClass) {};
}
 
源代码14 项目: presto   文件: HandleJsonModule.java
@ProvidesIntoSet
public static com.fasterxml.jackson.databind.Module indexHandleModule(HandleResolver resolver)
{
    return new AbstractTypedJacksonModule<ConnectorIndexHandle>(ConnectorIndexHandle.class, resolver::getId, resolver::getIndexHandleClass) {};
}
 
@ProvidesIntoSet
InitializationOperation configureRecipientRewriteTable(ConfigurationProvider configurationProvider, CassandraRecipientRewriteTable recipientRewriteTable) {
    return InitilizationOperationBuilder
        .forClass(CassandraRecipientRewriteTable.class)
        .init(() -> recipientRewriteTable.configure(configurationProvider.getConfiguration("recipientrewritetable")));
}
 
源代码16 项目: james-project   文件: DropWizardMetricsModule.java
@ProvidesIntoSet
InitializationOperation startMetricFactory(DropWizardMetricFactory instance) {
    return InitilizationOperationBuilder
        .forClass(DropWizardMetricFactory.class)
        .init(instance::start);
}
 
@ProvidesIntoSet
public TaskDTOModule<? extends Task, ? extends TaskDTO> cassandraMappingsSolveInconsistenciesTask(MappingsSourcesMigration migration, CassandraMappingsSourcesDAO dao) {
    return CassandraMappingsSolveInconsistenciesTask.module(migration, dao);
}
 
@ProvidesIntoSet
public AdditionalInformationDTOModule<? extends TaskExecutionDetails.AdditionalInformation, ? extends  AdditionalInformationDTO> userReindexingAdditionalInformation(MailboxId.Factory mailboxIdFactory) {
    return UserReindexingTaskAdditionalInformationDTO.module(mailboxIdFactory);
}
 
源代码19 项目: presto-kudu   文件: KuduModule.java
@ProvidesIntoSet
Procedure getAddRangePartitionProcedure(RangePartitionProcedures procedures) {
    return procedures.getAddPartitionProcedure();
}
 
源代码20 项目: presto-kudu   文件: KuduModule.java
@ProvidesIntoSet
Procedure getDropRangePartitionProcedure(RangePartitionProcedures procedures) {
    return procedures.getDropPartitionProcedure();
}
 
@ProvidesIntoSet
InitializationOperation startReporter(ESMetricReporter instance) {
    return InitilizationOperationBuilder
        .forClass(ESMetricReporter.class)
        .init(instance::start);
}
 
@ProvidesIntoSet
public AdditionalInformationDTOModule<? extends TaskExecutionDetails.AdditionalInformation, ? extends  AdditionalInformationDTO> deletedMessagesVaultRestoreAdditionalInformation() {
    return DeletedMessagesVaultRestoreTaskAdditionalInformationDTO.module();
}
 
@ProvidesIntoSet
public AdditionalInformationDTOModule<? extends TaskExecutionDetails.AdditionalInformation, ? extends  AdditionalInformationDTO> deletedMessagesVaultDeleteAdditionalInformation(MessageId.Factory factory) {
    return DeletedMessagesVaultDeleteTaskAdditionalInformationDTO.module(factory);
}
 
@ProvidesIntoSet
public AdditionalInformationDTOModule<? extends TaskExecutionDetails.AdditionalInformation, ? extends  AdditionalInformationDTO> migrationTaskAdditionalInformation() {
    return MigrationTaskAdditionalInformationDTO.module();
}
 
@ProvidesIntoSet
InitializationOperation configureUsersRepository(ConfigurationProvider configurationProvider, UsersRepositoryImpl<CassandraUsersDAO> usersRepository) {
    return InitilizationOperationBuilder
        .forClass(UsersRepositoryImpl.class)
        .init(() -> usersRepository.configure(configurationProvider.getConfiguration("usersrepository")));
}
 
源代码26 项目: james-project   文件: MemoryDataModule.java
@ProvidesIntoSet
InitializationOperation configureRRT(ConfigurationProvider configurationProvider, MemoryRecipientRewriteTable memoryRecipientRewriteTable) {
    return InitilizationOperationBuilder
        .forClass(MemoryRecipientRewriteTable.class)
        .init(() -> memoryRecipientRewriteTable.configure(configurationProvider.getConfiguration("recipientrewritetable")));
}
 
@ProvidesIntoSet
InitializationOperation terminationSubscriber(RabbitMQTerminationSubscriber instance) {
    return InitilizationOperationBuilder
        .forClass(RabbitMQTerminationSubscriber.class)
        .init(instance::start);
}
 
@ProvidesIntoSet
public EventDTOModule<? extends Event, ? extends EventDTO> taskFailedSerialization(JsonTaskSerializer jsonTaskSerializer,
                                                    DTOConverter<TaskExecutionDetails.AdditionalInformation, AdditionalInformationDTO> additionalInformationConverter,
                                                    DTOConverter<Task, TaskDTO> taskConverter) {
    return TasksSerializationModule.FAILED.create(jsonTaskSerializer, additionalInformationConverter, taskConverter);
}
 
源代码29 项目: james-project   文件: RFC8621MethodsModule.java
@ProvidesIntoSet
JMAPRoutesHandler routesHandler(JMAPApiRoutes jmapApiRoutes) {
    return new JMAPRoutesHandler(Version.RFC8621, jmapApiRoutes);
}
 
源代码30 项目: james-project   文件: JMAPCommonModule.java
@ProvidesIntoSet
InitializationOperation workQueue(MailSpool instance) {
    return InitilizationOperationBuilder
        .forClass(MailSpool.class)
        .init(instance::start);
}
 
源代码评论
动弹
沙发等你来抢
 类所在包
 类方法
 同包方法