public abstract class RTSManager
extends java.lang.Object
Constructor and Description |
---|
RTSManager() |
Modifier and Type | Method and Description |
---|---|
abstract boolean |
accept(java.lang.String sessionId,
RTSOptions options,
RTSCallback<java.lang.Boolean> callback)
(Recipient) accept a session
|
abstract boolean |
close(java.lang.String sessionId,
RTSCallback<java.lang.Void> callback)
(Recipient) decline or end a session
|
static RTSManager |
getInstance()
Get an instance of an abstract class
|
abstract RTSNetworkProxy |
getNetworkProxy()
Get the network proxy
|
abstract boolean |
isMuted(java.lang.String sessionId)
Check if it is muted
|
abstract boolean |
isSpeakerOn(java.lang.String sessionId)
Check if the speaker is turned on
|
abstract boolean |
observeCalleeAckNotification(java.lang.String sessionId,
Observer<RTSCalleeAckEvent> observer,
boolean register)
Register or unregister the observer for the response to the session request by the callee.
|
abstract boolean |
observeChannelState(java.lang.String sessionId,
RTSChannelStateObserver observer,
boolean register)
Register or unregister the observer for channel state changes
|
abstract boolean |
observeControlNotification(java.lang.String sessionId,
Observer<RTSControlEvent> observer,
boolean register)
Register or unregister the observer for session control message
|
abstract boolean |
observeHangUpNotification(java.lang.String sessionId,
Observer<RTSCommonEvent> observer,
boolean register)
Register or unregister the observer for ending the session by the callee
|
abstract void |
observeIncomingSession(Observer<RTSData> observer,
boolean register)
Register or unregister the observer for incoming sessions
We recommend that you add the observer when the app starts
|
abstract boolean |
observeOnlineAckNotification(java.lang.String sessionId,
Observer<RTSOnlineAckEvent> observer,
boolean register)
Register or unregister the observer for responses to the caller from other online clients of a callee.
|
abstract boolean |
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 |
observeTimeoutNotification(java.lang.String sessionId,
Observer<RTSTimeOutEvent> observer,
boolean register)
Register or unregister the observer for session timeout.
|
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 |
setMute(java.lang.String sessionId,
boolean mute)
Mute control
|
abstract void |
setNetworkProxy(RTSNetworkProxy proxy)
Set a network proxy before starting a conversation
|
abstract void |
setSpeaker(java.lang.String sessionId,
boolean enable)
Speaker control
|
abstract java.lang.String |
start(java.lang.String account,
java.util.List<RTSTunnelType> tunTypes,
RTSOptions options,
RTSNotifyOption notifyOption,
RTSCallback<RTSData> callback)
(Initiator) starts a session.
|
public static RTSManager getInstance()
public abstract void setNetworkProxy(RTSNetworkProxy proxy)
proxy
- network proxypublic abstract RTSNetworkProxy getNetworkProxy()
public abstract java.lang.String start(java.lang.String account, java.util.List<RTSTunnelType> tunTypes, RTSOptions options, RTSNotifyOption notifyOption, RTSCallback<RTSData> callback)
account
- peer accounttunTypes
- tunnel types: AUDIO andDATAoptions
- optional. Specify whether to record the tunnel data.notifyOption
- optional. Push optionscallback
- callback that return RTSDatapublic abstract boolean accept(java.lang.String sessionId, RTSOptions options, RTSCallback<java.lang.Boolean> callback)
sessionId
- session IDoptions
- optional. Specify whether to record the tunnel data.callback
- callback to send notification for the result of initializing a channel.public abstract boolean close(java.lang.String sessionId, RTSCallback<java.lang.Void> callback)
sessionId
- session IDcallback
- callbackpublic abstract boolean sendControlCommand(java.lang.String sessionId, java.lang.String data, RTSCallback<java.lang.Void> callback)
sessionId
- session IDdata
- control commandcallback
- callbackpublic abstract void observeIncomingSession(Observer<RTSData> observer, boolean register)
observer
- Observer. The parameter is the session inforegister
- true: register the observer; false unregister the observer?public abstract boolean observeCalleeAckNotification(java.lang.String sessionId, Observer<RTSCalleeAckEvent> observer, boolean register)
sessionId
- session IDobserver
- Observer. The parameter is the response from the calleeregister
- true: register the observer; false unregister the observer?public abstract boolean observeOnlineAckNotification(java.lang.String sessionId, Observer<RTSOnlineAckEvent> observer, boolean register)
sessionId
- session IDobserver
- The observer. The parameter is the response notification about online clients for the calleeregister
- true: register the observer; false unregister the observer?public abstract boolean observeHangUpNotification(java.lang.String sessionId, Observer<RTSCommonEvent> observer, boolean register)
sessionId
- session IDobserver
- Observer. The parameter is the notification for ending a sessionregister
- true: register the observer; false unregister the observer?public abstract boolean observeChannelState(java.lang.String sessionId, RTSChannelStateObserver observer, boolean register)
sessionId
- session IDobserver
- The observer. The parameter is the callback for the channel state changes, For example, get connected with the server, a user joins the channelregister
- true: register the observer; false unregister the observer?public abstract boolean observeControlNotification(java.lang.String sessionId, Observer<RTSControlEvent> observer, boolean register)
sessionId
- session IDobserver
- The observer. The parameter is the the received session control messageregister
- true: register the observer; false unregister the observer?public abstract boolean observeTimeoutNotification(java.lang.String sessionId, Observer<RTSTimeOutEvent> observer, boolean register)
sessionId
- session IDobserver
- Observer. The parameter is the timeout event inforegister
- true: register the observer; false unregister the observer?public abstract boolean sendData(RTSTunData data)
data
- data to be sent. The toAccount parameter is the destination for the data. If the value is set to null, the data will be broadcast to all users.public abstract boolean 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?public abstract void setMute(java.lang.String sessionId, boolean mute)
sessionId
- session IDmute
- mute or unmutepublic abstract boolean isMuted(java.lang.String sessionId)
sessionId
- session IDpublic abstract void setSpeaker(java.lang.String sessionId, boolean enable)
sessionId
- session IDenable
- Enable or disable the speaker?public abstract boolean isSpeakerOn(java.lang.String sessionId)
sessionId
- session ID