예제 #1
0
 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());
 }
예제 #2
0
 @Override
 protected void doStop() throws Exception {
   lifeCycle.stop();
 }
예제 #3
0
 /**
  * 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));
 }
예제 #4
0
 /**
  * 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)));
 }