pub trait ComponentControllerServerHandler<___T: Transport> {
// Required methods
fn stop(&mut self, sender: &ServerSender<___T, ComponentController>);
fn kill(&mut self, sender: &ServerSender<___T, ComponentController>);
// Provided method
fn on_unknown_interaction(
&mut self,
sender: &ServerSender<___T, ComponentController>,
ordinal: u64,
) { ... }
}
Expand description
A server handler for the ComponentController protocol.
See ComponentController
for more details.
Required Methods§
Sourcefn stop(&mut self, sender: &ServerSender<___T, ComponentController>)
fn stop(&mut self, sender: &ServerSender<___T, ComponentController>)
Request to stop the component instance.
After stopping the component instance, the server should close this connection with an epitaph. After the connection closes, component manager considers this component instance to be Stopped and the component’s namespace will be torn down.
Sourcefn kill(&mut self, sender: &ServerSender<___T, ComponentController>)
fn kill(&mut self, sender: &ServerSender<___T, ComponentController>)
Stop this component instance immediately.
The ComponentRunner must immediately kill the component instance, and then close this connection with an epitaph. After the connection closes, component manager considers this component instance to be Stopped and the component’s namespace will be torn down.
In some cases Kill() may be issued before Stop(), but that is not guaranteed.