pub struct HttpOutboundAdapterActivation { /* private fields */ }Expand description
Pairs an HttpOutboundAdapter with the channel routing metadata
from the [HttpOutboundAdapterSpec] it was built from.
Mirrors FilterActivation for the http-outbound side. When the
spec had a from: field, the runtime subscribes a closure on that
inbound channel that:
- Calls
adapter.dispatch(&exchange). - If the spec also had
to:, transforms the exchange (response body →in_msg.payload; status code + acknowledged → header metadata) and forwards it to the outbound channel. - If
to:isNone, the dispatch is fire-and-forget — result logged atdebug!, message dropped.
When from: is None the activation is static-only — the
adapter lives on the runtime for application code that calls
.dispatch() directly (the legacy http-outbound pattern). The
runtime does not auto-wire it.
Implementations§
Source§impl HttpOutboundAdapterActivation
impl HttpOutboundAdapterActivation
Sourcepub fn new(
adapter: HttpOutboundAdapter,
from: Option<String>,
to: Option<String>,
id: impl Into<String>,
) -> Self
pub fn new( adapter: HttpOutboundAdapter, from: Option<String>, to: Option<String>, id: impl Into<String>, ) -> Self
Build a new activation from a built HttpOutboundAdapter and its
routing metadata.
Sourcepub fn adapter(&self) -> &Arc<HttpOutboundAdapter> ⓘ
pub fn adapter(&self) -> &Arc<HttpOutboundAdapter> ⓘ
The wrapped HTTP outbound adapter (shared via Arc so the
runtime can hand a clone to its subscription closure).
Sourcepub fn from(&self) -> Option<&str>
pub fn from(&self) -> Option<&str>
Inbound channel ID the runtime subscribes the adapter to.
None means the activation is static-only — accessible via
AlloraRuntime::http_outbound_adapters() but not auto-wired.