Issue 7556: Generic connectivity for Receptacles, Emitters, Publishers (components-rtf) Source: Zuehlke Engineering (Mr. Frank Pilhofer, fpilhofer2008(at)gmail.com) Nature: Uncategorized Issue Severity: Summary: The CCMObject interface contains numerous operations for generic connection management (in addition to the type-specific operations defined by equivalent IDL for a component). However, there's a separate set of "connect" and "disconnect" operations for each kind of port, i.e., receptacles, emitters and publishers. This is inconvenient for generic software that treats ports generically, such as the deployment infrastructure in an implementation of the Deployment and Configuration specification. The set of operations might even get larger in the future, when Streams for CCM becomes available. I thus propose to add generic "connect_feature" and "disconnect_ feature" operations that is able to interconnect compatible ports regardless of the type of port. Proposed resolution: In section 1.11.1, "CCMObject Interface," add the following two operations to the CCMObject interface: module Components { interface CCMObject : Navigation, Receptacles, Events { Cookie connect_feature (in FeatureName name, in Object connection) raises (InvalidName, InvalidConnection, AlreadyConnected, ExceededConnectionLimit); void disconnect_feature (in FeatureName name, in Cookie ck) raises (InvalidName, InvalidConnection, CookieRequired, NoConnection); /* other operations as before */ }; }; Add the following explanation to the same section: connect_feature The connect_feature operation connects the object reference specified by the connection parameter to the component feature specified by the name parameter. The feature must be either a receptacle, emitter or publisher port. If the feature identified by the name parameter is a receptacle port, the connect_feature operation acts equivalent to calling the connect operation on the Receptacles interface. If the feature identified by the name parameter is an emitter port, the connect_feature operation acts equivalent to calling the connect_consumer operation on the Events interface. A nil "cookie" value is returned. If the feature identified by the name parameter is a publisher port, the connect_feature operation acts equivalent to calling the subscribe operation on the Events interface. If the feature identified by the name parameter is neither receptacle, emitter or publisher port, or if the component does not have any feature by that name, the InvalidName exception is raised. disconnect_feature The disconnect_feature operation dissolves the connection identified by the ck cookie to the component feature specified by the name parameter. If the feature identified by the name parameter is a receptacle port, the disconnect_feature operation acts equivalent to calling the disconnect operation on the Receptacles interface. If the feature identified by the name parameter is an emitter port, the disconnect_feature operation raises the InvalidConnection exception if a non-nil cookie is passed as the ck parameter; otherwise, it acts equivalent to calling the disconnect_consumer operation on the Events interface. If the feature identified by the name parameter is a publisher port, the disconnect_feature operation acts equivalent to calling the unsubscribe operation on the Events interface. If the feature identified by the name parameter is neither receptacle, emitter or publisher port, or if the component does not have any feature by that name, the InvalidName exception is raised. Resolution: Revised Text: Actions taken: July 1, 2004: received issue Discussion: End of Annotations:===== ubject: Generic connectivity for Receptacles, Emitters, Publishers Date: Thu, 1 Jul 2004 17:02:19 -0400 Thread-Topic: Generic connectivity for Receptacles, Emitters, Publishers Thread-Index: AcRfrrJMWGkNKjdZSOWDKHFseEA0pA== From: "Pilhofer, Frank" To: Cc: X-MIME-Autoconverted: from quoted-printable to 8bit by amethyst.omg.org id i61L9Plj010706 The CCMObject interface contains numerous operations for generic connection management (in addition to the type-specific operations defined by equivalent IDL for a component). However, there's a separate set of "connect" and "disconnect" operations for each kind of port, i.e., receptacles, emitters and publishers. This is inconvenient for generic software that treats ports generically, such as the deployment infrastructure in an implementation of the Deployment and Configuration specification. The set of operations might even get larger in the future, when Streams for CCM becomes available. I thus propose to add generic "connect_feature" and "disconnect_ feature" operations that is able to interconnect compatible ports regardless of the type of port. Proposed resolution: In section 1.11.1, "CCMObject Interface," add the following two operations to the CCMObject interface: module Components { interface CCMObject : Navigation, Receptacles, Events { Cookie connect_feature (in FeatureName name, in Object connection) raises (InvalidName, InvalidConnection, AlreadyConnected, ExceededConnectionLimit); void disconnect_feature (in FeatureName name, in Cookie ck) raises (InvalidName, InvalidConnection, CookieRequired, NoConnection); /* other operations as before */ }; }; Add the following explanation to the same section: connect_feature The connect_feature operation connects the object reference specified by the connection parameter to the component feature specified by the name parameter. The feature must be either a receptacle, emitter or publisher port. If the feature identified by the name parameter is a receptacle port, the connect_feature operation acts equivalent to calling the connect operation on the Receptacles interface. If the feature identified by the name parameter is an emitter port, the connect_feature operation acts equivalent to calling the connect_consumer operation on the Events interface. A nil "cookie" value is returned. If the feature identified by the name parameter is a publisher port, the connect_feature operation acts equivalent to calling the subscribe operation on the Events interface. If the feature identified by the name parameter is neither receptacle, emitter or publisher port, or if the component does not have any feature by that name, the InvalidName exception is raised. disconnect_feature The disconnect_feature operation dissolves the connection identified by the ck cookie to the component feature specified by the name parameter. If the feature identified by the name parameter is a receptacle port, the disconnect_feature operation acts equivalent to calling the disconnect operation on the Receptacles interface. If the feature identified by the name parameter is an emitter port, the disconnect_feature operation raises the InvalidConnection exception if a non-nil cookie is passed as the ck parameter; otherwise, it acts equivalent to calling the disconnect_consumer operation on the Events interface. If the feature identified by the name parameter is a publisher port, the disconnect_feature operation acts equivalent to calling the unsubscribe operation on the Events interface. If the feature identified by the name parameter is neither receptacle, emitter or publisher port, or if the component does not have any feature by that name, the InvalidName exception is Subject: Re: issue 7556 -- Components RTF issue Date: Tue, 6 Jul 2004 09:13:42 -0400 Thread-Topic: issue 7556 -- Components RTF issue Thread-Index: AcRgX8osdDJUSzXcRKaqMpkRpvEzMgC+d+yQ From: "Pilhofer, Frank" To: , X-MIME-Autoconverted: from quoted-printable to 8bit by amethyst.omg.org id i66DLOlj019474 Sorry, the proposed resolution that I sent last Thursday is incomplete. The "get_feature" operation was missing, which is needed for symmetry, so that provided ports can be introspected, independent of the port type, as well. Here's the updated text. The CCMObject interface contains numerous operations for generic connection management (in addition to the type-specific operations defined by equivalent IDL for a component). However, there's a separate set of "connect" and "disconnect" operations for each kind of port, i.e., receptacles, emitters and publishers. This is inconvenient for generic software that treats ports generically, such as the deployment infrastructure in an implementation of the Deployment and Configuration specification. The set of operations might even get larger in the future, when Streams for CCM becomes available. I thus propose to add generic "get_feature", "connect_feature" and "disconnect_feature" operations that are able to interconnect compatible ports regardless of the type of port. Proposed resolution: In section 1.11.1, "CCMObject Interface," add the following two operations to the CCMObject interface: module Components { interface CCMObject : Navigation, Receptacles, Events { Object get_feature (in FeatureName name) raises (InvalidName); Cookie connect_feature (in FeatureName name, in Object connection) raises (InvalidName, InvalidConnection, AlreadyConnected, ExceededConnectionLimit); void disconnect_feature (in FeatureName name, in Cookie ck) raises (InvalidName, InvalidConnection, CookieRequired, NoConnection); /* other operations as before */ }; }; Add the following explanation to the same section: get_feature The get_feature operation returns the reference to the component feature specified by the name parameter. The feature must be either a facet or consumer port. If the feature identified by the name parameter is a facet port, the get_feature operation acts equivalent to calling the provide_facet operation on the Navigation interface. If the feature identified by the name parameter is a consumer port, the get_feature operation acts equivalent to calling the get_consumer operation on the Events interface. If the feature identified by the name parameter is neither facet or consumer port, or if the component does not have any feature by that name, the InvalidName exception is raised. connect_feature The connect_feature operation connects the object reference specified by the connection parameter to the component feature specified by the name parameter. The feature must be either a receptacle, emitter or publisher port. If the feature identified by the name parameter is a receptacle port, the connect_feature operation acts equivalent to calling the connect operation on the Receptacles interface. If the feature identified by the name parameter is an emitter port, the connect_feature operation acts equivalent to calling the connect_consumer operation on the Events interface. A nil "cookie" value is returned. If the feature identified by the name parameter is a publisher port, the connect_feature operation acts equivalent to calling the subscribe operation on the Events interface. If the feature identified by the name parameter is neither receptacle, emitter or publisher port, or if the component does not have any feature by that name, the InvalidName exception is raised. disconnect_feature The disconnect_feature operation dissolves the connection identified by the ck cookie to the component feature specified by the name parameter. If the feature identified by the name parameter is a receptacle port, the disconnect_feature operation acts equivalent to calling the disconnect operation on the Receptacles interface. If the feature identified by the name parameter is an emitter port, the disconnect_feature operation raises the InvalidConnection exception if a non-nil cookie is passed as the ck parameter; otherwise, it acts equivalent to calling the disconnect_consumer operation on the Events interface. If the feature identified by the name parameter is a publisher port, the disconnect_feature operation acts equivalent to calling the unsubscribe operation on the Events interface. If the feature identified by the name parameter is neither receptacle, emitter or publisher port, or if the component does not have any feature by that name, the InvalidName exception is raised.