Capsules are highly encapsulated and communicate through special message-based interfaces called ports. This structure means that each capsule's internal implementation is hidden from the environment, which makes capsules highly reusable.
When a capsule receives a message from another capsule, a signal event is generated and the system typically requires a response from the capsule. This response often involves performing calculations, formulating a response, and sending one or more messages. The optional state machine that is associated with the capsule represents the capsule's behavior. The state machine controls the operation of the capsule and is the only element that can access the protected parts of the capsule.
The advantage of message-based interfaces is that a capsule has no knowledge of its environment outside the interfaces, so it is more flexible and robust than regular objects.