public PromotedComponentNotFound(LogicalBindable bindable, URI promotedComponentUri) { super(bindable.getParent().getUri(), bindable.getParent().getDefinition().getContributionUri(), Collections.singletonList(bindable)); this.bindableUri = bindable.getUri(); this.promotedComponentUri = promotedComponentUri; }
public PromotedComponentNotFound(LogicalBindable bindable, URI promotedComponentUri) { super(bindable.getParent().getUri(), bindable.getParent().getDefinition().getContributionUri(), Collections.singletonList(bindable)); this.bindableUri = bindable.getUri(); this.promotedComponentUri = promotedComponentUri; }
LogicalComponent<?> component = binding.getParent().getParent(); for (LogicalService service : component.getServices()) { if (service.getServiceContract().getQualifiedInterfaceName().equals(contract.getQualifiedInterfaceName())) {
public ZeroMQWireTarget generateTarget(LogicalBinding<ZeroMQBinding> binding, ServiceContract contract, List<LogicalOperation> operations) { validateServiceContract(contract); ZeroMQMetadata metadata = binding.getDefinition().getZeroMQMetadata(); if (binding.isCallback()) { URI targetUri = URI.create("zmq://" + contract.getInterfaceName()); return new ZeroMQWireTarget(targetUri, metadata); } URI targetUri; // If this is an undeployment, use the previously calculated target URI. This must be done since the target component may no longer // be in the domain if it has been undeployed from another zone. if (LogicalState.MARKED == binding.getState()) { targetUri = binding.getMetadata(TARGET_URI, URI.class); } else { targetUri = binding.getDefinition().getTargetUri();// parseTargetUri(binding); if (targetUri != null) { targetUri = URI.create(binding.getParent().getParent().getParent().getUri() + "/" + targetUri); } else { // create a synthetic name targetUri = URI.create("f3synthetic://" + binding.getParent().getUri() + "/" + binding.getDefinition().getName()); } binding.addMetadata(TARGET_URI, targetUri); } return generateTarget(contract, targetUri, metadata); }
public <T extends Binding> PhysicalWire generateServiceCallback(LogicalBinding<T> binding) { checkService(binding); LogicalService service = (LogicalService) binding.getParent(); LogicalComponent<?> component = service.getParent(); ServiceContract contract = service.getServiceContract(); ServiceContract callbackContract = contract.getCallbackContract(); List<LogicalOperation> operations = service.getCallbackOperations(); // generate the metadata used to attach the physical callback wire to the source component ComponentGenerator sourceGenerator = getGenerator(component); PhysicalWireSource source = sourceGenerator.generateCallbackSource(service); URI sourceUri = component.getDefinition().getContributionUri(); source.setClassLoader(classLoaderRegistry.getClassLoader(sourceUri)); // generate the metadata used to attach the physical callback wire to the target transport WireBindingGenerator<T> bindingGenerator = getGenerator(binding); PhysicalWireTarget target = bindingGenerator.generateTarget(binding, callbackContract, operations); target.setCallback(true); URI targetUri = binding.getParent().getParent().getDefinition().getContributionUri(); target.setClassLoader(classLoaderRegistry.getClassLoader(targetUri)); // generate the metadata for interceptors that are attached to wire invocation chains, e.g. policy implemented by an interceptor Set<PhysicalOperation> physicalOperations = operationGenerator.generateOperations(operations); return new PhysicalWire(source, target, physicalOperations); }
public <T extends Binding> PhysicalWire generateServiceCallback(LogicalBinding<T> binding) { checkService(binding); LogicalService service = (LogicalService) binding.getParent(); LogicalComponent<?> component = service.getParent(); ServiceContract contract = service.getServiceContract(); ServiceContract callbackContract = contract.getCallbackContract(); List<LogicalOperation> operations = service.getCallbackOperations(); // generate the metadata used to attach the physical callback wire to the source component ComponentGenerator sourceGenerator = getGenerator(component); PhysicalWireSource source = sourceGenerator.generateCallbackSource(service); URI sourceUri = component.getDefinition().getContributionUri(); source.setClassLoader(classLoaderRegistry.getClassLoader(sourceUri)); // generate the metadata used to attach the physical callback wire to the target transport WireBindingGenerator<T> bindingGenerator = getGenerator(binding); PhysicalWireTarget target = bindingGenerator.generateTarget(binding, callbackContract, operations); target.setCallback(true); URI targetUri = binding.getParent().getParent().getDefinition().getContributionUri(); target.setClassLoader(classLoaderRegistry.getClassLoader(targetUri)); // generate the metadata for interceptors that are attached to wire invocation chains, e.g. policy implemented by an interceptor Set<PhysicalOperation> physicalOperations = operationGenerator.generateOperations(operations); return new PhysicalWire(source, target, physicalOperations); }
public JmsWireSource generateSource(LogicalBinding<JmsBinding> binding, ServiceContract contract, List<LogicalOperation> operations) throws Fabric3Exception { SessionType sessionType = getSessionType(binding.getParent().getParent()); JmsBindingMetadata metadata = binding.getDefinition().getJmsMetadata().snapshot(); JmsGeneratorHelper.generateDefaultFactoryConfiguration(metadata.getConnectionFactory(), sessionType); if (metadata.getResponseConnectionFactory() != null) { JmsGeneratorHelper.generateDefaultFactoryConfiguration(metadata.getResponseConnectionFactory(), sessionType); } processServiceResponse(metadata, contract); List<OperationPayloadTypes> payloadTypes = processPayloadTypes(contract); URI uri = binding.getDefinition().getTargetUri(); List<PhysicalBindingHandler> handlers = JmsGeneratorHelper.generateBindingHandlers(info.getDomain(), binding.getDefinition()); JmsWireSource source; if (isJAXB(contract)) { source = new JmsWireSource(uri, metadata, payloadTypes, sessionType, handlers, PhysicalDataTypes.JAXB); } else { source = new JmsWireSource(uri, metadata, payloadTypes, sessionType, handlers); } if (provisioner != null) { provisioner.generateSource(source); } processDestinationDefinitions(metadata, false); return source; }
public <T extends Binding> PhysicalWire generateReferenceCallback(LogicalBinding<T> binding) { checkReference(binding); LogicalReference reference = (LogicalReference) binding.getParent(); LogicalComponent<?> component = reference.getParent(); ServiceContract contract = reference.getServiceContract(); ServiceContract callbackContract = contract.getCallbackContract(); LogicalService callbackService = component.getService(callbackContract.getInterfaceName()); List<LogicalOperation> operations = reference.getCallbackOperations(); // generate the metadata used to attach the physical callback wire to the source transport WireBindingGenerator<T> sourceGenerator = getGenerator(binding); PhysicalWireSource source = sourceGenerator.generateSource(binding, callbackContract, operations); URI sourceUri = binding.getParent().getParent().getDefinition().getContributionUri(); source.setClassLoader(classLoaderRegistry.getClassLoader(sourceUri)); // generate the metadata used to attach the physical callback wire to the target component ComponentGenerator targetGenerator = getGenerator(component); PhysicalWireTarget target = targetGenerator.generateTarget(callbackService); URI targetUri = callbackService.getParent().getDefinition().getContributionUri(); target.setClassLoader(classLoaderRegistry.getClassLoader(targetUri)); target.setCallback(true); Set<PhysicalOperation> operation = operationGenerator.generateOperations(operations); return new PhysicalWire(source, target, operation); }
public <T extends Binding> PhysicalWire generateReferenceCallback(LogicalBinding<T> binding) { checkReference(binding); LogicalReference reference = (LogicalReference) binding.getParent(); LogicalComponent<?> component = reference.getParent(); ServiceContract contract = reference.getServiceContract(); ServiceContract callbackContract = contract.getCallbackContract(); LogicalService callbackService = component.getService(callbackContract.getInterfaceName()); List<LogicalOperation> operations = reference.getCallbackOperations(); // generate the metadata used to attach the physical callback wire to the source transport WireBindingGenerator<T> sourceGenerator = getGenerator(binding); PhysicalWireSource source = sourceGenerator.generateSource(binding, callbackContract, operations); URI sourceUri = binding.getParent().getParent().getDefinition().getContributionUri(); source.setClassLoader(classLoaderRegistry.getClassLoader(sourceUri)); // generate the metadata used to attach the physical callback wire to the target component ComponentGenerator targetGenerator = getGenerator(component); PhysicalWireTarget target = targetGenerator.generateTarget(callbackService); URI targetUri = callbackService.getParent().getDefinition().getContributionUri(); target.setClassLoader(classLoaderRegistry.getClassLoader(targetUri)); target.setCallback(true); Set<PhysicalOperation> operation = operationGenerator.generateOperations(operations); return new PhysicalWire(source, target, operation); }
target.setCallbackUri(callbackUri); URI targetUri = binding.getParent().getParent().getDefinition().getContributionUri(); ClassLoader targetLoader = classLoaderRegistry.getClassLoader(targetUri); target.setClassLoader(targetLoader);
target.setCallbackUri(callbackUri); URI targetUri = binding.getParent().getParent().getDefinition().getContributionUri(); ClassLoader targetLoader = classLoaderRegistry.getClassLoader(targetUri); target.setClassLoader(targetLoader);
public JmsWireTarget generateTarget(LogicalBinding<JmsBinding> binding, ServiceContract contract, List<LogicalOperation> operations) throws Fabric3Exception { SessionType sessionType = getSessionType(binding.getParent().getParent());