In this example:
echo
component instance provides the fuchsia.Echo
protocol as one of its declared capabilities.echo_tool
component instance requires the use of the fuchsia.Echo
protocol capability.Each intermediate component cooperates to explicitly route fuchsia.Echo
from echo
to echo_tool
:
echo
exposes fuchsia.Echo
from self
so the protocol is visible to its parent, services
.services
exposes fuchsia.Echo
from its child echo
to its parent, shell
.shell
offers fuchsia.Echo
from its child services
to another child, tools
.tools
offers fuchsia.Echo
from parent
to its child, echo_tool
.Component Framework grants the request from echo_tool
to use fuchsia.Echo
because a valid route is found to a component providing that protocol capability.
For more information on how components connect to capabilities at runtime, see Life of a protocol open.