edu.washington.cs.pl_if.rpc.server
Class RpcServer

java.lang.Object
  extended by edu.washington.cs.pl_if.rpc.server.RpcServer

public class RpcServer
extends Object


Constructor Summary
protected RpcServer()
           
 
Method Summary
 boolean checkCredentials(Credentials cred)
           
 ConnectionController getController(Credentials cred)
           
static RpcServer getInstance()
           
 int getNetworkIntensiveTicket()
          used to controll how many threads that can run network intensive stuff controlling for example the number of concurrent scp connections when uploading and downloading content
static double getTime()
          Get relative time since the application started.
 void halt()
           
 void increaseConcurrentCopyLimit(int newLimit)
          increase the number of concurrent network intensive threads that are allowed to run.
 int releaseNetworkIntensiveTicket()
           
 int shutdown(Credentials cred)
           
 void startController(Credentials cred)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RpcServer

protected RpcServer()
Method Detail

getInstance

public static RpcServer getInstance()

getTime

public static double getTime()
Get relative time since the application started. Since the XML-RPC standard has no support for 64 bit integers (unless extensions are used), a double is used.

Returns:
number of seconds since application start

startController

public void startController(Credentials cred)

checkCredentials

public boolean checkCredentials(Credentials cred)

getController

public ConnectionController getController(Credentials cred)

getNetworkIntensiveTicket

public int getNetworkIntensiveTicket()
                              throws InterruptedException
used to controll how many threads that can run network intensive stuff controlling for example the number of concurrent scp connections when uploading and downloading content

Throws:
InterruptedException

halt

public void halt()

increaseConcurrentCopyLimit

public void increaseConcurrentCopyLimit(int newLimit)
increase the number of concurrent network intensive threads that are allowed to run. Note that this only can be increased

Parameters:
newLimit - the new limit

releaseNetworkIntensiveTicket

public int releaseNetworkIntensiveTicket()

shutdown

public int shutdown(Credentials cred)