|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.wpi.prc.example.java.common.Server
public class Server
The Server class is responsible for initializing, starting, and stopping an XML-RPC server.
Field Summary | |
---|---|
private static int |
EXIT_ERROR
|
private boolean |
isRunning
|
private int |
port
|
private org.apache.xmlrpc.WebServer |
xmlrpcServer
|
Constructor Summary | |
---|---|
Server(int port)
Constructor that takes the port number on which to listen. |
Method Summary | |
---|---|
private void |
initXmlRpcServer()
Initializes and starts the XML-RPC server. |
boolean |
isRunning()
|
void |
registerRPCHandler(java.lang.String handlerName,
java.lang.Object rpcHandler)
Registers the given RPC handler object with the XML-RPC server. |
boolean |
shutdown()
Performs any tasks necessary to clearnly shut down the server. |
void |
start()
Starts the XML-RPC server and begins handling requests. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final int EXIT_ERROR
private int port
private org.apache.xmlrpc.WebServer xmlrpcServer
private boolean isRunning
Constructor Detail |
---|
public Server(int port)
port
- The port number on which to listen for XML-RPC requests.Method Detail |
---|
private void initXmlRpcServer()
public void registerRPCHandler(java.lang.String handlerName, java.lang.Object rpcHandler)
handlerName
- The name of the handler. All RPCs will be prefixed with this name.
Example: in the call "sciapp.computeResult" "sciapp" is the name of the handler and
"computeResult" is the name of the method to call inside that handler.rpcHandler
- The object containing the handler methods.public boolean isRunning()
public void start()
public boolean shutdown()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |