Package org.htmlunit.websocket
Class JettyWebSocketAdapter
- java.lang.Object
-
- org.htmlunit.websocket.JettyWebSocketAdapter
-
- All Implemented Interfaces:
WebSocketAdapter
public abstract class JettyWebSocketAdapter extends java.lang.Object implements WebSocketAdapter
Jetty based impl of the WebSocketAdapter.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private classJettyWebSocketAdapter.JettyWebSocketAdapterImpl
-
Field Summary
Fields Modifier and Type Field Description private org.eclipse.jetty.websocket.client.WebSocketClientclient_private java.lang.ObjectclientLock_private org.eclipse.jetty.websocket.api.SessionincomingSession_private org.eclipse.jetty.websocket.api.SessionoutgoingSession_
-
Constructor Summary
Constructors Constructor Description JettyWebSocketAdapter(WebClient webClient)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcloseClient()voidcloseIncommingSession()voidcloseOutgoingSession()voidconnect(java.net.URI url)voidsend(java.lang.Object content)voidstart()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.htmlunit.websocket.WebSocketAdapter
onWebSocketBinary, onWebSocketClose, onWebSocketConnect, onWebSocketConnectError, onWebSocketConnecting, onWebSocketError, onWebSocketText
-
-
-
-
Field Detail
-
clientLock_
private final java.lang.Object clientLock_
-
client_
private org.eclipse.jetty.websocket.client.WebSocketClient client_
-
incomingSession_
private volatile org.eclipse.jetty.websocket.api.Session incomingSession_
-
outgoingSession_
private org.eclipse.jetty.websocket.api.Session outgoingSession_
-
-
Constructor Detail
-
JettyWebSocketAdapter
public JettyWebSocketAdapter(WebClient webClient)
-
-
Method Detail
-
start
public void start() throws java.lang.Exception- Specified by:
startin interfaceWebSocketAdapter- Throws:
java.lang.Exception
-
connect
public void connect(java.net.URI url) throws java.lang.Exception- Specified by:
connectin interfaceWebSocketAdapter- Throws:
java.lang.Exception
-
send
public void send(java.lang.Object content) throws java.io.IOException- Specified by:
sendin interfaceWebSocketAdapter- Throws:
java.io.IOException
-
closeIncommingSession
public void closeIncommingSession()
- Specified by:
closeIncommingSessionin interfaceWebSocketAdapter
-
closeOutgoingSession
public void closeOutgoingSession()
- Specified by:
closeOutgoingSessionin interfaceWebSocketAdapter
-
closeClient
public void closeClient() throws java.lang.Exception- Specified by:
closeClientin interfaceWebSocketAdapter- Throws:
java.lang.Exception
-
-