protected void shutdownBootstrapServices() { Collections.reverse(services); for (BootstrapService service : services) { service.stop(Application.getApplication()); } services.clear(); }
protected void startBootstrapService(Class<? extends BootstrapService> serviceType) { try { BootstrapService service = serviceType.newInstance(); service.init(Application.getApplication()); service.start(Application.getApplication()); services.add(service); } catch (InstantiationException ex) { throw new BootstrapServiceException(serviceType.getName(), ex); } catch (IllegalAccessException ex) { throw new BootstrapServiceException(serviceType.getName(), ex); } }