/** * Get the external access. * @return The external access. */ public IExternalAccess getExternalAccess() { // Todo: shadow access and invalidation return new ExternalAccess(this); }
/** * Wait for some time. */ public IFuture<Void> waitForDelay(final long delay) { return waitForDelay(delay, false); }
/** * Get the service provider. */ public IServiceProvider getServiceProvider() { return getServiceContainer(); }
/** * Get the value fetcher. */ public IValueFetcher getFetcher() { assert !getComponentAdapter().isExternalThread(); if(fetcher==null) { fetcher = new InterpreterFetcher(this); } return fetcher; }
/** * Create a result listener which is executed as an component step. * @param The original listener to be called. * @return The listener. */ public <T> IIntermediateResultListener<T> createResultListener(IIntermediateResultListener<T> listener) { return new IntermediateComponentResultListener<T>(listener, getComponentAdapter()); }
/** * Load a model. * * @param model The model (e.g. file name). * @param The imports (if any). * @return The loaded model. */ public IFuture<IModelInfo> loadModel(final String model, final String[] imports, IResourceIdentifier rid) { // System.out.println("loadModel: "+model); return loadModel(model, imports, rid, false); }
public void exceptionOccurred(Exception exception) { // Give warning? // FIXME: Blacklist? What if a new factory model is added later? // if(!isrecur) // extensionblacklist.add(ext); resultAvailable(null); } }));
public void terminated(Exception reason) { removeSubscription(ret); }
/** * Get the model. * @return The model. */ public IModelInfo getModel() { return interpreter.getModel(); }
/** * Get the local type name of this component as defined in the parent. * @return The type of this component type. */ public String getLocalType() { return interpreter.getLocalType(); }
/** * Attempts to find an active kernel factory, searching, loading and instantiating as required. * * @param model The model for which the kernel is needed. * @param imports Model imports. * @param classloader Model classloader. * @return Factory instance of the kernel or null if no matching kernel was found. */ protected IFuture findKernel(final String model, final String[] imports, final IResourceIdentifier rid) { return findKernel(model, imports, rid, false); }
public void exceptionOccurred(Exception exception) { // System.out.println("Tried to load model for kernel: " + kernelloc + " but failed. "); resultAvailable(null); } }));
/** * Start the component behavior. */ public void startBehavior() { startInitialSteps(); }
public Logger execute(Void args) { return getLogger(); } }));
public void customResultAvailable(IComponentManagementService cms) { // NOTE: in current implementation application waits for subcomponents // to be finished and cms implements a hack to get the external // access of an uninited parent. // (NOTE1: parent cannot wait for subcomponents to be all created // before setting itself inited=true, because subcomponents need // the parent external access.) // (NOTE2: subcomponents must be created one by one as they // might depend on each other (e.g. bdi factory must be there for jcc)). createComponent(components, cms, model, 0, ret, cids); } public void exceptionOccurred(Exception exception)
public void run() { interpreter.addNFProperty(nfprop); ret.setResult(null); } });
/** * Get the monitoring event emit level. */ public PublishEventLevel getPublishEmitLevelMonitoring() { return getComponentDescription().getMonitoring()!=null? getComponentDescription().getMonitoring(): PublishEventLevel.OFF; // return emitlevelmon; }
/** * Get the monitoring service getter. * @return The monitoring service getter. */ public ServiceGetter<IMonitoringService> getMonitoringServiceGetter() { if(getter==null) getter = new ServiceGetter<IMonitoringService>(getInternalAccess(), IMonitoringService.class, RequiredServiceInfo.SCOPE_PLATFORM); return getter; }
/** * Create the external access instance. */ protected IExternalAccess createExternalAccess() { return new ExternalAccess(this); }
/** * Wait for some time and execute a component step afterwards. */ public <T> IFuture<T> waitForDelay(final long delay, final IComponentStep<T> step) { return waitForDelay(delay, step, false); }