private void processReference(LogicalReference reference, QName policySet, boolean incremental) { for (LogicalWire wire : reference.getWires()) { wire.setState(LogicalState.NEW); } for (LogicalBinding<?> binding : reference.getBindings()) { if (incremental && binding.getPolicySets().contains(policySet)) { continue; } binding.setState(LogicalState.NEW); } }
private void processDetachReference(LogicalReference reference, QName policySet, boolean incremental) { for (LogicalWire wire : reference.getWires()) { wire.setState(LogicalState.NEW); } for (LogicalBinding<?> binding : reference.getBindings()) { if (incremental && !binding.getPolicySets().contains(policySet)) { continue; } binding.setState(LogicalState.NEW); } }
wires.stream().filter(wire -> NEW == wire.getState()).forEach(wire -> wire.setState(PROVISIONED));
wires.stream().filter(wire -> NEW == wire.getState()).forEach(wire -> wire.setState(PROVISIONED));
existingWire.setState(LogicalState.NEW);
existingWire.setState(LogicalState.NEW);
existingWire.setState(LogicalState.NEW);
private <S, I extends S> LogicalComponent<?> createLogicalComponent(String name, Class<S> type, I instance, boolean introspect) throws InvalidServiceContractException, AssemblyException { LogicalCompositeComponent domain = lcm.getDomainComposite(); Component<Implementation<?>> definition = createDefinition(name, type, instance, introspect); InstantiationContext context = new InstantiationContext(); LogicalComponent<?> logical = instantiator.instantiate(definition, domain, context); if (context.hasErrors()) { throw new AssemblyException(context.getErrors()); } // mark singleton components as provisioned since instances are not created logical.setState(LogicalState.PROVISIONED); // all references are initially resolved since they are manually injected for (LogicalReference reference : logical.getReferences()) { reference.setResolved(true); for (LogicalWire wire : reference.getWires()) { wire.setState(LogicalState.PROVISIONED); } } return logical; }
private <S, I extends S> LogicalComponent<?> createLogicalComponent(String name, Class<S> type, I instance, boolean introspect) throws InvalidServiceContractException, AssemblyException { LogicalCompositeComponent domain = lcm.getDomainComposite(); Component<Implementation<?>> definition = createDefinition(name, type, instance, introspect); InstantiationContext context = new InstantiationContext(); LogicalComponent<?> logical = instantiator.instantiate(definition, domain, context); if (context.hasErrors()) { throw new AssemblyException(context.getErrors()); } // mark singleton components as provisioned since instances are not created logical.setState(LogicalState.PROVISIONED); // all references are initially resolved since they are manually injected for (LogicalReference reference : logical.getReferences()) { reference.setResolved(true); for (LogicalWire wire : reference.getWires()) { wire.setState(LogicalState.PROVISIONED); } } return logical; }
private <S, I extends S> LogicalComponent<?> createLogicalComponent(String name, Class<S> type, I instance, boolean introspect) throws InvalidServiceContractException, AssemblyException { LogicalCompositeComponent domain = lcm.getRootComponent(); ComponentDefinition<Implementation<?>> definition = createDefinition(name, type, instance, introspect); InstantiationContext context = new InstantiationContext(); LogicalComponent<?> logical = instantiator.instantiate(definition, domain, context); logical.setAutowire(domain.getAutowire()); if (context.hasErrors()) { throw new AssemblyException(context.getErrors()); } // mark singleton components as provisioned since instances are not created logical.setState(LogicalState.PROVISIONED); // all references are initially resolved since they are manually injected for (LogicalReference reference : logical.getReferences()) { reference.setResolved(true); for (LogicalWire wire : reference.getWires()) { wire.setState(LogicalState.PROVISIONED); } } return logical; }
for (LogicalWire wire : wires) { if (LogicalState.NEW == wire.getState()) { wire.setState(LogicalState.PROVISIONED);