use camel_api::{BodyType, BoxProcessor, CamelError};
use crate::ProducerContext;
use crate::consumer::Consumer;
pub trait Endpoint: Send + Sync {
fn uri(&self) -> &str;
fn create_consumer(&self) -> Result<Box<dyn Consumer>, CamelError>;
fn create_producer(&self, ctx: &ProducerContext) -> Result<BoxProcessor, CamelError>;
fn body_contract(&self) -> Option<BodyType> {
None
}
}