@Override public void handleStart(Operation startPost) { super.handleStart(startPost); // initialize pks client initClient(); }
@Override public void handleStart(Operation startPost) { this.counter = new AtomicLong(0); super.handleStart(startPost); }
@Override public void handleStart(Operation startPost) { try { startUiFileContentServices(); super.handleStart(startPost); } catch (Throwable e) { startPost.fail(e); } }
@Override public void handleStart(Operation startPost) { super.handleStart(startPost); Utils.registerCustomJsonMapper(TaskServiceStage.class, new JsonMapper((b) -> b.registerTypeAdapter(TaskServiceStage.class, new TaskServiceStageDeserializer()))); }
@Override public void handleStart(Operation startPost) { checkForDefaultHostDescription(DOCKER_COMPUTE_DESC_LINK, DOCKER_COMPUTE_DESC_ID); checkForDefaultHostDescription(VIC_COMPUTE_DESC_LINK, VIC_COMPUTE_DESC_ID); checkForDefaultHostDescription(KubernetesHostConstants.KUBERNETES_COMPUTE_DESC_LINK, KubernetesHostConstants.KUBERNETES_COMPUTE_DESC_ID); super.handleStart(startPost); }
@Override public void handleStart(Operation post) { trustManager = ServerX509TrustManager.create(getHost()); serviceClientNoProxyList = new HashSet<>(); DeferredResult.allOf(Arrays.asList(getProperty(REGISTRY_PROXY_PARAM_NAME), getProperty(REGISTRY_NO_PROXY_LIST_PARAM_NAME))) .whenComplete((p, ex) -> { if (ex != null) { logSevere("Registry proxy properties not provided", ex); initProxyClient(null); initNoProxyClient(null); } else { Map<String, String> props = p.stream() .collect(Collectors.toMap(s -> s.key, s -> s.value)); initProxyClient(props); initNoProxyClient(props); } super.handleStart(post); }); }
@Override public void handleStart(Operation startPost) { try { Path baseResourcePath = Utils.getServiceUiResourcePath(this); Path baseUriPath = Paths.get(getSelfLink()); String prefix = baseResourcePath.toString().replace('\\', '/'); Map<Path, String> pathToURIPath = new HashMap<>(); if (getHost().getState().resourceSandboxFileReference != null) { getHost().discoverFileResources(this, pathToURIPath, baseUriPath, prefix); } if (pathToURIPath.isEmpty()) { getHost().discoverJarResources(baseResourcePath, this, pathToURIPath, baseUriPath, prefix); } if (pathToURIPath.isEmpty()) { log(Level.WARNING, "No custom UI resources found for %s", this.getClass().getName()); } for (Entry<Path, String> e : pathToURIPath.entrySet()) { String value = e.getValue(); Operation post = Operation.createPost(UriUtils.buildUri(getHost(), value)); FileContentService fcs = new FileContentService(e.getKey().toFile()); getHost().startService(post, fcs); } } catch (Exception e) { log(Level.WARNING, "Error enumerating UI resources for %s: %s", this.getSelfLink(), Utils.toString(e)); } super.handleStart(startPost); }