Class EventsHandler

  • All Implemented Interfaces:
    io.undertow.server.HttpHandler, xyz.gianlu.librespot.player.Player.EventsListener

    public class EventsHandler
    extends io.undertow.websockets.WebSocketProtocolHandshakeHandler
    implements xyz.gianlu.librespot.player.Player.EventsListener
    • Constructor Summary

      Constructors 
      Constructor Description
      EventsHandler​(@NotNull xyz.gianlu.librespot.core.Session session)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void onContextChanged​(@NotNull java.lang.String newUri)  
      void onPlaybackPaused()  
      void onPlaybackResumed()  
      void onTrackChanged​(@NotNull xyz.gianlu.librespot.mercury.model.PlayableId id, @Nullable com.spotify.metadata.proto.Metadata.Track track, @Nullable com.spotify.metadata.proto.Metadata.Episode episode)  
      • Methods inherited from class io.undertow.websockets.WebSocketProtocolHandshakeHandler

        addExtension, getPeerConnections, handleRequest
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • EventsHandler

        public EventsHandler​(@NotNull
                             @NotNull xyz.gianlu.librespot.core.Session session)
    • Method Detail

      • onContextChanged

        public void onContextChanged​(@NotNull
                                     @NotNull java.lang.String newUri)
        Specified by:
        onContextChanged in interface xyz.gianlu.librespot.player.Player.EventsListener
      • onTrackChanged

        public void onTrackChanged​(@NotNull
                                   @NotNull xyz.gianlu.librespot.mercury.model.PlayableId id,
                                   @Nullable com.spotify.metadata.proto.Metadata.Track track,
                                   @Nullable com.spotify.metadata.proto.Metadata.Episode episode)
        Specified by:
        onTrackChanged in interface xyz.gianlu.librespot.player.Player.EventsListener
      • onPlaybackPaused

        public void onPlaybackPaused()
        Specified by:
        onPlaybackPaused in interface xyz.gianlu.librespot.player.Player.EventsListener
      • onPlaybackResumed

        public void onPlaybackResumed()
        Specified by:
        onPlaybackResumed in interface xyz.gianlu.librespot.player.Player.EventsListener