From: Robert L. <rle...@us...> - 2007-02-15 12:21:33
|
Update of /cvsroot/ccmtools/ccmtools/test/JavaAssembly/prototype/wamas In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv27103/test/JavaAssembly/prototype/wamas Modified Files: C3i1Impl.java C3Impl.java Main.java Log Message: first version of the assembly prototype Index: C3i1Impl.java =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/test/JavaAssembly/prototype/wamas/C3i1Impl.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** C3i1Impl.java 15 Feb 2007 09:51:31 -0000 1.2 --- C3i1Impl.java 15 Feb 2007 12:21:19 -0000 1.3 *************** *** 2,22 **** * This file was automatically generated by CCM Tools version 0.9.0 * <http://ccmtools.sourceforge.net> ! * * CCM_I1Impl facet implementation. * * // TODO: WRITE YOUR DESCRIPTION HERE ! ! * * @author * @version */ ! package wamas; import Components.CCMException; import wamas.Test.CCM_I1; import wamas.Test.I1; - ! /** * This class implements a component facet's methods. * --- 2,22 ---- * This file was automatically generated by CCM Tools version 0.9.0 * <http://ccmtools.sourceforge.net> ! * * CCM_I1Impl facet implementation. * * // TODO: WRITE YOUR DESCRIPTION HERE ! ! * * @author * @version */ ! package wamas; import Components.CCMException; import wamas.Test.CCM_I1; import wamas.Test.I1; ! ! /** * This class implements a component facet's methods. * *************** *** 26,30 **** * @version */ ! public class C3i1Impl implements CCM_I1 { --- 26,30 ---- * @version */ ! public class C3i1Impl implements CCM_I1 { *************** *** 32,54 **** private C3Impl component; ! public C3i1Impl(C3Impl component) { this.component = component; } ! /** Business logic implementations */ ! ! ! public String value() throws CCMException { ! // TODO: IMPLEMENT ME HERE ! ! return ""; ! } } --- 32,54 ---- private C3Impl component; ! public C3i1Impl(C3Impl component, wamas.Test.I1 target) { this.component = component; + this.target = target; } ! /** Business logic implementations */ ! ! // connect comp1.i1 to this.i1; ! private wamas.Test.I1 target; public String value() throws CCMException { ! return target.value(); ! } } Index: Main.java =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/test/JavaAssembly/prototype/wamas/Main.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Main.java 15 Feb 2007 09:51:31 -0000 1.1 --- Main.java 15 Feb 2007 12:21:20 -0000 1.2 *************** *** 9,12 **** --- 9,13 ---- H3 home = (H3)H3Deployment.create(); C3 component = home.create(); + component.configuration_complete(); System.out.println("C3.b = "+component.b()); wamas.Test.I1 c3i1 = component.provide_i1(); *************** *** 15,18 **** --- 16,20 ---- wamas.Test.H1 h1 = (wamas.Test.H1)wamas.Test.H1Deployment.create(); wamas.Test.C1 c1 = h1.create(); + c1.configuration_complete(); wamas.Test.I1 c1i1 = c1.provide_i1(); System.out.println("C1->I1.value() = "+c1i1.value()); Index: C3Impl.java =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/test/JavaAssembly/prototype/wamas/C3Impl.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** C3Impl.java 15 Feb 2007 09:27:25 -0000 1.1 --- C3Impl.java 15 Feb 2007 12:21:20 -0000 1.2 *************** *** 2,6 **** * This file was automatically generated by CCM Tools version 0.9.0 * <http://ccmtools.sourceforge.net> ! * * CCM_C3 component business logic. * --- 2,6 ---- * This file was automatically generated by CCM Tools version 0.9.0 * <http://ccmtools.sourceforge.net> ! * * CCM_C3 component business logic. * *************** *** 12,21 **** package wamas; - - import Components.CCMException; - import Components.SessionContext; ! ! /** * This class implements component equivalent and supported interfaces --- 12,22 ---- package wamas; ! import Components.CCMException; ! import Components.CCMExceptionReason; ! import Components.SessionContext; ! ! ! /** * This class implements component equivalent and supported interfaces *************** *** 27,45 **** * @author * @version ! */ ! public class C3Impl implements CCM_C3 { /** Supported interface attribute variables */ ! ! /** Component attribute variables */ ! ! private int b_; public CCM_C3_Context ctx; ! ! public C3Impl() { --- 28,53 ---- * @author * @version ! */ ! public class C3Impl implements CCM_C3 { /** Supported interface attribute variables */ ! ! /** Component attribute variables */ ! ! private int b_; public CCM_C3_Context ctx; ! ! ! // component Test::C1 comp1; ! private wamas.Test.C1 comp1_; ! ! // component Test::C2 comp2; ! private wamas.Test.C2 comp2_; ! ! public C3Impl() { *************** *** 48,61 **** ! /* ! * Supported interface methods */ /** Supported interface attributes */ ! ! ! /** Supported interface methods */ ! --- 56,69 ---- ! /* ! * Supported interface methods */ /** Supported interface attributes */ ! ! ! /** Supported interface methods */ ! *************** *** 67,71 **** { return this.b_; ! } public void b(int value) --- 75,79 ---- { return this.b_; ! } public void b(int value) *************** *** 74,104 **** this.b_ = value; } ! /** Facet implementation factory methods */ ! public wamas.Test.CCM_I1 get_i1() { ! return new wamas.C3i1Impl(this); } ! /** Component callback methods */ ! ! public void set_session_context(SessionContext ctx) throws CCMException { ! this.ctx = (CCM_C3_Context)ctx; } ! public void ccm_activate() throws CCMException { ! // OPTIONAL: IMPLEMENT ME HERE ! } ! public void ccm_passivate() throws CCMException { --- 82,149 ---- this.b_ = value; } ! /** Facet implementation factory methods */ ! public wamas.Test.CCM_I1 get_i1() { ! // connect comp1.i1 to this.i1; ! return new wamas.C3i1Impl(this, comp1_.provide_i1()); } ! /** Component callback methods */ ! ! public void set_session_context(SessionContext ctx) throws CCMException { ! this.ctx = (CCM_C3_Context)ctx; } ! public void ccm_activate() throws CCMException { ! try ! { ! { ! // component Test::C1 comp1; ! wamas.Test.H1 home = (wamas.Test.H1)wamas.Test.H1Deployment.create(); ! comp1_ = home.create(); ! } ! ! { ! // component wamas::Test::C2 comp2; ! wamas.Test.H2 home = (wamas.Test.H2)wamas.Test.H2Deployment.create(); ! comp2_ = home.create(); ! } ! ! // connect comp2.i2 to comp1.i2; ! comp1_.connect_i2(comp2_.provide_i2()); ! ! // connect this.i3 to comp2.i3; ! comp2_.connect_i3(ctx.get_connection_i3()); ! ! // constant comp1.a1 = "Hello World"; ! comp1_.a1("Hello World"); ! ! // constant comp1.a2 = 642; ! comp1_.a2(642); ! ! // attribute comp2.b = this.b; ! comp2_.b(this.b_); ! ! // finish configuration ! comp1_.configuration_complete(); ! comp2_.configuration_complete(); ! } ! catch(Exception e) ! { ! throw new CCMException(e.getMessage(), CCMExceptionReason.CREATE_ERROR); ! } } ! public void ccm_passivate() throws CCMException { *************** *** 106,110 **** } ! public void ccm_remove() throws CCMException { --- 151,155 ---- } ! public void ccm_remove() throws CCMException { |