@WebSocket(maxTextMessageSize=65536) public static class CmdProduce.ProducerSocket extends Object
| Constructor and Description |
|---|
ProducerSocket(CompletableFuture<Void> connected) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
awaitClose(int duration,
TimeUnit unit) |
void |
close() |
org.eclipse.jetty.websocket.api.RemoteEndpoint |
getRemote() |
org.eclipse.jetty.websocket.api.Session |
getSession() |
void |
onClose(int statusCode,
String reason) |
void |
onConnect(org.eclipse.jetty.websocket.api.Session session) |
void |
onMessage(String msg) |
CompletableFuture<Void> |
send(int index,
byte[] content) |
public ProducerSocket(CompletableFuture<Void> connected)
public CompletableFuture<Void> send(int index, byte[] content) throws Exception
Exceptionpublic boolean awaitClose(int duration,
TimeUnit unit)
throws InterruptedException
InterruptedException@OnWebSocketClose
public void onClose(int statusCode,
String reason)
@OnWebSocketConnect public void onConnect(org.eclipse.jetty.websocket.api.Session session)
@OnWebSocketMessage public void onMessage(String msg) throws com.google.gson.JsonParseException
com.google.gson.JsonParseExceptionpublic org.eclipse.jetty.websocket.api.RemoteEndpoint getRemote()
public org.eclipse.jetty.websocket.api.Session getSession()
public void close()
Copyright © 2017–2021 Apache Software Foundation. All rights reserved.