Package com.microsoft.playwright.impl
Class CDPSessionImpl
java.lang.Object
com.microsoft.playwright.impl.LoggingSupport
com.microsoft.playwright.impl.ChannelOwner
com.microsoft.playwright.impl.CDPSessionImpl
- All Implemented Interfaces:
CDPSession
-
Field Summary
FieldsFields inherited from class com.microsoft.playwright.impl.ChannelOwner
connection, guid, initializer, type -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCDPSessionImpl(ChannelOwner parent, String type, String guid, com.google.gson.JsonObject initializer) -
Method Summary
Modifier and TypeMethodDescriptionvoiddetach()Detaches the CDPSession from the target.(package private) voidhandleEvent(String event, com.google.gson.JsonObject parameters) voidUnregister an event handler for events with the specified event name.voidRegister an event handler for events with the specified event name.com.google.gson.JsonObjectcom.google.gson.JsonObjectMethods inherited from class com.microsoft.playwright.impl.ChannelOwner
adopt, disposeChannelOwner, runUntil, sendMessage, sendMessage, sendMessageAsync, toProtocolRef, withLogging, withWaitLoggingMethods inherited from class com.microsoft.playwright.impl.LoggingSupport
logApi, logApiIfEnabled, logWithTimestamp, withLogging
-
Field Details
-
listeners
-
-
Constructor Details
-
CDPSessionImpl
protected CDPSessionImpl(ChannelOwner parent, String type, String guid, com.google.gson.JsonObject initializer)
-
-
Method Details
-
handleEvent
- Overrides:
handleEventin classChannelOwner
-
send
- Specified by:
sendin interfaceCDPSession- Parameters:
method- Protocol method name.
-
send
- Specified by:
sendin interfaceCDPSession- Parameters:
method- Protocol method name.params- Optional method parameters.
-
on
Description copied from interface:CDPSessionRegister an event handler for events with the specified event name. The given handler will be called for every event with the given name.- Specified by:
onin interfaceCDPSession- Parameters:
event- CDP event name.handler- Event handler.
-
off
Description copied from interface:CDPSessionUnregister an event handler for events with the specified event name. The given handler will not be called anymore for events with the given name.- Specified by:
offin interfaceCDPSession- Parameters:
event- CDP event name.handler- Event handler.
-
detach
public void detach()Description copied from interface:CDPSessionDetaches the CDPSession from the target. Once detached, the CDPSession object won't emit any events and can't be used to send messages.- Specified by:
detachin interfaceCDPSession
-