Package com.javiergs.cortex4j
Class CortexSession
java.lang.Object
com.javiergs.cortex4j.CortexSession
- All Implemented Interfaces:
AutoCloseable
High-level authenticated Cortex session with per-stream observers.
The first available headset is selected; explicit headset selection can be
added later without changing the underlying CortexRpcClient API.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(String stream, CortexListener listener) voidclose()static CortexSessionconnect()static CortexSessionconnect(CortexCredentials credentials) static CompletableFuture<CortexSession> connectAsync(CortexCredentials credentials) static CompletableFuture<CortexSession> connectAsync(URI endpoint, CortexCredentials credentials) Headset selected when this session was created.Sensor labels reported by Cortex for the active headset.voidremoveListener(String stream, CortexListener listener) voidvoidunsubscribe(String... streams)
-
Method Details
-
connect
-
connect
-
connectAsync
-
connectAsync
public static CompletableFuture<CortexSession> connectAsync(URI endpoint, CortexCredentials credentials) -
getHeadsetId
Headset selected when this session was created. -
getSensorLabels
Sensor labels reported by Cortex for the active headset. -
addListener
-
removeListener
-
subscribe
-
unsubscribe
-
getConnectionSecurity
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-