Tabnine Logo
StatelessAbstractInterpreter.getComponentAdapter
Code IndexAdd Tabnine to your IDE (free)

How to use
getComponentAdapter
method
in
jadex.kernelbase.StatelessAbstractInterpreter

Best Java code snippets using jadex.kernelbase.StatelessAbstractInterpreter.getComponentAdapter (Showing top 20 results out of 315)

origin: net.sourceforge.jadex/jadex-kernel-base

/**
 *  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());
}
origin: net.sourceforge.jadex/jadex-kernel-base

/**
 *  Get the logger.
 *  @return The logger.
 */
public Logger getLogger()
{
  return getComponentAdapter().getLogger();
}
 
origin: net.sourceforge.jadex/jadex-kernel-base

/**
 *  Create a result listener which is executed as an component step.
 *  @param The original listener to be called.
 *  @return The listener.
 */
public <T> IResultListener<T> createResultListener(IResultListener<T> listener)
{
  return new ComponentResultListener<T>(listener, getComponentAdapter());
}
origin: net.sourceforge.jadex/jadex-kernel-base

/**
 *  Get the component description.
 *  @return The component description.
 */
public IComponentDescription getComponentDescription()
{
  return getComponentAdapter().getDescription();
}
   
origin: net.sourceforge.jadex/jadex-kernel-base

/**
 *  Test if current thread is the component thread.
 *  @return True if the current thread is the component thread.
 */
public boolean isComponentThread()
{
  return !getComponentAdapter().isExternalThread();
}
 
origin: net.sourceforge.jadex/jadex-kernel-base

/**
 *  Get the component identifier.
 */
public IComponentIdentifier getComponentIdentifier()
{
  return getComponentAdapter().getComponentIdentifier();
}
 
origin: net.sourceforge.jadex/jadex-kernel-base

  /**
   *  Get the parent.
   *  return The parent.
   */
  public INFPropertyProvider getParent()
  {
    return getComponentAdapter().getParent();
  }
}
origin: net.sourceforge.jadex/jadex-kernel-base

/**
 *  Get the local type name of this component as defined in the parent.
 *  @return The type of this component type.
 */
public String getLocalType()
{
  return getComponentAdapter().getDescription().getLocalType();
}
 
origin: net.sourceforge.jadex/jadex-kernel-base

/**
 *  Get the name.
 */
// todo: remove.
public String	getName()
{
  return getComponentAdapter().getComponentIdentifier().getLocalName();		
}
 
origin: net.sourceforge.jadex/jadex-kernel-base

  /**
   *  Get a string representation of the context.
   */
  public String	toString()
  {
    StringBuffer    ret    = new StringBuffer();
    ret.append(SReflect.getInnerClassName(getClass()));
    ret.append("(name=");
    ret.append(getComponentAdapter().getComponentIdentifier().getLocalName());
//        ret.append(", parent=");
//        ret.append(getParentContext());
//        IComponentIdentifier[]    aids    = getComponents(); 
//        if(aids!=null)
//        {
//            ret.append(", components=");
//            ret.append(SUtil.arrayToString(aids));
//        }
//        IContext[]    subcs    = getSubContexts(); 
//        if(subcs!=null)
//        {
//            ret.append(", subcontexts=");
//            ret.append(SUtil.arrayToString(subcs));
//        }
    ret.append(")");
    return ret.toString();
  }
     
origin: net.sourceforge.jadex/jadex-platform-base

/**
 *  Check if correct thread access.
 */
protected void checkThread()
{
  if(DEBUG)
  {
    // Hack!
    if(((ExternalAccess)rsms.getComponent()).getInterpreter().getComponentAdapter().isExternalThread())
    {
      System.out.println("wrong thread: "+Thread.currentThread());
      Thread.dumpStack();
    }
  }
}
origin: net.sourceforge.jadex/jadex-kernel-base

/**
 *    Create an external access.
 */
public ExternalAccess(StatelessAbstractInterpreter interpreter)
{
  this.interpreter = interpreter;
  this.adapter = interpreter.getComponentAdapter();
  this.tostring = interpreter.getComponentIdentifier().getLocalName();
  this.provider = interpreter.getServiceContainer();
}
origin: net.sourceforge.jadex/jadex-kernel-base

/**
 *  Start the services.
 */
public IFuture startServiceContainer()
{
  assert !getComponentAdapter().isExternalThread();
  
  return getServiceContainer().start();
}
 
