public class RespokeDirectConnection
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
RespokeDirectConnection.Listener
A listener interface to notify the receiver of events occurring with the direct connection
|
Constructor and Description |
---|
RespokeDirectConnection(RespokeCall call)
The constructor for this class
|
Modifier and Type | Method and Description |
---|---|
void |
accept(android.content.Context context)
Accept the direct connection and start the process of obtaining media.
|
void |
createDataChannel()
Establish a new direct connection instance with the peer connection for the call.
|
RespokeCall |
getCall()
Get the call object associated with this direct connection
|
boolean |
isActive()
Indicate whether a datachannel is being setup or is in progress.
|
void |
onMessage(org.webrtc.DataChannel.Buffer buffer) |
void |
onStateChange() |
void |
peerConnectionDidOpenDataChannel(DataChannel newDataChannel)
Notify the direct connection instance that the peer connection has opened the specified data channel
|
void |
sendMessage(java.lang.String message,
Respoke.TaskCompletionListener completionListener)
Send a message to the remote client through the direct connection.
|
void |
setListener(RespokeDirectConnection.Listener listener)
Set a receiver for the Listener interface
|
public RespokeDirectConnection(RespokeCall call)
call
- The call instance with which this direct connection is associatedpublic void setListener(RespokeDirectConnection.Listener listener)
listener
- The new receiver for events from the Listener interface for this instancepublic void accept(android.content.Context context)
context
- An application context with which to access system resourcespublic boolean isActive()
public RespokeCall getCall()
public void sendMessage(java.lang.String message, Respoke.TaskCompletionListener completionListener)
message
- The message to sendcompletionListener
- A listener to receive a notification on the success of the asynchronous operationpublic void createDataChannel()
public void peerConnectionDidOpenDataChannel(DataChannel newDataChannel)
dataChannel
- The DataChannel that has openedpublic void onStateChange()
public void onMessage(org.webrtc.DataChannel.Buffer buffer)