private String[] getCamelLabels() { if (_camelLabels == null) { List<String> list = new ArrayList<String>(); list.add(ComponentLabel.CAMEL.label()); ContextMapperModel cm_model = getModel(); if (cm_model != null) { BindingModel b_model = cm_model.getBindingModel(); if (b_model != null) { String e_label = EndpointLabel.toLabel(b_model.getType()); if (e_label != null) { list.add(e_label); } } } _camelLabels = list.toArray(new String[list.size()]); } return _camelLabels; }
private String[] getCamelLabels() { if (_camelLabels == null) { List<String> list = new ArrayList<String>(); list.add(ComponentLabel.CAMEL.label()); ContextMapperModel cm_model = getModel(); if (cm_model != null) { BindingModel b_model = cm_model.getBindingModel(); if (b_model != null) { String e_label = EndpointLabel.toLabel(b_model.getType()); if (e_label != null) { list.add(e_label); } } } _camelLabels = list.toArray(new String[list.size()]); } return _camelLabels; }
/** * Create a new BaseService from the specified config model. * * @param serviceConfig the composite service config. * @param application the application containing the service. */ public BaseService(CompositeServiceModel serviceConfig, BaseApplication application) { _name = serviceConfig.getQName(); _application = application; if (serviceConfig.getInterface() != null) { _serviceInterface = serviceConfig.getInterface().getInterface(); } _promotedService = getPromotedService(application, serviceConfig); _gateways = new LinkedHashMap<String, Binding>(); int idx = 0; for (BindingModel bindingModel : serviceConfig.getBindings()) { // Generate binding name for now until tooling and config are updated to expose it ++idx; String name = bindingModel.getName() == null ? "_" + _name.getLocalPart() + "_" + bindingModel.getType() + "_" + idx : bindingModel.getName(); _gateways.put(name, new BaseBinding(_application, _name, bindingModel.getType(), name, bindingModel.toString())); } _throttling = new ServiceThrottling(this, serviceConfig.getExtensions()); }
/** * Create a new BaseReference from the specified config model. * * @param referenceConfig the composite reference config. * @param application the application containing the service. */ public BaseReference(CompositeReferenceModel referenceConfig, BaseApplication application) { _name = referenceConfig.getQName(); _application = application; if (referenceConfig.getInterface() != null) { _referenceInterface = referenceConfig.getInterface().getInterface(); } _promotedReference = referenceConfig.getPromote(); _gateways = new LinkedHashMap<String, Binding>(); int idx = 0; for (BindingModel bindingModel : referenceConfig.getBindings()) { // Generate binding name for now until tooling and config are updated to expose it ++idx; String name = bindingModel.getName() == null ? "_" + _name.getLocalPart() + "_" + bindingModel.getType() + "_" + idx : bindingModel.getName(); _gateways.put(name, new BaseBinding(_application, _name, bindingModel.getType(), name, bindingModel.toString())); } _operations = new LinkedList<ServiceOperation>(); for (org.switchyard.metadata.ServiceOperation so : getInterfaceOperations(referenceConfig.getInterface())) { _operations.add(new BaseServiceOperation(so.getName(), so.getExchangePattern().name(), so.getInputType(), so.getOutputType(), so.getFaultType())); } }
_log.debug("Initializing binding name for binding " + bindingCount + " for reference " + reference.getQName() + " for deployment " + getName()); binding.setName("_" + reference.getName() + "_" + binding.getType() + "_" + bindingCount); Activator activator = findActivator(binding.getType()); if (activator == null) { continue;
_log.debug("Initializing binding name for binding " + bindingCount + " for service " + service.getQName() + " for deployment " + getName()); binding.setName("_" + service.getName() + "_" + binding.getType() + "_" + bindingCount); Activator activator = findActivator(binding.getType()); if (activator == null) { continue;