origin: net.sourceforge.jadex/jadex-kernel-base

  public void customResultAvailable(IComponentManagementService cms)
  {
    cms.destroyComponent(getComponentAdapter().getComponentIdentifier())
      .addResultListener(new DelegationResultListener<Map<String, Object>>(ret));
  }
});
origin: net.sourceforge.jadex/jadex-kernel-base

/**
 *  Get a raw reference to a provided service implementation.
 */
public Object getRawService(String name)
{
  assert !getComponentAdapter().isExternalThread();
  
  return convertRawService(getServiceContainer().getProvidedService(name));
}
 
origin: net.sourceforge.jadex/jadex-kernel-base

/**
 *  Get a raw reference to a provided service implementation.
 */
public Object getRawService(Class type)
{
  assert !getComponentAdapter().isExternalThread();
  
  IService[] sers = getServiceContainer().getProvidedServices(type);
  return convertRawService(sers[0]);
}
 
origin: net.sourceforge.jadex/jadex-kernel-base

/**
 *  Get the number of components to start.
 *  @return The number.
 */
public int getNumber(ComponentInstanceInfo component, IModelInfo model)
{
  assert !getComponentAdapter().isExternalThread();
  
  Object ret = component.getNumber()!=null? SJavaParser.evaluateExpression(component.getNumber(), model.getAllImports(), getFetcher(), getClassLoader()): null;
  return ret instanceof Integer? ((Integer)ret).intValue(): 1;
}
 
origin: net.sourceforge.jadex/jadex-kernel-base

/**
 *  Terminate all extensions.
 */
public IFuture<Void> terminateExtensions()
{
  // Hack!!! When init fails , terminateExtensions() can not be called on component thread
  // as component already terminated.
  assert !getComponentAdapter().isExternalThread() || IComponentDescription.STATE_TERMINATED.equals(getComponentDescription().getState());
  
  Future<Void> ret = new Future<Void>();
  IExtensionInstance[] exts = getExtensions();
  CounterResultListener<Void> lis = new CounterResultListener<Void>(exts.length, false, new DelegationResultListener<Void>(ret));
  for(int i=0; i<exts.length; i++)
  {
    exts[i].terminate().addResultListener(lis);
  }
  return ret;
}
 
origin: net.sourceforge.jadex/jadex-kernel-base

/**
 *  Get the name of components to start.
 *  @return The name.
 */
public String getName(ComponentInstanceInfo component, IModelInfo model, int cnt)
{
  assert !getComponentAdapter().isExternalThread();
  
  String ret = component.getName();
  if(ret!=null)
  {
    SimpleValueFetcher fetcher = new SimpleValueFetcher(getFetcher());
    fetcher.setValue("$n", Integer.valueOf(cnt));
    try
    {
      ret = (String)SJavaParser.evaluateExpression(component.getName(), model.getAllImports(), fetcher, getClassLoader());
      if(ret==null)
        ret = component.getName();
    }
    catch(RuntimeException e)
    {
    }
  }
  return ret;
}
origin: net.sourceforge.jadex/jadex-kernel-base

  /**
   *  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;
  }
 
jadex.kernelbaseStatelessAbstractInterpretergetComponentAdapter

Javadoc

Get the component adapter.

Popular methods of StatelessAbstractInterpreter

  • initProvidedServices
    Init the services.
  • startEndSteps
    Start the end steps of the component. Called as part of cleanup behavior.
  • startServiceContainer
    Start the services.
  • addArgument
    Add a value for an argument (if not already present). Called once for each argument during init.
  • addDefaultResult
    Add a default value for a result (if not already present). Called once for each result during init.
  • addExtension
    Add an extension instance.
  • addNFProperty
  • addProperty
    Add a property value.
  • addService
    Add a service to the component.
  • convertRawService
    Convert to raw service.
  • createChild
    Create a subcomponent.
  • createComponent
    Create subcomponents.
  • createChild,
  • createComponent,
  • createResultListener,
  • createServiceImplementation,
  • getArguments,
  • getBindings,
  • getChildren,
  • getClassLoader,
  • getComponentDescription

Popular in Java

  • Parsing JSON documents to java classes using gson
  • scheduleAtFixedRate (ScheduledExecutorService)
  • setScale (BigDecimal)
  • startActivity (Activity)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • ImageIO (javax.imageio)
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now