Package xal.extension.service
Class RpcServer
java.lang.Object
xal.extension.service.RpcServer
RpcServer implements a server which handles remote requests against
registered handlers.
- Author:
- tap
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> void
addHandler
(String serviceName, Class<T> protocol, T provider) add a handler to associate with the specified service and providergetHost()
Get the host address used for the web server.int
getPort()
Get the port used by the web server.void
removeHandler
(String serviceName) remove the registered handlervoid
shutdown()
shutdown the servervoid
start()
start the server, listen for remote requests and dispatch them to the appropriate handlers
-
Constructor Details
-
RpcServer
Constructor- Throws:
IOException
-
-
Method Details
-
getPort
public int getPort()Get the port used by the web server.- Returns:
- The port used by the web server.
-
getHost
Get the host address used for the web server.- Returns:
- The host address used for the web server.
-
start
public void start()start the server, listen for remote requests and dispatch them to the appropriate handlers -
shutdown
shutdown the server- Throws:
IOException
-
addHandler
add a handler to associate with the specified service and provider -
removeHandler
remove the registered handler
-