com.google.inject.assistedinject.AssistedInject Java Examples
The following examples show how to use
com.google.inject.assistedinject.AssistedInject.
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: AggregatesAlertCondition.java From graylog-plugin-aggregates with GNU General Public License v3.0 | 6 votes |
@AssistedInject public AggregatesAlertCondition(Searches searches, ClusterConfigService clusterConfigService, HistoryItemService historyItemService, @Assisted Stream stream, @Nullable @Assisted("id") String id, @Assisted DateTime createdAt, @Assisted("userid") String creatorUserId, @Assisted Map<String, Object> parameters, @Assisted("title") @Nullable String title) { super(stream, id, AggregatesUtil.ALERT_CONDITION_TYPE, createdAt, creatorUserId, parameters, title); this.description = (String) parameters.get("description"); this.query = (String) parameters.get("query"); this.field = (String) parameters.get("field"); this.numberOfMatches = (Long)parameters.get("number_of_matches"); this.matchMoreOrEqual = parameters.get("match_more_or_equal") == null ? true : (boolean) parameters.get("match_more_or_equal"); this.searches = searches; this.limit = 100; this.interval = Tools.getNumber(parameters.get("interval"), Integer.valueOf(1)).intValue(); this.ruleName = (String) parameters.get("rule_name"); this.clusterConfigService = clusterConfigService; this.historyItemService= historyItemService; }
Example #2
Source File: TestUserImpl.java From che with Eclipse Public License 2.0 | 6 votes |
/** To instantiate user with specific name, e-mail, password and offline token. */ @AssistedInject public TestUserImpl( TestUserServiceClientFactory testUserServiceClientFactory, TestAuthServiceClient authServiceClient, @Assisted RemovableUserProvider testUserProvider, @Assisted("name") String name, @Assisted("email") String email, @Assisted("password") String password) throws NotFoundException, ServerException, BadRequestException { this.authServiceClient = authServiceClient; this.testUserProvider = testUserProvider; this.name = name; this.email = email; this.password = password; this.userServiceClient = testUserServiceClientFactory.create(this); this.id = userServiceClient.findByEmail(email).getId(); }
Example #3
Source File: HttpMonitorInput.java From graylog2-plugin-input-httpmonitor with MIT License | 5 votes |
@AssistedInject public HttpMonitorInput(MetricRegistry metricRegistry, @Assisted Configuration configuration, HttpMonitorTransport.Factory factory, LocalMetricRegistry localRegistry, GelfCodec.Factory codecFactory, Config config, Descriptor descriptor, ServerStatus serverStatus) { super(metricRegistry, configuration, factory.create(configuration), localRegistry, codecFactory.create(configuration), config, descriptor, serverStatus); }
Example #4
Source File: TestOrganizationServiceClient.java From che with Eclipse Public License 2.0 | 5 votes |
@AssistedInject public TestOrganizationServiceClient( TestApiEndpointUrlProvider apiEndpointUrlProvider, TestUserHttpJsonRequestFactoryCreator testUserHttpJsonRequestFactoryCreator, @Assisted TestUser testUser) { this.apiEndpoint = apiEndpointUrlProvider.get().toString(); this.requestFactory = testUserHttpJsonRequestFactoryCreator.create(testUser); }
Example #5
Source File: AzureBackuper.java From cassandra-backup with Apache License 2.0 | 5 votes |
@AssistedInject public AzureBackuper(final CloudStorageAccountFactory cloudStorageAccountFactory, final ExecutorServiceSupplier executorServiceSupplier, @Assisted final BackupCommitLogsOperationRequest request) throws Exception { super(request, executorServiceSupplier); cloudStorageAccount = cloudStorageAccountFactory.build(request); cloudBlobClient = cloudStorageAccount.createCloudBlobClient(); this.blobContainer = cloudBlobClient.getContainerReference(request.storageLocation.bucket); }
Example #6
Source File: AzureRestorer.java From cassandra-backup with Apache License 2.0 | 5 votes |
@AssistedInject public AzureRestorer(final CloudStorageAccountFactory cloudStorageAccountFactory, final ExecutorServiceSupplier executorServiceSupplier, @Assisted final RestoreCommitLogsOperationRequest request) throws Exception { super(request, executorServiceSupplier); cloudStorageAccount = cloudStorageAccountFactory.build(request); cloudBlobClient = cloudStorageAccount.createCloudBlobClient(); this.blobContainer = cloudBlobClient.getContainerReference(request.storageLocation.bucket); }
Example #7
Source File: AzureBackuper.java From cassandra-backup with Apache License 2.0 | 5 votes |
@AssistedInject public AzureBackuper(final CloudStorageAccountFactory cloudStorageAccountFactory, final ExecutorServiceSupplier executorServiceSupplier, @Assisted final BackupOperationRequest request) throws Exception { super(request, executorServiceSupplier); cloudStorageAccount = cloudStorageAccountFactory.build(request); cloudBlobClient = cloudStorageAccount.createCloudBlobClient(); this.blobContainer = cloudBlobClient.getContainerReference(request.storageLocation.bucket); }
Example #8
Source File: CheTestWorkspaceServiceClient.java From che with Eclipse Public License 2.0 | 5 votes |
@AssistedInject public CheTestWorkspaceServiceClient( TestApiEndpointUrlProvider apiEndpointProvider, TestUserHttpJsonRequestFactoryCreator userHttpJsonRequestFactoryCreator, @Assisted TestUser testUser) { super(apiEndpointProvider, userHttpJsonRequestFactoryCreator, testUser); }
Example #9
Source File: S3Backuper.java From cassandra-backup with Apache License 2.0 | 5 votes |
@AssistedInject public S3Backuper(final TransferManagerFactory transferManagerFactory, final ExecutorServiceSupplier executorServiceSupplier, @Assisted final BackupCommitLogsOperationRequest request) { super(request, executorServiceSupplier); this.transferManager = transferManagerFactory.build(request); }
Example #10
Source File: S3Backuper.java From cassandra-backup with Apache License 2.0 | 5 votes |
@AssistedInject public S3Backuper(final TransferManagerFactory transferManagerFactory, final ExecutorServiceSupplier executorSupplier, @Assisted final BackupOperationRequest request) { super(request, executorSupplier); this.transferManager = transferManagerFactory.build(request); }
Example #11
Source File: S3Restorer.java From cassandra-backup with Apache License 2.0 | 5 votes |
@AssistedInject public S3Restorer(final TransferManagerFactory transferManagerFactory, final ExecutorServiceSupplier executorServiceSupplier, @Assisted final RestoreCommitLogsOperationRequest request) { super(request, executorServiceSupplier); this.transferManager = transferManagerFactory.build(request); this.amazonS3 = this.transferManager.getAmazonS3Client(); }
Example #12
Source File: S3Restorer.java From cassandra-backup with Apache License 2.0 | 5 votes |
@AssistedInject public S3Restorer(final TransferManagerFactory transferManagerFactory, final ExecutorServiceSupplier executorServiceSupplier, @Assisted final RestoreOperationRequest request) { super(request, executorServiceSupplier); this.transferManager = transferManagerFactory.build(request); this.amazonS3 = this.transferManager.getAmazonS3Client(); }
Example #13
Source File: TestUserServiceClientImpl.java From che with Eclipse Public License 2.0 | 5 votes |
@AssistedInject public TestUserServiceClientImpl( TestApiEndpointUrlProvider apiEndpointProvider, TestUserHttpJsonRequestFactoryCreator userHttpJsonRequestFactoryCreator, @Assisted TestUser testUser) { this(apiEndpointProvider, userHttpJsonRequestFactoryCreator.create(testUser)); }
Example #14
Source File: HttpMonitorTransport.java From graylog2-plugin-input-httpmonitor with MIT License | 5 votes |
@AssistedInject public HttpMonitorTransport(@Assisted Configuration configuration, MetricRegistry metricRegistry, ServerStatus serverStatus) { this.configuration = configuration; this.metricRegistry = metricRegistry; this.serverStatus = serverStatus; }
Example #15
Source File: AzureRestorer.java From cassandra-backup with Apache License 2.0 | 5 votes |
@AssistedInject public AzureRestorer(final CloudStorageAccountFactory cloudStorageAccountFactory, final ExecutorServiceSupplier executorServiceSupplier, @Assisted final RestoreOperationRequest request) throws Exception { super(request, executorServiceSupplier); cloudStorageAccount = cloudStorageAccountFactory.build(request); cloudBlobClient = cloudStorageAccount.createCloudBlobClient(); this.blobContainer = cloudBlobClient.getContainerReference(request.storageLocation.bucket); }
Example #16
Source File: AdminTestUser.java From che with Eclipse Public License 2.0 | 5 votes |
/** To instantiate admin test user with specific name, e-mail, password and offline token. */ @AssistedInject public AdminTestUser( TestUserServiceClientFactory testUserServiceClientFactory, TestAuthServiceClient authServiceClient, @Assisted RemovableUserProvider testUserProvider, @Assisted("name") String name, @Assisted("email") String email, @Assisted("password") String password) throws NotFoundException, ServerException, BadRequestException { super(testUserServiceClientFactory, authServiceClient, testUserProvider, name, email, password); }
Example #17
Source File: DefaultTestUser.java From che with Eclipse Public License 2.0 | 5 votes |
/** To instantiate default test user with specific name, e-mail, password and offline token. */ @AssistedInject public DefaultTestUser( TestUserServiceClientFactory testUserServiceClientFactory, TestAuthServiceClient authServiceClient, @Assisted RemovableUserProvider testUserProvider, @Assisted("name") String name, @Assisted("email") String email, @Assisted("password") String password) throws NotFoundException, ServerException, BadRequestException { super(testUserServiceClientFactory, authServiceClient, testUserProvider, name, email, password); }
Example #18
Source File: GCPRestorer.java From cassandra-backup with Apache License 2.0 | 5 votes |
@AssistedInject public GCPRestorer(final GoogleStorageFactory storageFactory, final ExecutorServiceSupplier executorServiceSupplier, @Assisted final RestoreOperationRequest request) { super(request, executorServiceSupplier); this.storage = storageFactory.build(request); }
Example #19
Source File: GCPRestorer.java From cassandra-backup with Apache License 2.0 | 5 votes |
@AssistedInject public GCPRestorer(final GoogleStorageFactory storageFactory, final ExecutorServiceSupplier executorServiceSupplier, @Assisted final RestoreCommitLogsOperationRequest request) { super(request, executorServiceSupplier); this.storage = storageFactory.build(request); }
Example #20
Source File: GCPBackuper.java From cassandra-backup with Apache License 2.0 | 5 votes |
@AssistedInject public GCPBackuper(final GoogleStorageFactory storageFactory, final ExecutorServiceSupplier executorServiceSupplier, @Assisted final BackupOperationRequest backupOperationRequest) { super(backupOperationRequest, executorServiceSupplier); this.storage = storageFactory.build(backupOperationRequest); }
Example #21
Source File: GCPBackuper.java From cassandra-backup with Apache License 2.0 | 5 votes |
@AssistedInject public GCPBackuper(final GoogleStorageFactory storageFactory, final ExecutorServiceSupplier executorServiceSupplier, @Assisted final BackupCommitLogsOperationRequest backupOperationRequest) { super(backupOperationRequest, executorServiceSupplier); this.storage = storageFactory.build(backupOperationRequest); }
Example #22
Source File: ImportOperation.java From cassandra-backup with Apache License 2.0 | 5 votes |
@AssistedInject public ImportOperation(final CassandraJMXService cassandraJMXService, final CassandraVersion cassandraVersion, @Assisted final ImportOperationRequest request) { super(request); this.cassandraJMXService = cassandraJMXService; this.cassandraVersion = cassandraVersion; }
Example #23
Source File: RestoreOperation.java From cassandra-backup with Apache License 2.0 | 5 votes |
@AssistedInject public RestoreOperation(Optional<OperationCoordinator<RestoreOperationRequest>> coordinator, @Assisted final RestoreOperationRequest request) { super(request); if (!coordinator.isPresent()) { throw new OperationFailureException("There is no operation coordinator."); } this.coordinator = coordinator.get(); }
Example #24
Source File: TruncateOperation.java From cassandra-backup with Apache License 2.0 | 5 votes |
@AssistedInject public TruncateOperation(final CassandraJMXService cassandraJMXService, @Assisted final TruncateOperationRequest request) { super(request); this.cassandraJMXService = cassandraJMXService; }
Example #25
Source File: BackupOperation.java From cassandra-backup with Apache License 2.0 | 5 votes |
@AssistedInject public BackupOperation(Optional<OperationCoordinator<BackupOperationRequest>> coordinator, @Assisted final BackupOperationRequest request) { super(request); if (!coordinator.isPresent()) { throw new OperationFailureException("There is no operation coordinator."); } this.coordinator = coordinator.get(); }
Example #26
Source File: BackupCommitLogsOperation.java From cassandra-backup with Apache License 2.0 | 5 votes |
@AssistedInject public BackupCommitLogsOperation(final Map<String, BackuperFactory> backuperFactoryMap, final Map<String, BucketServiceFactory> bucketServiceMap, @Assisted final BackupCommitLogsOperationRequest request) { super(request); this.backuperFactoryMap = backuperFactoryMap; this.bucketServiceMap = bucketServiceMap; }
Example #27
Source File: GuiceAssistedInjectScopingNegativeCases.java From spotbugs with GNU Lesser General Public License v2.1 | 4 votes |
@AssistedInject public TestClass8(int i, String param) { }
Example #28
Source File: GuiceAssistedInjectScopingNegativeCases.java From spotbugs with GNU Lesser General Public License v2.1 | 4 votes |
@AssistedInject public TestClass8(String param, int i) { }
Example #29
Source File: GuiceAssistedInjectScopingNegativeCases.java From spotbugs with GNU Lesser General Public License v2.1 | 4 votes |
@AssistedInject public TestClass5(String unassisted) { }
Example #30
Source File: MovieRatingChanger.java From J-Kinopoisk2IMDB with Apache License 2.0 | 4 votes |
@AssistedInject private MovieRatingChanger(Config config) { this.config = config; }