Suggested answer

The Continuation class enables long-running callouts from Visualforce (and LWC via Apex) without holding a server thread. Instead of a synchronous callout (max 120s, blocks thread), a Continuation action:

1. Creates a Continuation object with a timeout (max 120s) and adds callout requests to it.
2. Returns the Continuation from the action method — Salesforce suspends the transaction and releases the server thread.
3. When the external response arrives, Salesforce resumes the transaction and calls the callback method with the response.
4. The callback method processes the response and updates the page. Benefits: does not consume the synchronous callout timeout limit against a server thread. Supports up to 3 parallel callout requests per Continuation. Used for integrations with slow external APIs that would otherwise exceed the callout timeout.

Practice content for interview preparation; not an official vendor answer. Verify details against current product documentation.

Community comments (0)

No comments yet.

Sign in or create a free account to add a comment. Comments are moderated before they appear.

Plain text only, 3–2000 characters. A moderator reviews every comment before it is published.