Class DataChannelReceiver
- Object
-
- DataChannelReceiver
-
public final class DataChannelReceiver extends Object
Describes the data channel as a receiver to process the incoming data messages
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addOnClosedListener(PropertyChangedListener listener)
Adds the specified listener to receive OnClosed events.void
addOnMessageReceivedListener(PropertyChangedListener listener)
Adds the specified listener to receive OnMessageReceived events.protected void
finalize()
Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.Integer
getChannelId()
Get Data channel idCommunicationIdentifier
getSenderIdentifier()
Get participant identifier of the senderDataChannelMessage
receiveMessage()
Fetch data message from the data channelvoid
removeOnClosedListener(PropertyChangedListener listener)
Removes the specified listener to receive OnClosed events.void
removeOnMessageReceivedListener(PropertyChangedListener listener)
Removes the specified listener to receive OnMessageReceived events.
-
-
-
Method Detail
-
finalize
protected void finalize()
Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.- Overrides:
finalize
in classObject
-
addOnMessageReceivedListener
public void addOnMessageReceivedListener(PropertyChangedListener listener)
Adds the specified listener to receive OnMessageReceived events. Occurs when a data channel message is ready
-
removeOnMessageReceivedListener
public void removeOnMessageReceivedListener(PropertyChangedListener listener)
Removes the specified listener to receive OnMessageReceived events. Occurs when a data channel message is ready
-
addOnClosedListener
public void addOnClosedListener(PropertyChangedListener listener)
Adds the specified listener to receive OnClosed events. Occurs when a data channel is notified to close
-
removeOnClosedListener
public void removeOnClosedListener(PropertyChangedListener listener)
Removes the specified listener to receive OnClosed events. Occurs when a data channel is notified to close
-
receiveMessage
public DataChannelMessage receiveMessage()
Fetch data message from the data channel
-
getChannelId
public Integer getChannelId()
Get Data channel id
-
getSenderIdentifier
public CommunicationIdentifier getSenderIdentifier()
Get participant identifier of the sender
-
-