本文整理了Java中org.objectweb.fractal.util.Fractal.getBindingController()
方法的一些代码示例,展示了Fractal.getBindingController()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Fractal.getBindingController()
方法的具体详情如下:
包路径:org.objectweb.fractal.util.Fractal
类名称:Fractal
方法名:getBindingController
[英]Returns the BindingController interface of the given component.
[中]
代码示例来源: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: 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.objectweb.fractal.cecilia.toolchain/task-component
public void unbindFc(final InterfaceType clientItfType,
final String clientItfName) throws NoSuchInterfaceException,
IllegalBindingException, IllegalLifeCycleException {
_super_unbindFc(clientItfType, clientItfName);
final Interface innerItf = fcExportedInterfaces.get(clientItfType
.getFcItfName());
if (innerItf != null) {
// the interface correspond to an exported collection interface.
final String suffix = clientItfName.substring(clientItfType
.getFcItfName().length());
getBindingController(innerItf.getFcItfOwner())
.unbindFc(innerItf + suffix);
}
}
代码示例来源:origin: org.objectweb.fractal.cecilia.toolchain/task-component
TaskBinding(final TaskInterface client, final String clientItfName,
final TaskInterface server) {
try {
this.clientBC = getBindingController(client.getFcItfOwner());
} catch (final NoSuchInterfaceException e) {
throw new TaskInternalError("Component " + client.getFcItfOwner()
+ " has no binding controller.");
}
this.clientItfName = clientItfName;
this.server = server;
}
代码示例来源:origin: com.ebmwebsourcing.easycommons/easycommons-sca-impl
public Map<String, Object> getListOfBindings(final Component component) throws SCAException{
Map<String, Object> res = new HashMap<String, Object>();
// Get the binding controller of the new component
try {
final BindingController cBindingController = Fractal
.getBindingController(component);
String[] binds = cBindingController.listFc();
for(int i=0 ; i < binds.length ; i++){
res.put(binds[i], cBindingController.lookupFc(cBindingController.listFc()[i]));
}
} catch (NoSuchInterfaceException e) {
throw new SCAException(e.getLocalizedMessage());
}
return res;
}
代码示例来源:origin: org.objectweb.fractal.cecilia.toolchain/task-component
public void unexportFcInterface(final String clientItfName)
throws NoSuchInterfaceException, IllegalBindingException,
IllegalLifeCycleException {
if (!fcExportedInterfaces.containsKey(clientItfName)) {
throw new ChainedNoSuchInterfaceException(null, _this_weaveableC,
"Interface '" + clientItfName
+ "' does not correspond to an exported client interface.");
}
final Interface innerItf = fcExportedInterfaces.get(clientItfName);
for (final String itfName : getBindingController(innerItf.getFcItfOwner())
.listFc()) {
if (itfName.startsWith(innerItf.getFcItfName())) {
throw new ChainedIllegalBindingException(null,
innerItf.getFcItfOwner(), _this_weaveableC,
innerItf.getFcItfName(), clientItfName,
"Cannot unexport the collection interface. Interface '" + itfName
+ "' must be unbound first.");
}
}
fcExportedInterfaces.remove(clientItfName);
}
代码示例来源:origin: com.ebmwebsourcing.easycommons/easycommons-sca-impl
public List<String> getListOfBinds(final Component component)
throws SCAException {
final List<String> res = new ArrayList<String>();
try {
// Get the binding controller of the new component
final BindingController cBindingController = Fractal
.getBindingController(component);
// Get all the bindings
for (int i = 0; i < cBindingController.listFc().length; i++) {
res.add(cBindingController.listFc()[i]
+ " link to "
+ cBindingController.lookupFc(cBindingController
.listFc()[i]));
}
} catch (final NoSuchInterfaceException e) {
throw new SCAException(
"Impossible to bind the fractal component", e);
}
return res;
}
代码示例来源:origin: com.ebmwebsourcing.easycommons/easycommons-sca-impl
public boolean isAlreadyBind(final Component component,
final String clientItfName, final Interface itf)
throws SCAException {
try {
// Get the binding controller of the new component
final BindingController cBindingController = Fractal
.getBindingController(component);
// Add all the bindings
final Interface o = (Interface) cBindingController.lookupFc(clientItfName);
return (o == itf);
} catch (final NoSuchInterfaceException e) {
throw new SCAException("Impossible to get the interface", e);
}
}
代码示例来源:origin: org.ow2.petals/petals-kernel
BindingController cBindingController = Fractal.getBindingController(newComponent);
代码示例来源:origin: org.objectweb.petals/petals-kernel
.getBindingController(newComponent);
代码示例来源:origin: org.objectweb.fractal.cecilia.toolchain/task-component
public void bindFc(final InterfaceType clientItfType,
final String clientItfName, final Object serverItf)
throws NoSuchInterfaceException, IllegalBindingException,
IllegalLifeCycleException {
// first call super implementation.
_super_bindFc(clientItfType, clientItfName, serverItf);
final Interface innerItf = fcExportedInterfaces.get(clientItfType
.getFcItfName());
if (innerItf != null) {
// the interface correspond to an exported collection interface.
final Object internalItf = Fractal.getContentController(_this_weaveableC)
.getFcInternalInterface(clientItfName);
final String suffix = clientItfName.substring(clientItfType
.getFcItfName().length());
getBindingController(innerItf.getFcItfOwner()).bindFc(
innerItf.getFcItfName() + suffix, internalItf);
}
}
代码示例来源:origin: org.ow2.jasmine.jade/jade-fractal
/**
* Undind the component and then calls the overriden method.
*/
public void undeploy() throws UndeploymentException {
if (_this_weaveableRBC != null) {
String[] itfs = _this_weaveableRBC.listSource();
if (itfs != null) {
for (int i = 0; i < itfs.length; i++) {
try {
Object bindings[] = _this_weaveableRBC.lookupBindingSource(itfs[i]);
Component owner = null;
for(Object binding : bindings){
owner = ((Interface)binding).getFcItfOwner();
Fractal.getBindingController(owner).unbindFc(itfs[i]);
}
} catch (Exception e) {
throw new ChainedUndeploymentException(e,
_this_weaveableC, e.getMessage());
}
}
}
}
_super_undeploy();
}
代码示例来源:origin: org.ow2.frascati/frascati-fscript-core
/**
* Get the FraSCAti FScript composite, i.e. the fractal component
* implementing the whole FraSCAti FScript engine;
*
* @return the FraSCAti FScript composite.
*/
public final Component getFraSCAtiScriptComposite()
{
ServiceReference<?> engineItf = (ServiceReference<?>) engine;
Component fscriptComp = ((Interface) engineItf.getService()).getFcItfOwner();
Interface engineSrvItf = null;
try {
engineSrvItf = (Interface) Fractal.getBindingController(fscriptComp).lookupFc("engine");
return engineSrvItf.getFcItfOwner();
} catch (NoSuchInterfaceException e) {
// should not happen
e.printStackTrace();
return null;
}
}
代码示例来源:origin: org.ow2.petals/petals-microkernel-api
final BindingController cBindingController = Fractal.getBindingController(newComponent);
代码示例来源:origin: org.ow2.petals/petals-kernel
BindingController systemRecoveryBC = Fractal.getBindingController(systemRecoveryComponent);
for (String bindingName : systemRecoveryBC.listFc()) {
systemRecoveryBC.unbindFc(bindingName);
代码示例来源:origin: org.ow2.petals.dsb/dsb-kernel
BindingController systemRecoveryBC = Fractal.getBindingController(systemRecoveryComponent);
for (String bindingName : systemRecoveryBC.listFc()) {
systemRecoveryBC.unbindFc(bindingName);
代码示例来源:origin: org.ow2.petals/petals-kernel
.getBindingController(serviceAssemblyLifeCycle);
for (int i = 0; i < lifeCycleBindingController.listFc().length; i++) {
lifeCycleBindingController.unbindFc(lifeCycleBindingController.listFc()[i]);
代码示例来源:origin: org.objectweb.petals/petals-kernel
.getBindingController(installer);
for (int i = 0; i < lifeCycleBindingController.listFc().length; i++) {
lifeCycleBindingController.unbindFc(lifeCycleBindingController
代码示例来源:origin: org.ow2.petals/petals-kernel
.getBindingController(sharedLibraryLifeCycle);
for (int i = 0; i < lifeCycleBindingController.listFc().length; i++) {
lifeCycleBindingController.unbindFc(lifeCycleBindingController.listFc()[i]);
代码示例来源:origin: org.ow2.petals/petals-kernel
BindingController lifeCycleBindingController = Fractal.getBindingController(installer);
for (int i = 0; i < lifeCycleBindingController.listFc().length; i++) {
if (lifeCycleBindingController.lookupFc(lifeCycleBindingController.listFc()[i]) != null) {
内容来源于网络,如有侵权,请联系作者删除!