public abstract class JettyWebSocketAdapter extends Object implements WebSocketAdapter
Constructor and Description |
---|
JettyWebSocketAdapter(WebClient webClient) |
Modifier and Type | Method and Description |
---|---|
void |
closeClient()
Close the client.
|
void |
closeIncommingSession()
Close the incomming session.
|
void |
closeOutgoingSession()
Close the outgoing session.
|
void |
connect(URI url)
Connects to the given
URI . |
void |
send(Object content)
Sends the provided content.
|
void |
start()
Starts the client.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
onWebSocketBinary, onWebSocketClose, onWebSocketConnect, onWebSocketConnectError, onWebSocketConnecting, onWebSocketError, onWebSocketText
public JettyWebSocketAdapter(WebClient webClient)
public void start() throws Exception
start
in interface WebSocketAdapter
Exception
- in case of errorpublic void connect(URI url) throws Exception
URI
.connect
in interface WebSocketAdapter
url
- the target urlException
- in case of errorpublic void send(Object content) throws IOException
send
in interface WebSocketAdapter
content
- the content to be sentIOException
- in case of errorpublic void closeIncommingSession()
closeIncommingSession
in interface WebSocketAdapter
public void closeOutgoingSession()
closeOutgoingSession
in interface WebSocketAdapter
public void closeClient() throws Exception
closeClient
in interface WebSocketAdapter
Exception
- in case of errorCopyright © 2002–2024 Gargoyle Software Inc.. All rights reserved.