org.objectweb.fractal.util.Fractal类的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(9.3k)|赞(0)|评价(0)|浏览(80)

本文整理了Java中org.objectweb.fractal.util.Fractal类的一些代码示例,展示了Fractal类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Fractal类的具体详情如下:
包路径:org.objectweb.fractal.util.Fractal
类名称:Fractal

Fractal介绍

[英]Provides static methods to access standard interfaces of Fractal components.
[中]提供静态方法来访问分形组件的标准接口。

代码示例

代码示例来源:origin: org.ow2.petals/petals-microkernel-api

public static NameController getNameController(final Component component) {
    try {
      return Fractal.getNameController(component);
    } catch (NoSuchInterfaceException e) {
      throw new UncheckedException("This can't happen", e);
    }
  }
}

代码示例来源:origin: org.objectweb.petals/petals-kernel

.getContentController(parentComponent);
.getBindingController(newComponent);

代码示例来源:origin: org.objectweb.fractal.cecilia.toolchain/plugin-framework

.getSuperController(this.weaveableC);
.getContentController(superComponent);

代码示例来源:origin: org.ow2.frascati/frascati-binding-factory

/**
 * Return the parent container of the specified component.
 * A container is a component with the "-container" suffix.
 * 
 * @param comp - A binding component
 * @return the parent container of the given component, null if not found.
 * @throws NoSuchInterfaceException
 *             if the comp does not provide the {@link SuperController}
 *             interface.
 */
@Override
protected final Component getParentComponent(Component comp)
  throws NoSuchInterfaceException
{
 Component[] parents = Fractal.getSuperController(comp).getFcSuperComponents();
 for (Component parent: parents) {
  if (Fractal.getNameController(parent).getFcName().endsWith("-container")) {
   return parent;
  }
 }
 return parents[0]; // No container found, keep the previous behavior: return the first parent
}

代码示例来源:origin: org.ow2.jasmine.jade/jade-fractal

/**
 * @param c
 * @param subcmp
 * @return
 * @deprecated
 */
private static Component search(Component c, String subcmp) {
  try {
    ContentController cc = Fractal.getContentController(c);
    Component[] sub = cc.getFcSubComponents();
    for (int i = 0; i < sub.length; i++) {
      try {
        if (Fractal.getNameController(sub[i]).getFcName().equals(
            subcmp))
          return sub[i];
      } catch (NoSuchInterfaceException e1) {
        // no name ctrler ignore it
      }
    }
  } catch (Exception e) {
    return null;
  }
  return null;
}

代码示例来源:origin: org.ow2.petals/petals-microkernel-api

