org.jminor.common.server.loadtest
Class RemoteLoadTestServer

java.lang.Object
  extended by java.rmi.server.RemoteObject
      extended by java.rmi.server.RemoteServer
          extended by java.rmi.server.UnicastRemoteObject
              extended by org.jminor.common.server.AbstractRemoteServer<RemoteLoadTest>
                  extended by org.jminor.common.server.loadtest.RemoteLoadTestServer
All Implemented Interfaces:
Serializable, Remote, RemoteServer<RemoteLoadTest>

public final class RemoteLoadTestServer
extends AbstractRemoteServer<RemoteLoadTest>

A server for running load tests remotely.

See Also:
LoadTestModel, Serialized Form

Field Summary
static String SERVER_NAME
           
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Fields inherited from interface org.jminor.common.server.RemoteServer
SERVER_ADMIN_PREFIX
 
Constructor Summary
RemoteLoadTestServer(int serverPort, int loadTestPort, String serverName)
          Instantiates and exports a new LoadTestServer.
 
Method Summary
protected  RemoteLoadTest doConnect(ClientInfo clientInfo)
          Establishes the actual client connection.
protected  void doDisconnect(RemoteLoadTest connection)
          Disconnects the given connection.
 int getServerLoad()
          Not implemented!
static void main(String[] arguments)
          Runs a new LoadTestServer server.
 
Methods inherited from class org.jminor.common.server.AbstractRemoteServer
connect, connect, connectionsAvailable, containsConnection, disconnect, getConnection, getConnectionCount, getConnectionLimit, getConnections, getServerName, getServerPort, handleShutdown, isShuttingDown, setConnectionLimit, setLoginProxy, shutdown
 
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, unexportObject
 
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

SERVER_NAME

public static final String SERVER_NAME
See Also:
Constant Field Values
Constructor Detail

RemoteLoadTestServer

public RemoteLoadTestServer(int serverPort,
                            int loadTestPort,
                            String serverName)
                     throws RemoteException
Instantiates and exports a new LoadTestServer.

Parameters:
serverPort - the port on which to serve clients
loadTestPort - the port on which to export the load tests
serverName - the name of this server
Throws:
RemoteException - in case of a remote exception
Method Detail

doConnect

protected RemoteLoadTest doConnect(ClientInfo clientInfo)
                            throws RemoteException
Establishes the actual client connection.

Specified by:
doConnect in class AbstractRemoteServer<RemoteLoadTest>
Parameters:
clientInfo - the client info
Returns:
a connection servicing the given client
Throws:
RemoteException - in case of an exception

doDisconnect

protected void doDisconnect(RemoteLoadTest connection)
                     throws RemoteException
Disconnects the given connection.

Specified by:
doDisconnect in class AbstractRemoteServer<RemoteLoadTest>
Parameters:
connection - the connection to disconnect
Throws:
RemoteException - in case of an exception

getServerLoad

public int getServerLoad()
                  throws RemoteException
Not implemented!

Returns:
0
Throws:
UnsupportedOperationException - consistently
RemoteException - in case of a remote exception

main

public static void main(String[] arguments)
                 throws Exception
Runs a new LoadTestServer server.

Parameters:
arguments - no arguments required
Throws:
Exception - in case of an exception