public class ClientManager extends Object
Provides operating methods for client sets stored in memory
| 构造器和说明 |
|---|
ClientManager() |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
bindClientToPipe(String pipeName,
String clientId)
Bind client to message pipe
PIPE_CLIENTS |
static boolean |
containsClient(String clientId)
Check if the client already exists
|
static io.grpc.ManagedChannel |
establishChannel(String clientId)
Establish a client channel
|
static List<ClientInformation> |
getAllClient()
Get all client from
CLIENTS |
static ClientInformation |
getClient(String clientId)
Get client information from
CLIENTS |
static String |
getClientId(String address,
int port)
get formatted clientId
|
static List<ClientInformation> |
getPipeBindClients(String pipeName)
Get message pipe bind clients information
ClientInformation |
static String |
putIfNotPresent(String address,
int port)
If it does not exist, add it to the client collection
|
static void |
updateClientInformation(ClientInformation information)
Update client information
|
public static String putIfNotPresent(String address, int port)
address - client addressport - client portpublic static String getClientId(String address, int port)
address - the client addressport - the client portpublic static boolean containsClient(String clientId)
clientId - client idpublic static ClientInformation getClient(String clientId)
CLIENTSclientId - client idClientInformationpublic static List<ClientInformation> getAllClient()
CLIENTSClientInformationpublic static void updateClientInformation(ClientInformation information)
information - The ClientInformation instancepublic static void bindClientToPipe(String pipeName, String clientId)
PIPE_CLIENTSpipeName - message pipe nameclientId - client idpublic static List<ClientInformation> getPipeBindClients(String pipeName)
ClientInformationpipeName - message pipe namepublic static io.grpc.ManagedChannel establishChannel(String clientId)
clientId - The ClientInformation idManagedChannel instanceCopyright © 2020. All rights reserved.