pub struct DirectStimulus { /* private fields */ }Expand description
The route stimulus for a booted scenario (ADR-0069 section 5): a
scenario send addressed to a CONTEXT component endpoint
(direct:) must reach the booted system under test, not a
partner. This adapter delivers the message through the context’s
own producer path — a fresh direct: endpoint and producer per
send, one oneshot per exchange, retrying the consumer-startup
race — the same mechanism camel-test and camel run use to
stimulate routes.
Key the router map by the exact endpoint URI the scenario’s send
addresses (direct:start). receive is not a context role: it
fails at the transport, apparatus class.
Implementations§
Source§impl DirectStimulus
impl DirectStimulus
Sourcepub fn new(ctx: Arc<AsyncMutex<CamelContext>>) -> Self
pub fn new(ctx: Arc<AsyncMutex<CamelContext>>) -> Self
Wraps the booted context the scenario sends into.
Trait Implementations§
Source§impl PartnerAdapter for DirectStimulus
impl PartnerAdapter for DirectStimulus
Source§fn send<'a>(
&'a self,
lane_key: &'a str,
_target_uri: &'a str,
msg: OutgoingMessage,
) -> BoxFuture<'a, Result<(), TransportError>>
fn send<'a>( &'a self, lane_key: &'a str, _target_uri: &'a str, msg: OutgoingMessage, ) -> BoxFuture<'a, Result<(), TransportError>>
Send a message to the target URI, parking any roundtrip under
the lane key. Adapters without a client role keep the default
(a transport failure naming the gap); the http partner is one
such adapter — the router’s own client lane performs every
http client-role send.
Source§fn receive<'a>(
&'a self,
_lane_key: &'a str,
source_uri: &'a str,
_deadline: Duration,
) -> BoxFuture<'a, Result<IncomingMessage, ReceiveError>>
fn receive<'a>( &'a self, _lane_key: &'a str, source_uri: &'a str, _deadline: Duration, ) -> BoxFuture<'a, Result<IncomingMessage, ReceiveError>>
Receive a message from the source URI before the deadline
passes. Implementations must respect the deadline; they never
hang past it.
The host:port authority this adapter’s listener bound, when it
owns one (the http partner);
None otherwise. The router uses
it to resolve declared and dynamic endpoint references to real
wire addresses.Auto Trait Implementations§
impl !RefUnwindSafe for DirectStimulus
impl !UnwindSafe for DirectStimulus
impl Freeze for DirectStimulus
impl Send for DirectStimulus
impl Sync for DirectStimulus
impl Unpin for DirectStimulus
impl UnsafeUnpin for DirectStimulus
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request