public interface

RemotePeerListener

sg.com.temasys.skylink.sdk.listener.RemotePeerListener

Class Overview

Listener comprises of callbacks related to the remote peers' activities.

Summary

Public Methods
abstract void onOpenDataConnection(String remotePeerId)
This is triggered when the underlying peer to peer data connection is established between two peers and is ready to send and receive peer messages and files between them.
abstract void onRemotePeerJoin(String remotePeerId, Object userData)
This is triggered when a remote peer joins the room.
abstract void onRemotePeerLeave(String remotePeerId, String message)
This is triggered when a remote peer leaves the room.
abstract void onRemotePeerUserDataReceive(String remotePeerId, Object userData)
This is triggered when an update is received in the user defined data of a remote peer.

Public Methods

public abstract void onOpenDataConnection (String remotePeerId)

This is triggered when the underlying peer to peer data connection is established between two peers and is ready to send and receive peer messages and files between them.

Parameters
remotePeerId The id of the remote peer

public abstract void onRemotePeerJoin (String remotePeerId, Object userData)

This is triggered when a remote peer joins the room.

Parameters
remotePeerId The id of the peer
userData User defined data relating to the remote peer. May be a 'java.lang.String', 'org.json.JSONObject' or 'org.json.JSONArray'.

public abstract void onRemotePeerLeave (String remotePeerId, String message)

This is triggered when a remote peer leaves the room.

Parameters
remotePeerId The id of the remote peer
message Message specifying the possible reason for leaving the room.

public abstract void onRemotePeerUserDataReceive (String remotePeerId, Object userData)

This is triggered when an update is received in the user defined data of a remote peer.

Parameters
remotePeerId The id of the peer
userData User defined data relating to the remote peer. May be a 'java.lang.String', 'org.json.JSONObject' or 'org.json.JSONArray'.