protected void start(Collection<?> components) { for (Object o: components) { if (o instanceof Startable) { Startable startable = (Startable) o; startable.start(this); } } }
protected synchronized void ensureStarted() { if (!isStarted) { start(); } }
@Override public void set(Object bean) { brewery.ingredient(bean); }
@Override public void stop() { brewery.stop(); } }
public MongoConfiguration db(DB db) { brewery.ingredient(db); return this; }
@Override public void start() { brewery.start(); }
@Override public void stop() { brewery.stop(); } }
public MongoConfiguration mongoClient(MongoClient mongoClient) { brewery.ingredient(mongoClient); return this; }
@Override public Object get(String name) { return brewery.get(name); } @Override
public TestConfiguration registerIngredient(Object ingredient) { brewery.ingredient(ingredient); return this; } }
public DefaultConfiguration ingredient(Object ingredient) { brewery.ingredient(ingredient); return this; }
public MongoConfiguration db(DB db) { brewery.ingredient(db); return this; }
@Override public <T> T get(Class<T> type) { return brewery.get(type); }
public MongoConfiguration mongoClient(MongoClient mongoClient) { brewery.ingredient(mongoClient); return this; }
@Override public WorkflowEngine getWorkflowEngine() { return brewery.get(WorkflowEngine.class); }