receive

Registers a callback to receive messages from the live session. Only one callback can be registered at a time.

Return

A CompletableFuture that completes when the callback has been registered. Note: This future doesn't represent the entire lifecycle of receiving messages, just the *registration* of the callback.

Parameters

onMessage

A Consumer that will be called for each LiveServerMessage received.