public interface

MessagesListener

sg.com.temasys.skylink.sdk.listener.MessagesListener
Known Indirect Subclasses

Class Overview

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

Summary

Public Methods
abstract void onReceiveP2PMessage(Object message, boolean isPublic, Long timeStamp, String remotePeerId)
This is triggered when a broadcast or private message is received directly from the peer, i.e.
abstract void onReceiveServerMessage(Object message, boolean isPublic, Long timeStamp, String remotePeerId)
This is triggered when a broadcast or private message is received from a remote peer via a server.

Public Methods

public abstract void onReceiveP2PMessage (Object message, boolean isPublic, Long timeStamp, String remotePeerId)

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

Parameters
message User defined message. May be a 'java.lang.String', 'org.json.JSONObject' or 'org.json.JSONArray'.
isPublic Flag to specify whether the message was sent to us only (as opposed to broadcast to all peers in the room).
timeStamp The timestamp of the message The number of milliseconds since the epoch of 1970-01-01T00:00:00Z (midnight, January 1, 1970 UTC).
remotePeerId The id of the remote peer

public abstract void onReceiveServerMessage (Object message, boolean isPublic, Long timeStamp, String remotePeerId)

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

Parameters
message User defined message. May be a 'java.lang.String', 'org.json.JSONObject' or 'org.json.JSONArray'.
isPublic Flag to specify whether the message was sent to us only (as opposed to broadcast to all peers in the room).
timeStamp The timestamp of the message The number of milliseconds since the epoch of 1970-01-01T00:00:00Z (midnight, January 1, 1970 UTC).
remotePeerId The id of the remote peer