@InterfaceAudience.Private public class RpcServer extends Object implements Closeable
| Modifier and Type | Method and Description |
|---|---|
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 String createSecret()
public String getAddress()
public int getPort()
public void close()
close in interface Closeableclose in interface AutoCloseableCopyright © 2017 The Apache Software Foundation. All rights reserved.