IllegalContentException, IllegalLifeCycleException, IllegalBindingException {
final ContentController parentContentController = Fractal.getContentController(parentComponent);
Fractal.getNameController(newComponent).setFcName(newComponentName);
final BindingController cBindingController = Fractal.getBindingController(newComponent);

代码示例来源:origin: org.ow2.frascati/frascati-fscript-core

Component[] parents = Fractal.getSuperController(itfOwner).getFcSuperComponents();
for (Component parent : parents) {
  Component[] children = Fractal.getContentController(parent).getFcSubComponents();
  for (Component child : children) {            
    String childName = Fractal.getNameController(child).getFcName();
    if ( childName.contains("-rmi-skeleton") ) {
      try {

代码示例来源:origin: com.ebmwebsourcing.easycommons/easycommons-sca-impl

/**
 * A utility function allowing to get a component from any content
 * controller.
 * 
 * @param parentContentController
 *            parentContentController
 * @param name
 *            component name
 * @return the component, null if not found
 */
public List<Component> getComponents(final Component parent) {
  final List<Component> res = new ArrayList<Component>();
  try {
    final ContentController parentContentController = Fractal
        .getContentController(parent);
    // List content controller subcomponents
    for (final Component component : parentContentController
        .getFcSubComponents()) {
      res.add(component);
    }
  } catch (final NoSuchInterfaceException e1) {
    // do nothing, return null
  }
  return res;
}

代码示例来源:origin: org.objectweb.fractal.cecilia.toolchain/plugin-framework

private void startPlugin(final Component plugin)
  throws NoSuchInterfaceException, IllegalLifeCycleException {
 final LifeCycleController lc = Fractal.getLifeCycleController(plugin);
 lc.startFc();
}

代码示例来源:origin: com.ebmwebsourcing.easycommons/easycommons-sca-impl

/**
 * A utility function allowing to get components interface binding to the
 * client interface of the component controller.
 * 
 * @param parentContentController
 *            parentContentController
 * @param name
 *            component name
 * @return the component, null if not found
 */
public Map<String, Interface> getServerInterfacesLinkedToClientInterfacesOfComponent(
    final Component component) {
  final Map<String, Interface> res = new HashMap<String, Interface>();
  try {
    final BindingController componentBindingController = Fractal
        .getBindingController(component);
    // List content controller subcomponents
    for (final String clientItfName : componentBindingController.listFc()) {
      final Interface itf = (org.objectweb.fractal.api.Interface) componentBindingController
          .lookupFc(clientItfName);
      res.put(clientItfName, itf);
    }
  } catch (final NoSuchInterfaceException e1) {
    // do nothing, return null
  }
  return res;
}

代码示例来源:origin: org.ow2.fractal.bf/fractal-bf-core

/**
 * Return the parent component of the specified component. If the component
 * has more than one parent component, the first one is returned.
 * 
 * @param comp
 * @return the first parent component of the given component.
 * @throws NoSuchInterfaceException
 *             if the comp does not provide the {@link SuperController}
 *             interface.
 */
protected Component getParentComponent(Component comp)
    throws NoSuchInterfaceException {
  Component parentComposite = Fractal.getSuperController(comp)
      .getFcSuperComponents()[0];
  return parentComposite;
}

代码示例来源:origin: org.ow2.petals/petals-kernel

ContentController parentContentController = Fractal.getContentController(composite);
    subContentController = Fractal.getContentController(component);
    if (subContentController.getFcSubComponents().length > 0) {
      stopComposite(component);
    LifeCycleController lifeCycleController = Fractal.getLifeCycleController(component);
    if (LifeCycleController.STARTED.equals(lifeCycleController.getFcState())) {
      lifeCycleController.stopFc();

代码示例来源:origin: org.ow2.petals.dsb/dsb-kernel

SuperController sc = Fractal.getSuperController(this.component);
if (sc.getFcSuperComponents().length != 1) {
  this.log.warning("Can not find a super component to look at WS children");
} else {
  Component parentcontainer = sc.getFcSuperComponents()[0];
  ContentController cc = Fractal.getContentController(parentcontainer);
  for (Component component : cc.getFcSubComponents()) {
    String name = Fractal.getNameController(component).getFcName();
    Object[] itfs = component.getFcInterfaces();
    for (Object object : itfs) {

代码示例来源:origin: com.ebmwebsourcing.easycommons/easycommons-sca-impl

public List<Component> getAllSubComponents(final Component parent) {
  final List<Component> res = new ArrayList<Component>();
  try {
    final ContentController parentContentController = Fractal
        .getContentController(parent);
    // List content controller subcomponents
    for (final Component component : parentContentController
        .getFcSubComponents()) {
      res.add(component);
      res.addAll(getComponents(component));
    }
  } catch (final NoSuchInterfaceException e1) {
    // do nothing, return null
  }
  return res;
}

代码示例来源:origin: org.ow2.frascati.tinfi/frascati-tinfi-runtime

/**
   * Stop the specified component. Defined to mimic SCADomain.close().
   */
  public static void close( Component c )
  throws IllegalLifeCycleException, NoSuchInterfaceException {
    Fractal.getLifeCycleController(c).stopFc();
  }
}

代码示例来源:origin: com.ebmwebsourcing.easycommons/easycommons-sca-impl

public boolean isBinded(final Component component,
    final String clientItfName) throws SCAException {
  boolean res = true;
  try {
    // Get the binding controller of the new component
    final BindingController cBindingController = Fractal
        .getBindingController(component);
    // Add all the bindings
    final SCAComponent o = (SCAComponent) cBindingController.lookupFc(clientItfName);
    if (o == null) {
      res = false;
    }
  } catch (final NoSuchInterfaceException e) {
    throw new SCAException(
        "Impossible to bind the fractal component", e);
  }
  return res;
}

代码示例来源:origin: org.ow2.jasmine.jade/jade-fractal

/**
 * @param comp
 * @param name
 * @return
 * @deprecated
 */
private static Component subcomp(Component comp, String name) {
  try {
    ContentController cc = Fractal.getContentController(comp);
    for (Component sc : cc.getFcSubComponents()) {
      NameController nc = Fractal.getNameController(sc);
      if (name.equals(nc.getFcName())) {
        return sc;
      }
    }
  } catch (NoSuchInterfaceException e) {
    e.printStackTrace();
    return null;
  }
  return null;
}

代码示例来源:origin: org.objectweb.fractal.bf/util

/**
 * Get the enclosing component of a given component. The case of shared components
 * is not considered.
 * 
 * @param component a component
 * @return return the closest enclosing component, null otherwise
 * @throws NoSuchInterfaceException if the input component does not implement
 *             the {@link SuperController} interface
 */
public static Component directParentOf(final Component component)
  throws NoSuchInterfaceException
{
 Component parent = null;
 SuperController compSC = org.objectweb.fractal.util.Fractal
   .getSuperController(component);
 Component[] fcSuperComponents = compSC.getFcSuperComponents();
 if (fcSuperComponents.length > 0)
 {
  parent = fcSuperComponents[0];
 }
 return parent;
}

代码示例来源:origin: org.ow2.frascati/frascati-fscript-core

compName = Fractal.getNameController(comp).getFcName();
} catch (NoSuchInterfaceException e1) {
  logger.warning(comp + "should have a Name Controller!");
  SuperController cc = Fractal.getSuperController(comp);
  Set<Node> result = new HashSet<Node>();
  for (Component parent : cc.getFcSuperComponents()) {
      String parentName = null;
      try {
        parentName = Fractal.getNameController(parent).getFcName();
      } catch (NoSuchInterfaceException e1) {
        logger.warning(parent + "should have a Name Controller!");

代码示例来源:origin: org.objectweb.petals/petals-kernel

.getContentController(composite);
  subContentController = Fractal.getContentController(component);
  if (subContentController.getFcSubComponents().length > 0) {
    stopComposite(component);
    .getLifeCycleController(component);
  if (lifeCycleController.getFcState().equals(
    LifeCycleController.STARTED)) {

相关文章