@Override public boolean supports(final RuntimeId runtimeId) { return runtimeId instanceof DockerRuntime || runtimeRegistry.getRuntimeById(runtimeId.getId()) instanceof DockerRuntime; }
@Override public boolean supports(final RuntimeId runtimeId) { return runtimeId instanceof DockerRuntime || runtimeRegistry.getRuntimeById(runtimeId.getId()) instanceof DockerRuntime; }
@Override public boolean supports(final RuntimeId runtimeId) { return runtimeId instanceof OpenShiftRuntime || runtimeRegistry.getRuntimeById(runtimeId.getId()) instanceof OpenShiftRuntime; }
@Override public boolean supports(final RuntimeId runtimeId) { return runtimeId instanceof WildflyRuntime || runtimeRegistry.getRuntimeById(runtimeId.getId()) instanceof WildflyRuntime; }
@Override public boolean supports(final RuntimeId runtimeId) { return runtimeId instanceof DockerRuntime || runtimeRegistry.getRuntimeById(runtimeId.getId()) instanceof DockerRuntime; }
@Override public boolean supports(final RuntimeId runtimeId) { return runtimeId instanceof DockerRuntime || runtimeRegistry.getRuntimeById(runtimeId.getId()) instanceof DockerRuntime; }
@Override public boolean supports(final RuntimeId runtimeId) { return runtimeId instanceof WildflyRuntime || runtimeRegistry.getRuntimeById(runtimeId.getId()) instanceof WildflyRuntime; }
@Override public boolean supports(final RuntimeId runtimeId) { return runtimeId instanceof WildflyRuntime || runtimeRegistry.getRuntimeById(runtimeId.getId()) instanceof WildflyRuntime; }
@Override public boolean supports(final RuntimeId runtimeId) { return runtimeId instanceof WildflyRuntime || runtimeRegistry.getRuntimeById(runtimeId.getId()) instanceof WildflyRuntime; }
@Override public void startRuntime(String runtimeId) throws BusinessException { final Runtime runtimeById = runtimeRegistry.getRuntimeById(runtimeId); if (runtimeById == null) { throw new BusinessException("No runtime was found for runtimeId: " + runtimeId); } runtimeManagerFactory.startRuntime(runtimeById); }
@Override public void stopRuntime(String runtimeId) throws BusinessException { final Runtime runtimeById = runtimeRegistry.getRuntimeById(runtimeId); if (runtimeById == null) { throw new BusinessException("No runtime was found for runtimeId: " + runtimeId); } runtimeManagerFactory.stopRuntime(runtimeById); }
@Override public void restart(RuntimeId runtimeId) throws RuntimeOperationException { OpenShiftRuntime runtime = (OpenShiftRuntime) runtimeRegistry.getRuntimeById(runtimeId.getId()); try { LOG.info("Restarting runtime: " + runtimeId.getId()); openshift.getOpenShiftClient(runtime.getProviderId()).restart(runtime.getId()); refresh(runtimeId); LOG.info("Restarted runtime: " + runtimeId.getId()); } catch (OpenShiftClientException ex) { LOG.error("Error Restarting runtime: " + runtimeId.getId(), ex); throw new RuntimeOperationException("Error Restarting runtime: " + runtimeId.getId(), ex); } }
@Override public void restart(RuntimeId runtimeId) throws RuntimeOperationException { DockerRuntime runtime = (DockerRuntime) runtimeRegistry.getRuntimeById(runtimeId.getId()); try { docker.getDockerClient(runtime.getProviderId()).restartContainer(runtime.getId()); refresh(runtimeId); } catch (DockerException | InterruptedException ex) { LOG.error("Error Restarting container: " + runtimeId.getId(), ex); throw new RuntimeOperationException("Error Restarting container: " + runtimeId.getId(), ex); } }
@Override public void restart(RuntimeId runtimeId) { WildflyRuntime runtime = (WildflyRuntime) runtimeRegistry.getRuntimeById(runtimeId.getId()); try { wildfly.getWildflyClient(runtime.getProviderId()).restart(runtime.getId()); refresh(runtimeId); } catch (WildflyClientException ex) { throw new RuntimeOperationException("Error Restarting container: " + runtimeId.getId() + "\n\t There as a problem with restarting your application, please check into the Wildfly Logs for more information.", ex); } }
@Override public void pause(RuntimeId runtimeId) throws RuntimeOperationException { WildflyRuntime runtime = (WildflyRuntime) runtimeRegistry.getRuntimeById(runtimeId.getId()); try { wildfly.getWildflyClient(runtime.getProviderId()).stop(runtime.getId()); refresh(runtimeId); } catch (WildflyClientException ex) { throw new RuntimeOperationException("Error Pausing container: " + runtimeId.getId() + "\n\t There as a problem with stopping your application, please check into the Wildfly Logs for more information.", ex); } } }
@Override public void restart(RuntimeId runtimeId) { WildflyRuntime runtime = (WildflyRuntime) runtimeRegistry.getRuntimeById(runtimeId.getId()); try { wildfly.getWildflyClient(runtime.getProviderId()).restart(runtime.getId()); refresh(runtimeId); } catch (WildflyClientException ex) { throw new RuntimeOperationException("Error Restarting container: " + runtimeId.getId() + "\n\t There as a problem with restarting your application, please check into the Wildfly Logs for more information.", ex); } }
@Override public void start(RuntimeId runtimeId) throws RuntimeOperationException { WildflyRuntime runtime = (WildflyRuntime) runtimeRegistry.getRuntimeById(runtimeId.getId()); int result = wildfly.getWildflyClient(runtime.getProviderId()).start(runtime.getId()); if (result != 200) { throw new RuntimeOperationException("Error Starting container: " + runtimeId.getId() + " \n\t There as a problem with starting your application, please check into the Wildfly Logs for more information."); } refresh(runtimeId); }
@Override public void stop(RuntimeId runtimeId) throws RuntimeOperationException { WildflyRuntime runtime = (WildflyRuntime) runtimeRegistry.getRuntimeById(runtimeId.getId()); try { wildfly.getWildflyClient(runtime.getProviderId()).stop(runtime.getId()); refresh(runtimeId); } catch (WildflyClientException ex) { throw new RuntimeOperationException("Error Stopping container: " + runtimeId.getId() + "\n\t There as a problem with stopping your application, please check into the Wildfly Logs for more information.", ex); } }
@Override public void stop(RuntimeId runtimeId) throws RuntimeOperationException { WildflyRuntime runtime = (WildflyRuntime) runtimeRegistry.getRuntimeById(runtimeId.getId()); try { wildfly.getWildflyClient(runtime.getProviderId()).stop(runtime.getId()); refresh(runtimeId); } catch (WildflyClientException ex) { throw new RuntimeOperationException("Error Stopping container: " + runtimeId.getId() + "\n\t There as a problem with stopping your application, please check into the Wildfly Logs for more information.", ex); } }
@Override public void start(RuntimeId runtimeId) throws RuntimeOperationException { WildflyRuntime runtime = (WildflyRuntime) runtimeRegistry.getRuntimeById(runtimeId.getId()); int result = wildfly.getWildflyClient(runtime.getProviderId()).start(runtime.getId()); if (result != 200) { throw new RuntimeOperationException("Error Starting container: " + runtimeId.getId() + " \n\t There as a problem with starting your application, please check into the Wildfly Logs for more information."); } refresh(runtimeId); }