@InterfaceAudience.Private public class RpcServer extends Object implements Closeable
| Modifier and Type | Method and Description |
|---|---|
void |
cancelClient(String clientId,
String msg)
Tells the RPC server to cancel the connection from an existing pending client
|
void |
close() |
String |
createSecret()
Creates a secret for identifying a client connection.
|
String |
getAddress() |
int |
getPort() |
io.netty.util.concurrent.Future<Rpc> |
registerClient(String clientId,
String secret,
RpcDispatcher serverDispatcher)
Tells the RPC server to expect a connection from a new client.
|
public RpcServer(Map<String,String> mapConf) throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic io.netty.util.concurrent.Future<Rpc> registerClient(String clientId, String secret, RpcDispatcher serverDispatcher)
clientId - An identifier for the client. Must be unique.secret - The secret the client will send to the server to identify itself.serverDispatcher - The dispatcher to use when setting up the RPC instance.public void cancelClient(String clientId, String msg)
clientId - The identifier for the clientmsg - The error message about why the connection should be canceledpublic String createSecret()
public String getAddress()
public int getPort()
public void close()
close in interface Closeableclose in interface AutoCloseableCopyright © 2019 The Apache Software Foundation. All Rights Reserved.