public class WebsocketPool extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
calculateMd5(Map<String,String> headers) |
protected void |
finalize() |
static WebsocketPool |
getInstance() |
WebsocketRpc |
getWsClient(String url,
Map<String,String> headers)
Get a rpc client from the pool.
|
void |
returnWsClient(WebsocketRpc websocketRpc)
Return the borrowed object to the pool.
|
public static WebsocketPool getInstance()
protected void finalize()
throws Throwable
public WebsocketRpc getWsClient(String url, Map<String,String> headers) throws Exception
url - The connecting url of the websocket client.headers - The headers to use for connection.Exception - Error occurs.public void returnWsClient(WebsocketRpc websocketRpc)
websocketRpc - The borrowed websocket rpc client.Copyright © 2023. All rights reserved.