public class ChromeDevtoolsServer extends java.lang.Object implements SimpleEndpoint
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
PATH |
| Constructor and Description |
|---|
ChromeDevtoolsServer(java.lang.Iterable<ChromeDevtoolsDomain> domainModules) |
| Modifier and Type | Method and Description |
|---|---|
void |
onClose(SimpleSession session,
int code,
java.lang.String reasonPhrase)
Invoked when a remote peer closed the WebSocket session or if
SimpleSession.close(int, java.lang.String)
is invoked on our side. |
void |
onError(SimpleSession session,
java.lang.Throwable ex)
Invoked when errors occur out of the normal band of the WebSocket protocol.
|
void |
onMessage(SimpleSession session,
byte[] message,
int messageLen)
Invoked when a binary message is received from the peer.
|
void |
onMessage(SimpleSession session,
java.lang.String message)
Invoked when a text-based message is received from the peer.
|
void |
onOpen(SimpleSession session)
Invoked when a new WebSocket session is established.
|
public static final java.lang.String PATH
public ChromeDevtoolsServer(java.lang.Iterable<ChromeDevtoolsDomain> domainModules)
public void onOpen(SimpleSession session)
SimpleEndpointonOpen in interface SimpleEndpointsession - Unique handle for this session.public void onClose(SimpleSession session, int code, java.lang.String reasonPhrase)
SimpleEndpointSimpleSession.close(int, java.lang.String)
is invoked on our side.onClose in interface SimpleEndpointsession - Unique handle for this session.code - Close reason code (see RFC6455)reasonPhrase - Possibly arbitrary text phrase associated with the reason code.public void onMessage(SimpleSession session, byte[] message, int messageLen)
SimpleEndpointonMessage in interface SimpleEndpointsession - Unique handle for this session.message - Complete payload data.messageLen - Maximum number of bytes of message to read.public void onMessage(SimpleSession session, java.lang.String message)
SimpleEndpointonMessage in interface SimpleEndpointsession - Unique handle for this session.message - Complete payload data.public void onError(SimpleSession session, java.lang.Throwable ex)
SimpleEndpointSimpleEndpoint.onClose(com.facebook.stetho.websocket.SimpleSession, int, java.lang.String) method
will still be invoked in all cases, making it reasonable to simply log in this method.onError in interface SimpleEndpointsession - Unique handle for this session.ex - Exception that occurred.