Class PushSource
java.lang.Object
lol.trq.orpheus.source.PushSource
-
Method Summary
Modifier and TypeMethodDescription<T> Tcapability(Class<T> type) The ability of the given type, or null when this source does not have it.voidclear()Removes the session, as when the player closes.static PushSourcestatic PushSourceCreates a source with a separate display name.handler(Control control, Consumer<ControlRequest> handler) Registers what to do for a command.id()A short stable name, unique among the sources of oneOrpheus.<T> PushSourcevoidpublish(PlaybackUpdate update) Publishes the current state.responder(Control control, Function<ControlRequest, CompletableFuture<ControlResult>> responder) Likehandler(Control, Consumer), for a player that can refuse a command or answers later: the function returns the outcome, now or when it is known.send(ControlRequest request) Sends a command.voidstart(SourceSink newSink) Starts reporting tosink.voidstop()Stops and releases every thread, handle and process.
-
Method Details
-
create
-
create
Creates a source with a separate display name. -
id
-
publish
Publishes the current state. Publish again whenever something changes, including after a seek. -
clear
public void clear()Removes the session, as when the player closes. -
handler
Registers what to do for a command. The handler runs on a library thread and must return quickly; throwing reports the command as failed. The control is advertised at once. -
responder
public PushSource responder(Control control, Function<ControlRequest, CompletableFuture<ControlResult>> responder) Likehandler(Control, Consumer), for a player that can refuse a command or answers later: the function returns the outcome, now or when it is known. -
provide
-
capability
Description copied from interface:SourceThe ability of the given type, or null when this source does not have it.- Specified by:
capabilityin interfaceSource
-
start
Description copied from interface:SourceStarts reporting tosink. Returns quickly; failures are reported as a status, not thrown. -
stop
-
send
Description copied from interface:TransportSends a command. Never throws and never blocks; the future always completes.
-