pl.wendigo.chrome.protocol / EventMapper

EventMapper

class EventMapper (source)

EventMapper is responsible for mapping events carried by ResponseFrame to typed events representations.

Constructors

<init>

EventMapper(mapper: ObjectMapper = EventMapper.DEFAULT_MAPPER)

EventMapper is responsible for mapping events carried by ResponseFrame to typed events representations.

Functions

addMapping

fun addMapping(name: String, clazz: Class<out Event>): Unit

Add mapping from event name to class.

deserialize

fun <T : Event> deserialize(frame: ResponseFrame, outClazz: Class<T>): T

deserializeEvent

fun deserializeEvent(frame: ResponseFrame): Event