public void addDependency(DependencyItem dependency) { getDependencyInfo().addIDependOn(dependency); }
public void addDependency(DependencyItem dependency) { getDependencyInfo().addIDependOn(dependency); }
/** * Get the unresolved dependencies * * @param context the context * @param state the state we want to move to * @return the unresolved dependencies */ private String getUnresolvedDependencies(ServiceControllerContext context, ControllerState state) { boolean first = true; StringBuilder builder = new StringBuilder(); for (DependencyItem item : context.getDependencyInfo().getUnresolvedDependencies(null)) { if (item.isResolved() == false && item.getWhenRequired() == state) { if (first) first = false; else builder.append(' '); builder.append(item.getIDependOn()); } } return builder.toString(); }
/** * Get the unresolved dependencies * * @param context the context * @param state the state we want to move to * @return the unresolved dependencies */ private String getUnresolvedDependencies(ServiceControllerContext context, ControllerState state) { boolean first = true; StringBuilder builder = new StringBuilder(); for (DependencyItem item : context.getDependencyInfo().getUnresolvedDependencies(null)) { if (item.isResolved() == false && item.getWhenRequired() == state) { if (first) first = false; else builder.append(' '); builder.append(item.getIDependOn()); } } return builder.toString(); }
/** * Add the passed lifecycle dependencies to the context * * @param context the context * @param depends the dependencies */ private void addDependencies(ServiceControllerContext context, Collection<ObjectName> depends) { DependencyInfo info = context.getDependencyInfo(); for (ObjectName other : depends) { info.addIDependOn(new LifecycleDependencyItem(context.getName(), other.getCanonicalName(), ControllerState.CREATE)); info.addIDependOn(new LifecycleDependencyItem(context.getName(), other.getCanonicalName(), ControllerState.START)); } }
/** * Add the passed lifecycle dependencies to the context * * @param context the context * @param depends the dependencies */ private void addDependencies(ServiceControllerContext context, Collection<ObjectName> depends) { DependencyInfo info = context.getDependencyInfo(); for (ObjectName other : depends) { info.addIDependOn(new LifecycleDependencyItem(context.getName(), other.getCanonicalName(), ControllerState.CREATE)); info.addIDependOn(new LifecycleDependencyItem(context.getName(), other.getCanonicalName(), ControllerState.START)); } }