public class RpcServer
extends java.lang.Object
Constructor and Description |
---|
RpcServer(Coder messageCoder)
Constructor
|
Modifier and Type | Method and Description |
---|---|
<ProtocolType> |
addHandler(java.lang.String serviceName,
java.lang.Class<ProtocolType> protocol,
ProtocolType provider)
add a handler to associate with the specified service and provider
|
java.lang.String |
getHost()
Get the host address used for the web server.
|
int |
getPort()
Get the port used by the web server.
|
void |
removeHandler(java.lang.String serviceName)
remove the registered handler
|
void |
shutdown()
shutdown the server
|
void |
start()
start the server, listen for remote requests and dispatch them to the appropriate handlers
|
public RpcServer(Coder messageCoder) throws java.io.IOException
java.io.IOException
public int getPort()
public java.lang.String getHost()
public void start()
public void shutdown() throws java.io.IOException
java.io.IOException
public <ProtocolType> void addHandler(java.lang.String serviceName, java.lang.Class<ProtocolType> protocol, ProtocolType provider)
public void removeHandler(java.lang.String serviceName)