Forums Register Login

UML 2.0 component question

+Pie Number of slices to send: Send
Hello All,

If a UML 2.0 component has a port, does that imply that the component has sub components? If this is not true, then what is the reason for the port.

Thanks in advance.

-Saha
+Pie Number of slices to send: Send
 

Originally posted by Saha Kumar:
Hello All,

If a UML 2.0 component has a port, does that imply that the component has sub components? If this is not true, then what is the reason for the port.

Thanks in advance.

-Saha



Hey Saha,

The 'Port' feature available in UML 2.0 represents a point of interaction between an component and it�s environment. This means that the port acts as the classifier that makes possible the comunication.

Ports can be unidirectionals and bi-directionals. So, if you define an port in an component, this means that your component can expose something more that the services described in the interface, or, it should receive a piece of data or protocol by another component or subsystem.
+Pie Number of slices to send: Send
Hello Saha,

Originally posted by Saha Kumar:
If a UML 2.0 component has a port, does that imply that the component has sub components?


I would say, not only:

1. A port may be attached to a Composite Structure, then what you say is half true.

2. But a port may be attached to a unstructured Component as well. Then

a) an arrow from the port to a class means that
- - a message goes from an interface of that port to that class
- - and in my oppinion implies that this interface is a provided interface of the class, so it makes sense that others call something on the provided interface

b) an arrow from the class to the port means that
- - a message goes from that class to an interface that is part of that port
- - and in my oppinion implies that this interface is a required interface for the class, so it makes sense to call something on the required interface

Thomas
[ May 03, 2006: Message edited by: Thomas Taeger ]
+Pie Number of slices to send: Send
Hello Ricardo, Thomas, All,

Thanks for your replies. These are helpful.

My question is: for the part II component diagram (and in future design projects), when would the assembly connector be used and when would a port be used? I have looked at many examples online, and have seen that either a port is always used in the component diagrams, or the assembly connector is always used in the component diagrams.

So, I have one question:
When would the assembly connector be used and when would a component with a port be used? For example, if an EJB entity is a component, would it have a port or a assembly connector.

Thanks in advance for your valuable contribution.

-Saha
+Pie Number of slices to send: Send
 

Originally posted by Saha Kumar:
... when would the assembly connector be used and when would a port be used?



The Assembly Connector is an INTER-component connector:
- an edge from a component to a ball, then
- a ball ...
- ... in a socket, then
- an edge from the socket to the other component


A Port AND one or more connectors are INTRA-component connectors:

- from a provided interface outside the component
- to a port on the border
- to a realizing classifier WITHIN a component,

or:

- from a classifier WITHIN a component
- to a port on the border
- to a required interface outside the component

or:
a bidirectional port with
- provided AND required interfaces at the same port, and connectors ...

Thomas
[ May 04, 2006: Message edited by: Thomas Taeger ]
+Pie Number of slices to send: Send
Thanks, Thomas!

-Saha
Honk if you love justice! And honk twice for tiny ads!
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 809 times.
Similar Threads
OCL reference
Drawing component with poseidon
Free UML tool for UML 2.0
UML componet
UML 2.0 and component-based development
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 04:30:22.