Skip to main content
Public Java SDK types live in inc.reactor.sdk. These are the types used in the examples; the package Javadoc provides the complete reference.

ConnectionStatus

Read reactor.status() or register reactor.onStatus(handler).

JsonValue

JsonValue represents JSON objects, arrays, strings, numbers, booleans, and null. Use it for command arguments, schema results, and messages:
Use JsonValue.of(...) for strings, numbers, and booleans, JsonValue.ofNull() for JSON null, and JsonValue.array(List<JsonValue>) for arrays. Object accessors such as getString, getNumber, getBoolean, and get return optionals. An optional Jackson adapter is available separately; the base SDK does not require Jackson.

CommandReply

sendCommand resolves to Optional<CommandReply>. An empty optional is a successful acknowledgment without a reply message. A present reply exposes:

FileRef

uploadFile and uploadBytes return a FileRef with uploadId(), name(), mimeType(), and size() in bytes. Pass it in the named upload map when sending a command. toJsonValue() supports file references nested in a command’s JSON arguments. See Upload files.

Clip and DownloadedClip

A Clip identifies media the platform is assembling. Its playlistUrl() points to the HLS playlist; sessionId() identifies the session. The record also exposes kind(), startMarker(), endMarker(), nowMarker(), and predictedReadyAtMs(). A clip request completing does not mean its media is ready. Use downloadClip to wait and save it. The resulting DownloadedClip contains path(), bytes(), and segments(). A ClipProgress callback receives (done, total) segment counts on the download’s thread.

Subscription

Each event or frame registration returns a Subscription, which implements AutoCloseable. Call close() to remove that handler; repeated calls are safe. Try-with-resources can limit a subscription to a block. Keep the subscription somewhere accessible when it must be removed later.

Errors

ReactorException is the unchecked base class for SDK failures, including errors delivered by onError. Known codes have subclasses such as UnauthorizedException, RateLimitedException, DisconnectedException, and RequestTimeoutException. Unknown codes remain available through code() on the base exception. An asynchronous SDK failure completes its future exceptionally. When using join(), inspect the cause of CompletionException. Synchronous validation can throw ReactorException directly:
Check the error before retrying. For example, an expired token needs replacement, and a terminal session needs a new session. See the ErrorCode Javadoc for the published codes and recovery classifications.