Package com.castlabs.sdk.broadpeak

# Class SessionWrapper

java.lang.Object
com.castlabs.sdk.broadpeak.SessionWrapper

public class SessionWrapper extends Object
Wrapper around `SessionApi`. The Wrapper outlives the internal SessionApi. In case a renewal is required, the internal SessionApi will be replaced with a new one.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `STATE_IDLE`
  The Wrapper is IDLE.
  `static final int`
  `STATE_READY`
  The Wrapper is ready.
  `static final int`
  `STATE_STARTING`
  The Wrapper is starting or renewing a session.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `getState()`
  Get the current state of the wrapper.
  `void`
  `notifyFirstImage()`
  `void`
  `notifyLayerSwitch(int bitrate)`
  `void`
  `notifyPause()`
  `void`
  `notifyResume()`
  `void`
  `notifySeek(long from, long to)`
  `void`
  `notifyStallEnd(boolean isPlaying)`
  `void`
  `notifyStallStart()`

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### STATE_IDLE

    public static final int STATE_IDLE
    The Wrapper is IDLE. This is the state after creation
    See Also:
      - Constant Field Values

  - ### STATE_STARTING

    public static final int STATE_STARTING
    The Wrapper is starting or renewing a session.
    See Also:
      - Constant Field Values

  - ### STATE_READY

    public static final int STATE_READY
    The Wrapper is ready. This means that there's an ongoing session with a token.
    See Also:
      - Constant Field Values

- ## Method Details

  - ### getState

    public int getState()
    Get the current state of the wrapper.
    Returns:
      the state of the wrapper. One of the SessionWrapper.STATE_* constants.

  - ### notifyLayerSwitch

    public void notifyLayerSwitch(int bitrate)

  - ### notifyStallStart

    public void notifyStallStart()

  - ### notifyFirstImage

    public void notifyFirstImage()

  - ### notifyResume

    public void notifyResume()

  - ### notifyPause

    public void notifyPause()

  - ### notifySeek

    public void notifySeek(long from, long to)

  - ### notifyStallEnd

    public void notifyStallEnd(boolean isPlaying)