Skip to content

BridgeHandler

final class BridgeHandler
Package: dev.joid.lib.bridge · Module: core · Source: BridgeHandler.java

The static registries through which the core of JOID reaches its bridges, one registry per kind of bridge.

Each constant is a BridgeRegistry of one kind of bridge. Before any backend, JOID registers a SystemClockBridge in CLOCK, a DirectThreadBridge in THREAD and an identity bridge in SIGNAL_REPLAY; Backend.register fills the others. Your code reaches a registry when it needs a bridge directly, to read one or to add one, as Add a UI bridge of your own does.

TypeNameValueSummary
UIBridgeRegistryUInew UIBridgeRegistry()The UI bridges, which hold the open UIs, receive the input and draw every frame.
BridgeRegistry<IAudioBridge>AUDIOnew BridgeRegistry<>("AUDIO")The audio bridge that plays the sound of videos.
BridgeRegistry<IClockBridge>CLOCKnew BridgeRegistry<>("CLOCK")The clock that animations, tweens, media and drags read.
BridgeRegistry<IWindowBridge>WINDOWnew BridgeRegistry<>("WINDOW")The window bridge: size of the drawable surface, mouse position, held keys, clipboard and cursor.
BridgeRegistry<IRenderBridge>RENDERnew BridgeRegistry<>("RENDER")The render bridge, which draws every pixel and creates the textures, framebuffers and shaders.
BridgeRegistry<IThreadBridge>THREADnew BridgeRegistry<>("THREAD")The thread bridge, which names the render thread and runs the tasks of other threads on it.
BridgeRegistry<ISignalReplayBridge>SIGNAL_REPLAYnew BridgeRegistry<>("SIGNAL_REPLAY")The bridge that maps the names compiled in a reactive expression to the names that exist at run time.

UIBridgeRegistry UI

The UI bridges, which hold the open UIs, receive the input and draw every frame. Unlike the other registries, JOID uses all of its bridges at once, by priority.

BridgeRegistry<IAudioBridge> AUDIO

The audio bridge that plays the sound of videos. It stays empty when the backend is built with audio(false).

BridgeRegistry<IClockBridge> CLOCK

The clock that animations, tweens, media and drags read. It holds a SystemClockBridge until another bridge is registered above it, with a higher priority or later at the same one, such as a ManualClockBridge in a test.

BridgeRegistry<IWindowBridge> WINDOW

The window bridge: size of the drawable surface, mouse position, held keys, clipboard and cursor.

BridgeRegistry<IRenderBridge> RENDER

The render bridge, which draws every pixel and creates the textures, framebuffers and shaders.

BridgeRegistry<IThreadBridge> THREAD

The thread bridge, which names the render thread and runs the tasks of other threads on it. It holds a DirectThreadBridge until the backend registers its own.

BridgeRegistry<ISignalReplayBridge> SIGNAL_REPLAY

The bridge that maps the names compiled in a reactive expression to the names that exist at run time. It holds an identity bridge until a host that renames classes registers its own.


fluent returns the instance, typed for chaining · factory creates an instance · signal also accepts a value that follows signals, as a signal, an expression or a lambda (When does JOID compute this value again?) · hook called by JOID, override it · abstract you implement it · default interface method with a body · static called on the class · protected visible to subclasses

Report a problem with this page