use of com.blackducksoftware.integration.hub.api.generated.response.CurrentVersionView in project hub-detect by blackducksoftware.
the class HubServiceWrapper method init.
public void init() throws IntegrationException, DetectUserFriendlyException {
try {
slf4jIntLogger = new Slf4jIntLogger(logger);
hubServerConfig = createHubServerConfig(slf4jIntLogger);
hubServicesFactory = createHubServicesFactory(slf4jIntLogger, hubServerConfig);
} catch (IllegalStateException | EncryptionException e) {
throw new DetectUserFriendlyException(String.format("Not able to initialize Hub connection: %s", e.getMessage()), e, ExitCodeType.FAILURE_HUB_CONNECTIVITY);
}
final HubService hubService = createHubService();
final CurrentVersionView currentVersion = hubService.getResponse(ApiDiscovery.CURRENT_VERSION_LINK_RESPONSE);
logger.info(String.format("Successfully connected to Hub (version %s)!", currentVersion.version));
detectPhoneHomeManager.init(createPhoneHomeService());
detectPhoneHomeManager.startPhoneHome();
}
Aggregations