private void logManagedObjects() { final ImmutableSet.Builder<String> builder = ImmutableSet.builder(); for (Object bean : lifeCycle.getBeans()) { builder.add(bean.getClass().getCanonicalName()); } LOG.debug("managed objects = {}", builder.build()); }
@Override protected void doStop() throws Exception { lifeCycle.stop(); }
/** * Adds the given Jetty {@link LifeCycle} instances to the server's lifecycle. * * @param managed a Jetty-managed object */ public void manage(LifeCycle managed) { lifeCycle.addBean(checkNotNull(managed)); }
/** * Adds the given {@link Managed} instance to the set of objects managed by the server's * lifecycle. When the server starts, {@code managed} will be started. When the server stops, * {@code managed} will be stopped. * * @param managed a managed object */ public void manage(Managed managed) { lifeCycle.addBean(new JettyManaged(checkNotNull(managed))); }