|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.wpi.prc.server.PRCServer
public class PRCServer
Field Summary | |
---|---|
private static int |
EXIT_ERROR
|
private static int |
EXIT_SUCCESS
|
private static boolean |
isRunning
|
private static boolean |
isTransitionerRunning
|
private static PRCServer |
prcServer
|
private ServerRPCHandler |
rpcHandler
|
private Transitioner |
transitioner
|
private static java.util.concurrent.Semaphore |
transitionerSemaphore
|
private static boolean |
waitForTransactions
|
private org.apache.xmlrpc.WebServer |
xmlrpcServer
|
Constructor Summary | |
---|---|
private |
PRCServer()
Private constructor prevents explcit instantiation of the PRCServer class. |
Method Summary | |
---|---|
ServerRPCHandler |
getRPCHandler()
|
Transitioner |
getTransitioner()
|
java.util.concurrent.Semaphore |
getTransitionerSemaphore()
|
org.apache.xmlrpc.WebServer |
getXmlrpcServer()
|
void |
initiateShutdown()
Performs any tasks necessary to clearnly shut down the server. |
private void |
initXmlRpcServer()
Initializes and starts the XML-RPC server. |
static PRCServer |
instance()
|
boolean |
isRunning()
|
boolean |
isTransitionerRunning()
|
static void |
main(java.lang.String[] args)
Controls the server. |
void |
run()
Starts the XML-RPC server and begins handling client requests. |
void |
setWaitForTransactions(boolean waitForTransactions)
|
void |
shutdown()
Shuts down the server when it is safe to do so. |
void |
shutdownTransitioner(boolean waitForTransactions)
Cleanly shuts down the transitioner. |
void |
switchToLocalTransitioner()
Switches the current transitioner to a LocalTransitioner. |
void |
switchToRemoteTransitioner()
Switches the current transitioner to a RemoteTransitioner. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static PRCServer prcServer
private static final int EXIT_SUCCESS
private static final int EXIT_ERROR
private Transitioner transitioner
private final ServerRPCHandler rpcHandler
private org.apache.xmlrpc.WebServer xmlrpcServer
private static boolean isRunning
private static boolean isTransitionerRunning
private static boolean waitForTransactions
private static final java.util.concurrent.Semaphore transitionerSemaphore
Constructor Detail |
---|
private PRCServer()
Method Detail |
---|
private void initXmlRpcServer()
public Transitioner getTransitioner()
public void setWaitForTransactions(boolean waitForTransactions)
waitForTransactions
- True if the server should wait for all transitioner transactions to complete before shutting down, false otherwise.public java.util.concurrent.Semaphore getTransitionerSemaphore()
public ServerRPCHandler getRPCHandler()
public org.apache.xmlrpc.WebServer getXmlrpcServer()
public boolean isRunning()
public boolean isTransitionerRunning()
public void run()
run
in interface java.lang.Runnable
public void switchToLocalTransitioner()
public void switchToRemoteTransitioner()
public void initiateShutdown()
public void shutdownTransitioner(boolean waitForTransactions)
public void shutdown()
public static PRCServer instance()
public static void main(java.lang.String[] args)
args
- Command-line arguments.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |