Update of /cvsroot/ccmtools/ccmtools/test/JavaAssembly/prototype/wamas In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv25040/test/JavaAssembly/prototype/wamas Added Files: CCM_H3.java CCM_C3_Context.java CCM_C3.java .cvsignore CCM_C3_ContextImpl.java H3Implicit.java C3i1Impl.java H3Deployment.java CCM_H3Explicit.java H3Adapter.java H3Explicit.java CCM_H3Implicit.java C3.java C3Impl.java H3Factory.java C3Adapter.java H3.java H3Impl.java Log Message: empty prototype --- NEW FILE: H3Adapter.java --- /* * This file was automatically generated by CCM Tools version 0.9.0 * <http://ccmtools.sourceforge.net> * DO NOT EDIT! */ package wamas; import java.util.logging.Logger; import Components.Assembly; import Components.AssemblyFactory; import Components.CCMException; import Components.CCMObject; import Components.CreateFailure; import Components.RemoveFailure; import ccmtools.local.ServiceLocator; public class H3Adapter implements H3 { private Logger logger = ServiceLocator.instance().getLogger(); private CCM_H3 localInterface; private AssemblyFactory assemblyFactory; protected H3Adapter() { this(null, null); } public H3Adapter(CCM_H3 localInterface) { this(localInterface, null); } public H3Adapter(CCM_H3 localInterface, AssemblyFactory assemblyFactory) { logger.fine("localInterface = " + localInterface + ", " + assemblyFactory); this.localInterface = localInterface; this.assemblyFactory = assemblyFactory; } public C3 create() throws CreateFailure { logger.fine(""); try { CCM_C3 c = (CCM_C3)localInterface.create(); C3 component; if(assemblyFactory != null) { Assembly assembly = assemblyFactory.create(); component = new C3Adapter(c, assembly); assembly.build(component); } else { component = new C3Adapter(c); } return component; } catch(CCMException e) { throw new CreateFailure(); } } public void remove_component(CCMObject component) throws CCMException, RemoveFailure { logger.fine(""); component.remove(); } public CCMObject create_component() throws CCMException, CreateFailure { logger.fine(""); return create(); } } --- NEW FILE: C3i1Impl.java --- /** * 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. * * // TODO: WRITE YOUR DESCRIPTION HERE ! * * @author * @version */ public class C3i1Impl implements CCM_I1 { /** Reference to the facet's component implementation */ private C3Impl component; public C3i1Impl(C3Impl component) { this.component = component; } /** Business logic implementations */ } --- NEW FILE: CCM_H3Explicit.java --- /* * This file was automatically generated by CCM Tools version 0.9.0 * <http://ccmtools.sourceforge.net> * DO NOT EDIT! */ package wamas; public interface CCM_H3Explicit extends Components.HomeExecutorBase { } --- NEW FILE: H3Implicit.java --- /* * This file was automatically generated by CCM Tools version 0.9.0 * <http://ccmtools.sourceforge.net> * DO NOT EDIT! */ package wamas; import Components.KeylessCCMHome; import Components.CreateFailure; public interface H3Implicit extends KeylessCCMHome { C3 create() throws CreateFailure; } --- NEW FILE: H3Impl.java --- /* * This file was automatically generated by CCM Tools version 0.9.0 * <http://ccmtools.sourceforge.net> * * H3 Implementation * * // TODO: WRITE YOUR DESCRIPTION HERE! * * @author * @version */ package wamas; import Components.CCMException; import Components.EnterpriseComponent; /** * This class implements a component home's attributes and factory methods. * * // TODO: WRITE YOUR DESCRIPTION HERE ! * * @author * @version */ public class H3Impl implements CCM_H3 { public H3Impl() { // OPTIONAL: IMPLEMENT ME HERE ! } public EnterpriseComponent create() throws CCMException { return (EnterpriseComponent) new C3Impl(); } } --- NEW FILE: C3Impl.java --- /** * This file was automatically generated by CCM Tools version 0.9.0 * <http://ccmtools.sourceforge.net> * * CCM_C3 component business logic. * * // TODO: WRITE YOUR DESCRIPTION HERE ! * * @author * @version */ package wamas; import Components.CCMException; import Components.SessionContext; /** * This class implements component equivalent and supported interfaces * as well as component attributes. * Additionally, session component callback methods must be implemented. * * // TODO: WRITE YOUR DESCRIPTION HERE ! * * @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() { // OPTIONAL: IMPLEMENT ME HERE ! } /* * Supported interface methods */ /** Supported interface attributes */ /** Supported interface methods */ /** Component attribute accessor methods */ public int b() throws CCMException { return this.b_; } public void b(int value) throws CCMException { 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 { // OPTIONAL: IMPLEMENT ME HERE ! } public void ccm_remove() throws CCMException { // OPTIONAL: IMPLEMENT ME HERE ! } } --- NEW FILE: C3.java --- /* * This file was automatically generated by CCM Tools version 0.9.0 * <http://ccmtools.sourceforge.net> * DO NOT EDIT! */ package wamas; import Components.AlreadyConnected; import Components.CCMObject; import Components.CCMException; import Components.Cookie; import Components.ExceededConnectionLimit; import Components.InvalidConnection; import Components.NoConnection; public interface C3 extends CCMObject { /** Attribute equivalent methods */ int b() throws CCMException; void b(int value) throws CCMException; /** Facet equivalent methods */ wamas.Test.I1 provide_i1(); /** Receptacle equivalent methods */ void connect_i3(wamas.Test.I3 localObj) throws AlreadyConnected, InvalidConnection; wamas.Test.I3 disconnect_i3() throws NoConnection; wamas.Test.I3 get_connection_i3(); } --- NEW FILE: .cvsignore --- *.class --- NEW FILE: CCM_C3_Context.java --- /* * This file was automatically generated by CCM Tools version 0.9.0 * <http://ccmtools.sourceforge.net> * DO NOT EDIT! */ package wamas; import Components.NoConnection; public interface CCM_C3_Context extends Components.SessionContext { /** Receptacle access methods */ wamas.Test.I3 get_connection_i3() throws NoConnection; } --- NEW FILE: CCM_C3_ContextImpl.java --- /* * This file was automatically generated by CCM Tools version 0.9.0 * <http://ccmtools.sourceforge.net> * DO NOT EDIT! */ package wamas; import Components.HomeExecutorBase; import Components.IllegalState; import Components.NoConnection; import java.util.logging.Logger; import ccmtools.local.ServiceLocator; public class CCM_C3_ContextImpl implements wamas.CCM_C3_Context { private Logger logger = ServiceLocator.instance().getLogger(); private C3 component; public CCM_C3_ContextImpl(C3 component) { logger.fine("component = " + component); this.component = component; } /** Receptacle access methods */ public wamas.Test.I3 get_connection_i3() throws NoConnection { logger.fine(""); return component.get_connection_i3(); } /** CCMContext methods */ public HomeExecutorBase get_CCM_home() { logger.fine(""); throw new RuntimeException("Not implemented!"); } /** SessionContext methods */ public Object get_CCM_object() throws IllegalState { logger.fine(""); throw new RuntimeException("Not implemented!"); } } --- NEW FILE: H3Explicit.java --- /* * This file was automatically generated by CCM Tools version 0.9.0 * <http://ccmtools.sourceforge.net> * DO NOT EDIT! */ package wamas; import Components.CCMHome; public interface H3Explicit extends CCMHome { } --- NEW FILE: CCM_C3.java --- /* * This file was automatically generated by CCM Tools version 0.9.0 * <http://ccmtools.sourceforge.net> * DO NOT EDIT! */ package wamas; import Components.CCMException; import Components.SessionComponent; public interface CCM_C3 extends SessionComponent { /** Component attribute accessor methods */ int b() throws CCMException; void b(int value) throws CCMException; /** Facet implementation factory methods */ wamas.Test.CCM_I1 get_i1(); } --- NEW FILE: CCM_H3Implicit.java --- /* * This file was automatically generated by CCM Tools version 0.9.0 * <http://ccmtools.sourceforge.net> * DO NOT EDIT! */ package wamas; public interface CCM_H3Implicit { Components.EnterpriseComponent create() throws Components.CCMException; } --- NEW FILE: H3.java --- /* * This file was automatically generated by CCM Tools version 0.9.0 * <http://ccmtools.sourceforge.net> * DO NOT EDIT! */ package wamas; public interface H3 extends H3Explicit, H3Implicit { } --- NEW FILE: H3Factory.java --- /* * This file was automatically generated by CCM Tools version 0.9.0 * <http://ccmtools.sourceforge.net> * DO NOT EDIT! */ package wamas; import Components.HomeExecutorBase; import Components.CCMException; public class H3Factory { public static HomeExecutorBase create() throws CCMException { return new H3Impl(); } } --- NEW FILE: CCM_H3.java --- /* * This file was automatically generated by CCM Tools version 0.9.0 * <http://ccmtools.sourceforge.net> * DO NOT EDIT! */ package wamas; public interface CCM_H3 extends CCM_H3Explicit, CCM_H3Implicit { } --- NEW FILE: H3Deployment.java --- /* * This file was automatically generated by CCM Tools version 0.9.0 * <http://ccmtools.sourceforge.net> * DO NOT EDIT! */ package wamas; import java.util.logging.Logger; import Components.CCMHome; import Components.CCMException; import Components.AssemblyFactory; import Components.HomeFinder; import ccmtools.local.ServiceLocator; public class H3Deployment { /** Default logger instance */ private static Logger logger = ServiceLocator.instance().getLogger(); public static CCMHome create() throws CCMException { logger.fine(""); return new H3Adapter((CCM_H3)H3Factory.create()); } public static CCMHome create(AssemblyFactory factory) throws CCMException { logger.fine("assemblyFactory = " + factory); return new H3Adapter((CCM_H3)H3Factory.create(), factory); } public static void deploy(String name) throws CCMException { logger.fine("name = " + name); HomeFinder.instance().register_home(create(), name); } public static void deploy(String name, AssemblyFactory factory) throws CCMException { logger.fine("name = " + name + ", assemblyFactory = " + factory); HomeFinder.instance().register_home(create(factory), name); } public static void undeploy(String name) { logger.fine("name = " + name); HomeFinder.instance().unregister_home(name); } } --- NEW FILE: C3Adapter.java --- /* * This file was automatically generated by CCM Tools version 0.9.0 * <http://ccmtools.sourceforge.net> * DO NOT EDIT! */ package wamas; import java.util.logging.Logger; import Components.AlreadyConnected; import Components.Assembly; import Components.CCMException; import Components.CCMHome; import Components.Cookie; import Components.CookieImpl; import Components.CookieRequired; import Components.ExceededConnectionLimit; import Components.InvalidConfiguration; import Components.InvalidConnection; import Components.InvalidName; import Components.NoConnection; import Components.RemoveFailure; import ccmtools.local.ServiceLocator; public class C3Adapter implements C3 { private Logger logger = ServiceLocator.instance().getLogger(); private CCM_C3 localInterface; private CCM_C3_Context ctx; private Assembly assembly; /** Facet adapter references */ private wamas.Test.I1 i1FacetAdapter; /** Receptacle references */ private wamas.Test.I3 i3Receptacle = null; protected C3Adapter() { this(null, null); } public C3Adapter(CCM_C3 localInterface) { this(localInterface, null); } public C3Adapter(CCM_C3 localInterface, Assembly assembly) { logger.fine("localInterface = " + localInterface + ", " + assembly); this.localInterface = localInterface; this.assembly = assembly; } /* * Supported interface methods */ /** Supported interface attributes */ /** Supported interface methods */ /* * Equivalent interface methods */ /** Attribute equivalent methods */ public int b() throws CCMException { int result = localInterface.b(); logger.fine("result = " + result); return result; } public void b(int value) throws CCMException { logger.fine("value = " + value); localInterface.b(value); } /** Facet equivalent methods */ public wamas.Test.I1 provide_i1() { logger.fine(""); if(i1FacetAdapter == null) { i1FacetAdapter = new wamas.Test.I1Adapter(localInterface.get_i1()); } return i1FacetAdapter; } /** Receptacle equivalent methods */ public void connect_i3(wamas.Test.I3 localObj) throws AlreadyConnected, InvalidConnection { logger.fine("obj = " + localObj); if(i3Receptacle != null) { throw new AlreadyConnected(); } else { i3Receptacle = localObj; } } public wamas.Test.I3 disconnect_i3() throws NoConnection { logger.fine(""); if(i3Receptacle == null) { throw new NoConnection(); } else { wamas.Test.I3 f = i3Receptacle; i3Receptacle = null; return f; } } public wamas.Test.I3 get_connection_i3() { logger.fine(""); return i3Receptacle; } /** CCMObject interface methods */ public void configuration_complete() throws InvalidConfiguration { logger.fine(""); ctx = new CCM_C3_ContextImpl(this); try { if(assembly != null) { assembly.configuration_complete(); } localInterface.set_session_context(ctx); localInterface.ccm_activate(); } catch(CCMException e) { throw new InvalidConfiguration(); } } public void remove() throws RemoveFailure { logger.fine(""); try { localInterface.ccm_remove(); if(assembly != null) { assembly.tear_down(); assembly = null; } } catch(CCMException e) { throw new RemoveFailure(); } } public CCMHome get_ccm_home() { throw new RuntimeException("Not implemented!"); } /** Navigation interface methods */ public Object provide_facet(String name) throws InvalidName { logger.fine("name = " + name); if(name == null) { throw new InvalidName(); } else if(name.equals("i1")) { return provide_i1(); } throw new InvalidName(); } /** Receptacle methods */ public Cookie connect(String name, Object obj) throws InvalidName, InvalidConnection, AlreadyConnected, ExceededConnectionLimit { logger.fine("name = " + name + ", obj = " + obj); if(name == null) { throw new InvalidName(); } if(obj == null) { throw new InvalidConnection(); } else if(name.equals("i3")) { connect_i3((wamas.Test.I3) obj); return new CookieImpl(); } else { throw new InvalidName(); } } public void disconnect(String name, Cookie ck) throws InvalidName, InvalidConnection, CookieRequired, NoConnection { logger.fine("name = " + name + ", ck = " + ck ); if(name == null) { throw new InvalidName(); } if(ck == null) { throw new CookieRequired(); } else if(name.equals("i3")) { disconnect_i3(); } else { throw new InvalidName(); } } } |