public abstract class RTSManager2
extends java.lang.Object
Constructor and Description |
---|
RTSManager2() |
Modifier and Type | Method and Description |
---|---|
abstract void |
createSession(java.lang.String sessionId,
java.lang.String extraMessage,
RTSCallback<java.lang.Void> callback)
Create a session using a session ID
|
static RTSManager2 |
getInstance()
Get an instance of an abstract class
|
abstract RTSNetworkProxy |
getNetworkProxy()
Get the specified network proxy
|
abstract boolean |
joinSession(java.lang.String sessionId,
boolean enableServerRecord,
RTSCallback<RTSData> callback)
Join a session using a session ID
|
abstract boolean |
leaveSession(java.lang.String sessionId,
RTSCallback<java.lang.Void> callback)
Leave a group session
|
abstract void |
observeChannelState(java.lang.String sessionId,
RTSChannelStateObserver observer,
boolean register)
Register or unregister the observer for status changes of a channel
|
abstract void |
observeControlNotification(java.lang.String sessionId,
Observer<RTSControlEvent> observer,
boolean register)
Register or unregister the observer for session control messages
|
abstract void |
observeReceiveData(java.lang.String sessionId,
Observer<RTSTunData> observer,
boolean register)
Register or unregister the observer for the data sent by the peer from a channel
|
abstract boolean |
sendControlCommand(java.lang.String sessionId,
java.lang.String data,
RTSCallback<java.lang.Void> callback)
Send a control command
|
abstract boolean |
sendData(RTSTunData data)
Send data to a user in a channel of the specified session, or broadcast to all users.
|
abstract void |
setNetworkProxy(RTSNetworkProxy proxy)
Set the network proxy before starting a call
|
public static RTSManager2 getInstance()
public abstract void setNetworkProxy(RTSNetworkProxy proxy)
proxy
- proxy infopublic abstract RTSNetworkProxy getNetworkProxy()
public abstract boolean sendControlCommand(java.lang.String sessionId, java.lang.String data, RTSCallback<java.lang.Void> callback)
sessionId
- Session IDdata
- command datacallback
- callbackpublic abstract void createSession(java.lang.String sessionId, java.lang.String extraMessage, RTSCallback<java.lang.Void> callback)
sessionId
- Session IDextraMessage
- additional information, which will be received by subsequent users joining the sessioncallback
- callback. 200
The session is created. 417
The session is reserved.public abstract boolean joinSession(java.lang.String sessionId, boolean enableServerRecord, RTSCallback<RTSData> callback)
sessionId
- Session IDenableServerRecord
- Enable or disable server recordingcallback
- callbackpublic abstract boolean leaveSession(java.lang.String sessionId, RTSCallback<java.lang.Void> callback)
sessionId
- Session IDcallback
- callbackpublic abstract void observeChannelState(java.lang.String sessionId, RTSChannelStateObserver observer, boolean register)
sessionId
- Session IDobserver
- the observer. The parameter is the session state callback, such as connecting to the server and joinsregister
- true: register the observer; false: unregister the observerpublic abstract void observeControlNotification(java.lang.String sessionId, Observer<RTSControlEvent> observer, boolean register)
sessionId
- Session IDobserver
- The observer. The parameter is the received session control message.register
- true: register the observer; false: unregister the observerpublic abstract boolean sendData(RTSTunData data)
data
- The data to be sent. The toAccount field represents the peer user. If the value is set to null, the data will be broadcast to all users.public abstract void observeReceiveData(java.lang.String sessionId, Observer<RTSTunData> observer, boolean register)
sessionId
- Session IDobserver
- The observer. The parameter is the received dataregister
- true: register the observer; false: unregister the observer