Package org.htmlunit.websocket
Interface WebSocketAdapter
-
- All Known Implementing Classes:
JettyWebSocketAdapter
public interface WebSocketAdapter
Helper to have no direct dependency to the WebSockt client implementation used by HtmlUnit.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
closeClient()
void
closeIncommingSession()
void
closeOutgoingSession()
void
connect(java.net.URI url)
void
onWebSocketBinary(byte[] data, int offset, int length)
void
onWebSocketClose(int statusCode, java.lang.String reason)
void
onWebSocketConnect()
void
onWebSocketConnectError(java.lang.Throwable cause)
void
onWebSocketConnecting()
void
onWebSocketError(java.lang.Throwable cause)
void
onWebSocketText(java.lang.String message)
void
send(java.lang.Object content)
void
start()
-
-
-
Method Detail
-
start
void start() throws java.lang.Exception
- Throws:
java.lang.Exception
-
connect
void connect(java.net.URI url) throws java.lang.Exception
- Throws:
java.lang.Exception
-
send
void send(java.lang.Object content) throws java.io.IOException
- Throws:
java.io.IOException
-
closeIncommingSession
void closeIncommingSession() throws java.lang.Exception
- Throws:
java.lang.Exception
-
closeOutgoingSession
void closeOutgoingSession() throws java.lang.Exception
- Throws:
java.lang.Exception
-
closeClient
void closeClient() throws java.lang.Exception
- Throws:
java.lang.Exception
-
onWebSocketConnecting
void onWebSocketConnecting()
-
onWebSocketConnect
void onWebSocketConnect()
-
onWebSocketClose
void onWebSocketClose(int statusCode, java.lang.String reason)
-
onWebSocketText
void onWebSocketText(java.lang.String message)
-
onWebSocketBinary
void onWebSocketBinary(byte[] data, int offset, int length)
-
onWebSocketConnectError
void onWebSocketConnectError(java.lang.Throwable cause)
-
onWebSocketError
void onWebSocketError(java.lang.Throwable cause)
-
-