Previous | Table of Contents | Next |
(118) <component_body> ::= <component_export>*
(119) <component_export> ::= <provides_dcl> “;?| <uses_dcl> “;?| <emits_dcl> “;?| <publishes_dcl> “;?| <consumes_dcl> “;?| <attr_dcl> “;?
A component forms a naming scope, nested within the scope in which the component is declared. A component body can contain
the following kinds of declarations:
• Facet declarations (provides)
• Receptacle declarations (uses)
• Event source declarations (emits or publishes)
• Event sink declarations (consumes)
• Attribute declarations (attribute and readonly attribute)
These declarations and their meanings are described in detail in the CORBA Components specification, Component Model chapter,
“Facets and Navigation? through “Events? sections.
3.17.3.1 Facets and Navigation
A component type may provide several independent interfaces to its clients in the form of facets. Facets are intended to be
the primary vehicle through which a component exposes its functional application behavior to clients during normal execution.
A component may exhibit zero or more facets.
Syntax
A facet is declared with the following syntax:
(120) <provides_dcl> ::= “provides? <interface_type> <identifier>
(121) <interface_type> ::= <scoped_name>| “Object?
The interface type shall be either the keyword Object, or a scoped name that denotes a previously-declared interface type
which is not a component interface, i.e., is not the interface corresponding to a component definition. The identifier names
the facet within the scope of the component, allowing multiple facets of the same type to be provided by the component.
See the CORBA Components specification, Component Model chapter, “Facets and Navigation? for further details.
3.17.3.2 Receptacles
A component definition can describe the ability to accept object references upon which the component may invoke operations.
When a component accepts an object reference in this manner, the relationship between the component and the referent object
is called a connection; they are said to be connected. The conceptual point of connection is called a receptacle. A receptacle
is an abstraction that is concretely manifested on a component as a set of operations for establishing and managing connections.
A component may exhibit zero or more receptacles.
Syntax
The syntax for describing a receptacle is as follows:
(122) <uses_dcl> ::= “uses? [ “multiple? ]< interface_type> <identifier>
A receptacle declaration comprises the following elements:
• The keyword uses.
• The optional keyword multiple. The presence of this keyword indicates that the receptacle may accept multiple connections simultaneously, and results in different operations on the component’s associated interface.
•An <interface_type>, which must be either the keyword Object or a scoped name that denotes the interface type that the receptacle will accept. The scoped name must denote a previously-defined non-component interface type.
•An <identifier> that names the receptacle in the scope of the component.
See the CORBA Components specification, Component Model chapter, “Receptacles? section for further details.