com.amos.server.webrtc

## Class PeerWrapper

- java.lang.Object
- - com.amos.server.webrtc.PeerWrapper

- All Implemented Interfaces:
    IPeer

      public class PeerWrapper
      extends java.lang.Object
      implements IPeer

  # PeerWrapper Class

  This class is responsible to handle the live cycle of the WebRTC connection protocol. It begins the connection between the signaling server and the located peer.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PeerWrapper(android.app.Activity app)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `beginTransactionWithAnswer()`
    `void` | `setEmitter(Emitter emitter)`
    `void` | `setRemoteDescriptorPeer(org.webrtc.SessionDescription descriptorPeer)` This method set the new remote sessions descriptor with the information needed to the peer
    `void` | `setRemoteIceCandidate(org.webrtc.IceCandidate candidate)` This method set the new remote ice candidate with the information needed to the peer.
    `void` | `setRemoteStream(org.webrtc.MediaStream stream)`

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

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

- - ### Constructor Detail

    - #### PeerWrapper

          public PeerWrapper(android.app.Activity app)

  - ### Method Detail

    - #### setEmitter

          public void setEmitter(Emitter emitter)

    - #### setRemoteStream

          public void setRemoteStream(org.webrtc.MediaStream stream)

    - #### beginTransactionWithAnswer

          public void beginTransactionWithAnswer()

    - #### setRemoteDescriptorPeer

          public void setRemoteDescriptorPeer(org.webrtc.SessionDescription descriptorPeer)

      This method set the new remote sessions descriptor with the information needed to the peer
      Specified by:
        `setRemoteDescriptorPeer` in interface `IPeer`
      Parameters:
        `descriptorPeer` - remote session descriptor that was sent over the signaling server.

    - #### setRemoteIceCandidate

          public void setRemoteIceCandidate(org.webrtc.IceCandidate candidate)

      This method set the new remote ice candidate with the information needed to the peer. The candidate gives the position and the instructions to connect with the other peer
      Specified by:
        `setRemoteIceCandidate` in interface `IPeer`
      Parameters:
        `candidate` - the remote ice candidate that was sent over the signaling server.