pub trait RouteController: Send + Sync {
// Required methods
fn start_route<'life0, 'life1, 'async_trait>(
&'life0 mut self,
route_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), CamelError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn stop_route<'life0, 'life1, 'async_trait>(
&'life0 mut self,
route_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), CamelError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn restart_route<'life0, 'life1, 'async_trait>(
&'life0 mut self,
route_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), CamelError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn suspend_route<'life0, 'life1, 'async_trait>(
&'life0 mut self,
route_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), CamelError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn resume_route<'life0, 'life1, 'async_trait>(
&'life0 mut self,
route_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), CamelError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn route_status(&self, route_id: &str) -> Option<RouteStatus>;
fn start_all_routes<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), CamelError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn stop_all_routes<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), CamelError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
}Expand description
Trait for managing route lifecycle operations.
Implementations of this trait provide the ability to start, stop, suspend, resume, and query the status of routes within a Camel context.
Required Methods§
Sourcefn start_route<'life0, 'life1, 'async_trait>(
&'life0 mut self,
route_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), CamelError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn start_route<'life0, 'life1, 'async_trait>(
&'life0 mut self,
route_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), CamelError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Sourcefn stop_route<'life0, 'life1, 'async_trait>(
&'life0 mut self,
route_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), CamelError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn stop_route<'life0, 'life1, 'async_trait>(
&'life0 mut self,
route_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), CamelError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Sourcefn restart_route<'life0, 'life1, 'async_trait>(
&'life0 mut self,
route_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), CamelError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn restart_route<'life0, 'life1, 'async_trait>(
&'life0 mut self,
route_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), CamelError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Sourcefn suspend_route<'life0, 'life1, 'async_trait>(
&'life0 mut self,
route_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), CamelError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn suspend_route<'life0, 'life1, 'async_trait>(
&'life0 mut self,
route_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), CamelError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Sourcefn resume_route<'life0, 'life1, 'async_trait>(
&'life0 mut self,
route_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), CamelError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn resume_route<'life0, 'life1, 'async_trait>(
&'life0 mut self,
route_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), CamelError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Sourcefn route_status(&self, route_id: &str) -> Option<RouteStatus>
fn route_status(&self, route_id: &str) -> Option<RouteStatus>
Get the current status of a route by its ID.
Returns None if the route does not exist.