| 构造器和说明 |
|---|
Connection(String url,
ConnectionTransport transport,
int delay) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
accept(String t) |
CDPSession |
createSession(TargetInfo targetInfo)
创建一个
CDPSession |
void |
dispose() |
static Connection |
fromSession(CDPSession client)
从
CDPSession中拿到对应的Connection |
boolean |
getClosed() |
String |
getUrl() |
void |
onMessage(String message)
recevie message from browser by websocket
|
long |
rawSend(SendMsg message,
boolean putCallback,
Map<Long,SendMsg> callbacks) |
com.fasterxml.jackson.databind.JsonNode |
send(String method,
Map<String,Object> params,
boolean isWait) |
com.fasterxml.jackson.databind.JsonNode |
send(String method,
Map<String,Object> params,
boolean isWait,
CountDownLatch outLatch) |
CDPSession |
session(String sessionId) |
String |
url() |
addListener, addListener, emit, getListenerCount, removeListenerpublic Connection(String url, ConnectionTransport transport, int delay)
public com.fasterxml.jackson.databind.JsonNode send(String method, Map<String,Object> params, boolean isWait)
public com.fasterxml.jackson.databind.JsonNode send(String method, Map<String,Object> params, boolean isWait, CountDownLatch outLatch)
public long rawSend(SendMsg message, boolean putCallback, Map<Long,SendMsg> callbacks)
message - 发送的消息内容putCallback - 是否应该放进callbacks里面callbacks - 对应的callbackspublic void onMessage(String message)
message - 从浏览器接受到的消息public static Connection fromSession(CDPSession client)
CDPSession中拿到对应的Connectionclient - cdpsessionpublic CDPSession createSession(TargetInfo targetInfo)
CDPSessiontargetInfo - target infopublic String url()
public String getUrl()
public CDPSession session(String sessionId)
public void dispose()
public boolean getClosed()
Copyright © 2020. All rights reserved.