Mail Archive Home | fractal-commits List | March 2007 Index
| <-- Date Index --> | <-- Thread Index --> |
empty impl of the ConnectorCompiler component
--- sandbox/ervalerio/fractal-jgroups/src/main/java/org/objectweb/fractal/adl/connector/ConnectorCompiler.java 2007-03-30 11:39:16 UTC (rev 2041)
+++ sandbox/ervalerio/fractal-jgroups/src/main/java/org/objectweb/fractal/adl/connector/ConnectorCompiler.java 2007-03-30 11:56:32 UTC (rev 2042)
@@ -0,0 +1,69 @@
+package org.objectweb.fractal.adl.connector;
+
+import java.util.List;
+import java.util.Map;
+
+import org.objectweb.fractal.adl.ADLException;
+import org.objectweb.fractal.adl.TaskMap;
+import org.objectweb.fractal.adl.components.ComponentContainer;
+import org.objectweb.fractal.adl.components.PrimitiveCompiler;
+import org.objectweb.fractal.api.NoSuchInterfaceException;
+import org.objectweb.fractal.api.control.BindingController;
+import org.objectweb.fractal.api.control.IllegalBindingException;
+import org.objectweb.fractal.api.control.IllegalLifeCycleException;
+
+public class ConnectorCompiler implements PrimitiveCompiler, BindingController {
+
+ /**
+ * Name of the mandatory interface bound to the {@link BindingBuilder} used
+ * by this compiler.
+ */
+
+ public final static String BUILDER_CONNECTOR = "builder";
+
+ /**
+ * The {@link ConnectorBuilder} used by this compiler.
+ */
+ public ConnectorBuilder builder;
+
+ // --------------------------------------------------------------------------
+ // Implementation of the BindingController interface
+ // --------------------------------------------------------------------------
+
+ public void bindFc(final String itf, final Object value)
+ throws NoSuchInterfaceException, IllegalBindingException,
+ IllegalLifeCycleException {
+
+ if (itf.equals(BUILDER_CONNECTOR)) {
+ builder = (ConnectorBuilder) value;
+ }
+ }
+
+ public String[] listFc() {
+ return new String[] { BUILDER_CONNECTOR };
+ }
+
+ public Object lookupFc(final String itf) throws NoSuchInterfaceException {
+ if (itf.equals(BUILDER_CONNECTOR)) {
+ return builder;
+ }
+ return null;
+ }
+
+ public void unbindFc(final String itf) throws NoSuchInterfaceException,
+ IllegalBindingException, IllegalLifeCycleException {
+ if (itf.equals(BUILDER_CONNECTOR)) {
+ builder = null;
+ }
+ }
+
+ // --------------------------------------------------------------------------
+ // Implementation of the Compiler interface
+ // --------------------------------------------------------------------------
+ public void compile(List arg0, ComponentContainer arg1, TaskMap arg2,
+ Map arg3) throws ADLException {
+ // TODO Auto-generated method stub
+
+ }
+
+}
| <-- Date Index --> | <-- Thread Index --> |
Powered by MHonArc.
Copyright © 2006-2007, OW2 Consortium | contact | webmaster.