pub trait Endpoint: Send + Sync {
// Required methods
fn uri(&self) -> &str;
fn create_consumer(&self) -> Result<Box<dyn Consumer>, CamelError>;
fn create_producer(
&self,
ctx: &ProducerContext,
) -> Result<BoxProcessor, CamelError>;
}Expand description
An Endpoint represents a source or destination in a route URI.
Required Methods§
Sourcefn create_consumer(&self) -> Result<Box<dyn Consumer>, CamelError>
fn create_consumer(&self) -> Result<Box<dyn Consumer>, CamelError>
Create a consumer that reads from this endpoint.
Sourcefn create_producer(
&self,
ctx: &ProducerContext,
) -> Result<BoxProcessor, CamelError>
fn create_producer( &self, ctx: &ProducerContext, ) -> Result<BoxProcessor, CamelError>
Create a producer that writes to this endpoint.