Package tigase.meet.janus
Class JanusConnection
java.lang.Object
tigase.meet.janus.JanusConnection
- All Implemented Interfaces:
WebSocket.Listener
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionJanusConnection(JanusPluginsRegister pluginsRegister, ScheduledExecutorService executorService, Duration sessionTimeout) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()decode(com.fasterxml.jackson.core.JsonParser parser) protected ListdecodeArray(com.fasterxml.jackson.core.JsonParser parser) protected ObjectdecodeValue(com.fasterxml.jackson.core.JsonParser parser) destroySession(JanusSession session) execute(String janus, String transaction, JanusConnection.RequestGenerator requestGenerator) getId()getInfo()getPluginId(Class<? extends JanusPlugin> plugin) protected JanusSessiongetSession(long id) onBinary(WebSocket webSocket, ByteBuffer data, boolean last) voidvoidonText(WebSocket webSocket, CharSequence data, boolean last) protected Optional<CompletableFuture<Map<String,Object>>> removeExecuteTransaction(String transactionId) protected Optional<CompletableFuture<Void>>removeSendTransaction(String transactionId) send(String janus, String transaction, JanusConnection.RequestGenerator requestGenerator) protected voidsetWebSocket(WebSocket webSocket) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.net.http.WebSocket.Listener
onPing, onPong
-
Constructor Details
-
JanusConnection
public JanusConnection(JanusPluginsRegister pluginsRegister, ScheduledExecutorService executorService, Duration sessionTimeout)
-
-
Method Details
-
close
public void close() -
getId
-
nextTransactionId
-
setWebSocket
-
logPrefix
-
createSession
-
destroySession
-
getPluginId
-
getInfo
-
execute
public CompletableFuture<Map<String,Object>> execute(String janus, String transaction, JanusConnection.RequestGenerator requestGenerator) -
send
public CompletableFuture<Void> send(String janus, String transaction, JanusConnection.RequestGenerator requestGenerator) -
logPrefix
-
onOpen
- Specified by:
onOpenin interfaceWebSocket.Listener
-
onClose
- Specified by:
onClosein interfaceWebSocket.Listener
-
onError
- Specified by:
onErrorin interfaceWebSocket.Listener
-
onBinary
- Specified by:
onBinaryin interfaceWebSocket.Listener
-
onText
- Specified by:
onTextin interfaceWebSocket.Listener
-
getSession
-
removeExecuteTransaction
-
removeSendTransaction
-
decode
- Throws:
IOException
-
decode
protected Map<String,Object> decode(com.fasterxml.jackson.core.JsonParser parser) throws IOException - Throws:
IOException
-
decodeValue
- Throws:
IOException
-
decodeArray
- Throws:
IOException
-