Package com.avaya.clientservices.collaboration.slider

## Interface Slider

-     public interface Slider

  The Slider object provides access to slider-related actions.

  This object is accessible via the `Collaboration` object.

  Feature overview:

  - The server periodically generates a 'screenshot' of currently presented content (screen sharing or whiteboard) and notifies clients that the data is available to download. The client is notified of these new "slides" via the `SliderListener.onSlidesAdded(List)` listener method.
  - For each slide, the client can download the full image and/or the smaller thumbnail.
  - Certain collaboration/server events (i.e. change of presenter) might make the slides unavailable which is reported via the `SliderListener.onSlidesRemoved(List)` listener method.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `addListener​(SliderListener listener)` | Add a new `SliderListener` object to the slider.
    `java.util.List<SliderSlide>` | `getSlides()` | Returns currently available slides.
    `void` | `removeListener​(SliderListener listener)` | Removes a `SliderListener` object from the slider.

- - ### Method Detail

    - #### addListener

          void addListener​(SliderListener listener)

      Add a new `SliderListener` object to the slider.
      Parameters:
        `listener` - object to be added.

    - #### removeListener

          void removeListener​(SliderListener listener)

      Removes a `SliderListener` object from the slider.
      Parameters:
        `listener` - object to be removed.

    - #### getSlides

          java.util.List<SliderSlide> getSlides()

      Returns currently available slides.

      This method is useful if client does not want to handle `SliderListener.onSlidesAdded(List)` and `SliderListener.onSlidesRemoved(List)` listener methods when the slider feature is not displayed to the user. In such case this method may be called to obtain the up-to-date collection of slides where the slider UI is about to be displayed. To receive further slide updates, the client should register the listener on both events afterwards.

      The client should obtain current collection and register listeners in a single method invoked on the same dispatcher as passed to the `Client` object. This guarantees that no slides are duplicated or missed due to race conditions.

      Returns:
        Currently available slides.