class ChromeDebuggerConnection
(source)
ChromeDebuggerConnection represents connection to chrome's debugger via DevTools Protocol.
It depends on DebuggerFramesStream which is responsible for providing stream of protocol frames (both events and responses) and allows for sending requests.
FrameMapper is responsible for decoding/encoding objects to/from JSON frames which DevTools Protocol can understand.
See Also
ChromeDebuggerConnection(frames: DebuggerFramesStream, eventMapper: EventMapper = EventMapper(), sessionId: SessionID? = null)
ChromeDebuggerConnection represents connection to chrome's debugger via DevTools Protocol. |
fun addEventMapping(name: String, clazz: Class<out Event>): Unit
Registers event name to class mappings. |
|
fun allEvents(): Flowable<Event>
Captures all events as generated by remote debugger |
|
fun cloneForSessionId(sessionID: SessionID): ChromeDebuggerConnection
Reuse existing debugger connection but for new sessionID sharing underlying websocket connection. |
|
fun close(): Unit
Closes connection to remote debugger. |
|
fun <T : Event> events(eventName: String, outClazz: Class<T>): Flowable<T>
Captures events by given name and casts received messages to specified class. |
|
fun <T> request(methodName: String, requestParams: Any?, responseClazz: Class<T>): Single<T>
Sends request and captures response from the stream. |
fun open(websocketUri: String, framesBufferSize: Int = 128): ChromeDebuggerConnection
Creates new ChromeDebuggerConnection session for given websocket uri and frames buffer size. |