Interface Source
- All Known Implementing Classes:
MacNowPlaying, MprisSource, PushSource, SystemSessions, WindowsSessions
public interface Source
Something that knows what is playing. A source owns its threads; none of its methods may block the caller.
Optional abilities are separate interfaces (Transport, QueueAccess, Devices,
LibraryAccess) handed out by capability(Class).
-
Method Summary
Modifier and TypeMethodDescriptiondefault <T> Tcapability(Class<T> type) The ability of the given type, or null when this source does not have it.default DisplayRulesdisplay()Rules that come with the data of this source.default booleanforeign()Whether the sessions of this source belong to other applications and must pass the app rules.id()A short stable name, unique among the sources of oneOrpheus.voidstart(SourceSink sink) Starts reporting tosink.voidstop()Stops and releases every thread, handle and process.
-
Method Details
-
id
String id()A short stable name, unique among the sources of oneOrpheus. -
start
Starts reporting tosink. Returns quickly; failures are reported as a status, not thrown. -
stop
void stop()Stops and releases every thread, handle and process. Safe to call twice and beforestart. -
foreign
default boolean foreign()Whether the sessions of this source belong to other applications and must pass the app rules. True for operating system sources, false for a program's own player. -
display
Rules that come with the data of this source. -
capability
The ability of the given type, or null when this source does not have it.
-