@Inject public SimpleDbStateManager(AmazonSimpleDB simpleDb, NodeInfo nodeInfo) { this.simpleDb = simpleDb; domainName = "galaxy-" + nodeInfo.getEnvironment(); }
@Inject public ServiceInventoryResource(Coordinator coordinator, ServiceInventory serviceInventory, NodeInfo nodeInfo) { Preconditions.checkNotNull(coordinator, "coordinator is null"); Preconditions.checkNotNull(serviceInventory, "serviceInventory is null"); Preconditions.checkNotNull(nodeInfo, "nodeInfo is null"); this.coordinator = coordinator; this.serviceInventory = serviceInventory; this.environment = nodeInfo.getEnvironment(); }
@Inject public ServiceInventoryResource(NodeInfo nodeInfo) { environment = nodeInfo.getEnvironment(); descriptor.set(new ServiceDescriptorsRepresentation(environment, ImmutableList.<ServiceDescriptor>of())); }
@Inject public HttpRemoteAgentFactory(NodeInfo nodeInfo, JsonCodec<InstallationRepresentation> installationCodec, JsonCodec<SlotStatusRepresentation> slotStatusCodec, JsonCodec<AgentStatusRepresentation> agentStatusCodec, JsonCodec<ServiceDescriptorsRepresentation> serviceDescriptorsCodec) { environment = nodeInfo.getEnvironment(); this.agentStatusCodec = agentStatusCodec; this.httpClient = new ApacheHttpClient(); this.installationCodec = installationCodec; this.slotStatusCodec = slotStatusCodec; this.serviceDescriptorsCodec = serviceDescriptorsCodec; }
@Inject ReportClient(NodeInfo nodeInfo, @ForReportClient HttpClient httpClient, ReportClientConfig reportClientConfig, ReportTagConfig reportTagConfig, ObjectMapper objectMapper) { this.objectMapper = objectMapper; requireNonNull(nodeInfo, "nodeInfo is null"); requireNonNull(reportClientConfig, "reportClientConfig is null"); requireNonNull(reportTagConfig, "reportTagConfig is null"); Builder<String, String> builder = ImmutableMap.builder(); builder.put("application", nodeInfo.getApplication()); builder.put("host", nodeInfo.getInternalHostname()); builder.put("environment", nodeInfo.getEnvironment()); builder.put("pool", nodeInfo.getPool()); builder.putAll(reportTagConfig.getTags()); this.instanceTags = builder.build(); this.httpClient = requireNonNull(httpClient, "httpClient is null"); }
@Inject public AwsProvisioner(AWSCredentials awsCredentials, AmazonEC2 ec2Client, NodeInfo nodeInfo, HttpServerInfo httpServerInfo, Repository repository, CoordinatorConfig coordinatorConfig, AwsProvisionerConfig awsProvisionerConfig) { this.awsCredentials = checkNotNull(awsCredentials, "awsCredentials is null"); this.ec2Client = checkNotNull(ec2Client, "ec2Client is null"); checkNotNull(nodeInfo, "nodeInfo is null"); this.environment = nodeInfo.getEnvironment(); checkNotNull(httpServerInfo, "httpServerInfo is null"); this.coordinatorUri = httpServerInfo.getHttpUri(); checkNotNull(coordinatorConfig, "coordinatorConfig is null"); galaxyVersion = coordinatorConfig.getGalaxyVersion(); repositories = coordinatorConfig.getRepositories(); checkNotNull(awsProvisionerConfig, "awsConfig is null"); agentDefaultConfig = coordinatorConfig.getAgentDefaultConfig(); agentAmi = awsProvisionerConfig.getAwsAgentAmi(); agentKeypair = awsProvisionerConfig.getAwsAgentKeypair(); agentSecurityGroup = awsProvisionerConfig.getAwsAgentSecurityGroup(); agentDefaultInstanceType = awsProvisionerConfig.getAwsAgentDefaultInstanceType(); this.repository = checkNotNull(repository, "repository is null"); }
@Inject public LauncherLifecycleManager(AgentConfig config, NodeInfo nodeInfo, HttpServerInfo httpServerInfo) { this(nodeInfo.getEnvironment(), nodeInfo.getInternalIp(), nodeInfo.getExternalAddress(), nodeInfo.getBindIp(), config.getLauncherTimeout(), config.getLauncherStopTimeout(), uriBuilderFrom(httpServerInfo.getHttpsUri() != null ? httpServerInfo.getHttpsUri() : httpServerInfo.getHttpUri()).appendPath("/v1/serviceInventory").build() ); }