Package ke.ric.renderer.api
Class RendererSession
java.lang.Object
ke.ric.renderer.api.RendererSession
- All Implemented Interfaces:
AutoCloseable
Optional plugin-owned capture/render lifecycle. Construct, request, discover clients and close
on the server thread. Cancellation of a returned future is safe from any thread. There are no
retries, gameplay cooldowns or persistence; low-level multi-pass workflows can use
client().
This helper is supplied with the development API preview and should be tested with its matching
development provider; its presence does not establish support in an older production installation.-
Constructor Summary
ConstructorsConstructorDescriptionRendererSession(org.bukkit.plugin.Plugin owner) Registers lifecycle listeners for this enabled owner on the server thread; close during owner disable. -
Method Summary
Modifier and TypeMethodDescriptioncaptureAndRender(CaptureRequest request) Captures and renders under one wall-clock deadline from the request's settings.captureAndRender(CaptureRequest request, double fovDegrees) Captures with an explicit field of view in degrees under the same lifecycle and deadline.captureAndRender(CaptureRequest request, double fovDegrees, List<SceneEntity> entities) Captures a custom field of view, appends exact entities and renders with one deadline.captureAndRender(CaptureRequest request, List<SceneEntity> entities) Captures, appends complete exact entities, then renders under the same deadline and lifecycle.client()Discovers/reacquires the current service's client; service absence is a typed failure.voidclose()Settles all owned work, closes the client and detaches listeners/timers.Explicit Bukkit dispatcher, usable from any thread.
-
Constructor Details
-
RendererSession
public RendererSession(org.bukkit.plugin.Plugin owner) Registers lifecycle listeners for this enabled owner on the server thread; close during owner disable.
-
-
Method Details
-
client
Discovers/reacquires the current service's client; service absence is a typed failure. -
captureAndRender
Captures and renders under one wall-clock deadline from the request's settings. Successful results are published on the server thread after a final lifecycle check. Synchronous provider and scheduling failures settle the returned future too; cancellation releases owned work. -
captureAndRender
Captures with an explicit field of view in degrees under the same lifecycle and deadline. -
captureAndRender
public CompletableFuture<RenderResult> captureAndRender(CaptureRequest request, List<SceneEntity> entities) Captures, appends complete exact entities, then renders under the same deadline and lifecycle. The entity list is copied before capture; empty lists also work with older providers. -
captureAndRender
public CompletableFuture<RenderResult> captureAndRender(CaptureRequest request, double fovDegrees, List<SceneEntity> entities) Captures a custom field of view, appends exact entities and renders with one deadline. -
mainThreadExecutor
Explicit Bukkit dispatcher, usable from any thread. Scheduling rejection is propagated to the caller, not swallowed. Accepted commands are not revoked by provider replacement; callers must check their destination's liveness. Bukkit provides no callback guarantee after disable. -
close
public void close()Settles all owned work, closes the client and detaches listeners/timers. Idempotent.- Specified by:
closein interfaceAutoCloseable
-