/** * Get the model. * @return The model. */ public IModelInfo getModel() { return interpreter.getModel(); }
/** * Get the file name for a logical type name of a subcomponent of this application. */ public String getComponentFilename(String type) { String ret = null; SubcomponentTypeInfo[] subcomps = getModel().getSubcomponentTypes(); for(int i=0; ret==null && i<subcomps.length; i++) { SubcomponentTypeInfo subct = (SubcomponentTypeInfo)subcomps[i]; if(subct.getName().equals(type)) ret = subct.getFilename(); } return ret; }
public void customResultAvailable(IComponentManagementService cms) { final List<IComponentIdentifier> cids = new ArrayList<IComponentIdentifier>(); Future<Void> fut = new Future<Void>(); fut.addResultListener(new ExceptionDelegationResultListener<Void, IComponentIdentifier>(ret) { public void customResultAvailable(Void result) { if(cids.size()>0) { ret.setResult(cids.get(0)); } else { ret.setException(new RuntimeException("Component not created: "+component)); } } }); createComponent(new ComponentInstanceInfo[]{component}, cms, getModel(), 0, fut, cids); } }));
? getModel().getConfiguration(getConfiguration()) : getModel().getConfigurations().length>0 ? getModel().getConfigurations()[0] : null; if(upes[i].getValue()!=null) step = SJavaParser.getParsedValue(upes[i], getModel().getAllImports(), getFetcher(), getClassLoader()); Class clazz = upes[i].getClazz().getType(getClassLoader(), getModel().getAllImports()); try
? getModel().getConfiguration(getConfiguration()) : getModel().getConfigurations().length>0 ? getModel().getConfigurations()[0] : null; if(upes[i].getValue()!=null) step = SJavaParser.getParsedValue(upes[i], getModel().getAllImports(), getFetcher(), getClassLoader()); Class<?> clazz = upes[i].getClazz().getType(getClassLoader(), getModel().getAllImports()); try
public void customResultAvailable(final IComponentManagementService cms) cms.loadComponentModel(filename, getModel().getResourceIdentifier()).addResultListener(createResultListener( new ExceptionDelegationResultListener<IModelInfo, IComponentIdentifier[]>(ret)
/** * Create a service proxy for registering a provided service. */ public IInternalService createInternalService(Object service, Class<?> type) { // boolean moni = getComponentDescription().getMonitoring()!=null? getComponentDescription().getMonitoring().booleanValue(): false; PublishEventLevel elm = getComponentDescription().getMonitoring()!=null? getComponentDescription().getMonitoring(): null; // todo: remove this? currently the level cannot be turned on due to missing interceptor boolean moni = elm!=null && !PublishEventLevel.OFF.equals(elm); IInternalService is = BasicServiceInvocationHandler.createProvidedServiceProxy( getInternalAccess(), getComponentAdapter(), service, null, type, BasicServiceInvocationHandler.PROXYTYPE_DECOUPLED, null, isCopy(), isRealtime(), getModel().getResourceIdentifier(), moni, null); return is; }
final IInternalService proxy = BasicServiceInvocationHandler.createProvidedServiceProxy( getInternalAccess(), getComponentAdapter(), service, name, type, proxytype, ics, isCopy(), isRealtime(), getModel().getResourceIdentifier(), moni, componentfetcher); getServiceContainer().addService(proxy, info).addResultListener(new ExceptionDelegationResultListener<Void, IInternalService>(ret)
getClassLoader()))+":virtual", info.getType().getType(getClassLoader())); IServiceIdentifier sid = BasicService.createServiceIdentifier(getExternalAccess().getServiceProvider().getId(), rsi.getName(), rsi.getType().getType(getClassLoader()), BasicServiceInvocationHandler.class, getModel().getResourceIdentifier()); final IInternalService service = BasicServiceInvocationHandler.createDelegationProvidedServiceProxy( getInternalAccess(), getComponentAdapter(), sid, rsi, impl.getBinding(), getClassLoader(), isRealtime());