public interface

MessagesListener

sg.com.temasys.skylink.sdk.listener.MessagesListener

Class Overview

Listener comprises of callbacks upon receiving various messages from remote peers.

Summary

Public Methods
abstract void onP2PMessageReceive(String remotePeerId, Object message, boolean isPrivate)
This is triggered when a broadcast or private peer message is received directly from the peer, i.e.
abstract void onServerMessageReceive(String remotePeerId, Object message, boolean isPrivate)
This is triggered when a custom broadcast or private message is received from a remote peer via a server.

Public Methods

public abstract void onP2PMessageReceive (String remotePeerId, Object message, boolean isPrivate)

This is triggered when a broadcast or private peer message is received directly from the peer, i.e. in a peer to peer manner.

Parameters
remotePeerId The id of the remote peer
message User defined message. May be a 'java.lang.String', 'org.json.JSONObject' or 'org.json.JSONArray'.
isPrivate Flag to specify whether the message was sent to us only (as opposed to broadcast to all peers in the room).

public abstract void onServerMessageReceive (String remotePeerId, Object message, boolean isPrivate)

This is triggered when a custom broadcast or private message is received from a remote peer via a server.

Parameters
remotePeerId The id of the remote peer
message User defined message. May be a 'java.lang.String', 'org.json.JSONObject' or 'org.json.JSONArray'.
isPrivate Flag to specify whether the message was sent to us only (as opposed to broadcast to all peers in the room).