Interface IncomingConnectorContext
-
Method Summary
Modifier and TypeMethodDescriptiondefault booleanReport that transport resources are ready and wait until the owning graph is running.channel()Channel name.default intMaximum messages the runtime can admit in one retained connector delivery.Reserve pending capacity for the largest delivery this channel accepts before acquiring one connector delivery.Attempt to reserve pending capacity before acquiring one connector delivery without blocking.
-
Method Details
-
awaitRunning
default boolean awaitRunning()Report that transport resources are ready and wait until the owning graph is running.An incoming connector must call this exactly once before acquiring its first delivery. Runtime-managed contexts block until every incoming connector is ready. They return
falsewhen startup is cancelled. The default permits independently run connectors to proceed immediately.- Returns:
truewhen delivery acquisition may start,falsewhen startup was cancelled
-
channel
-
maxDeliveryMessages
default int maxDeliveryMessages()Maximum messages the runtime can admit in one retained connector delivery.For runtime-provided contexts, this stable limit includes the source channel's pending and in-flight message limits and the in-flight limit of every transitively reachable routed channel. It does not guarantee immediate admission when another delivery is active. Incoming connectors should use this limit to bound polling or reading before submitting a delivery.
- Returns:
- maximum messages per delivery
-
reserveDelivery
ConnectorDeliveryReservation reserveDelivery()Reserve pending capacity for the largest delivery this channel accepts before acquiring one connector delivery.Runtime-provided contexts block with bounded pending accounting.
- Returns:
- pending delivery reservation
- Throws:
MessagingRejectedException- if capacity cannot be reserved
-
tryReserveDelivery
Optional<ConnectorDeliveryReservation> tryReserveDelivery()Attempt to reserve pending capacity before acquiring one connector delivery without blocking.A durable connector can pause new acquisition and continue transport maintenance while this method returns empty. Repeated attempts share the channel's admission-timeout budget until a reservation succeeds.
- Returns:
- reservation, or empty when pending capacity is currently unavailable
- Throws:
MessagingRejectedException- if the request can never fit, its admission timeout expires, or the runtime is shutting down
-