Interface IncomingChannel
- All Superinterfaces:
AutoCloseable, ChannelConnection
Incoming connector for one configured binding.
The messaging runtime invokes run(IncomingConnectorContext) on an owned virtual thread. The connector
establishes its transport resources, calls IncomingConnectorContext.awaitRunning(), and starts acquiring
deliveries only when that method returns true.
-
Method Summary
Modifier and TypeMethodDescriptionvoiddrain()Stop acquiring new transport deliveries while allowing already acquired deliveries to settle.voidrun(IncomingConnectorContext context) Run this connector until it is drained or closed.Methods inherited from interface ChannelConnection
close, forceCloseModifier and TypeMethodDescriptionvoidclose()Close this binding after its delivery work has drained.voidForce prompt shutdown without waiting for normal delivery settlement.
-
Method Details
-
run
Run this connector until it is drained or closed.Before acquiring the first delivery, the connector must synchronously establish the transport resources needed to run and call
IncomingConnectorContext.awaitRunning(). It must return without acquiring deliveries when that method returnsfalse. Normal return afterdrain()must include final transport settlement and checkpointing.- Parameters:
context- incoming connector context
-
drain
void drain()Stop acquiring new transport deliveries while allowing already acquired deliveries to settle. Once those delivery handoffs finish,run(IncomingConnectorContext)must finish its transport checkpoint and return.
-