pl.wendigo.chrome.protocol / FrameMapper

FrameMapper

class FrameMapper (source)

FrameMapper is responsible for (de)serializing frames exchanged via Chrome's DevTool Protocol.

Constructors

<init>

FrameMapper(mapper: ObjectMapper = DEFAULT_MAPPER)

FrameMapper is responsible for (de)serializing frames exchanged via Chrome's DevTool Protocol.

Functions

deserialize

fun <T> deserialize(text: String, clazz: Class<T>): T

Deserialize text to clazz.

deserializeEvent

fun <T : Event> deserializeEvent(responseFrame: ResponseFrame, clazz: Class<T>): Single<T>

Deserialize response frame event to clazz.

deserializeResponse

fun <T> deserializeResponse(requestFrame: RequestFrame, responseFrame: ResponseFrame, clazz: Class<T>): Single<T>

Deserialize response frame as clazz

serialize

fun serialize(requestFrame: RequestFrame): Single<String>

Serializes request frame using internal object mapper