appl.parallel.starter.server
Class XuluServerStarter

java.lang.Object
  extended by java.rmi.server.RemoteObject
      extended by java.rmi.server.RemoteServer
          extended by java.rmi.server.UnicastRemoteObject
              extended by appl.parallel.starter.server.XuluServerStarter
All Implemented Interfaces:
Starter, ActionListener, Serializable, Remote, EventListener

public class XuluServerStarter
extends UnicastRemoteObject
implements Starter, ActionListener

A running instance of the XuluServerStarter waits for a signal to start a XuluServer. When start() is called the Server is started. All output from the new Serverprocess are forwarded to the actual screen (if any). The Server can also be restarted or stopped.

For configuration of the XuluServer the XuluConfig is used. The following configuration entries are supported

Entry Default Description
XuluServerStarter.port 1099 The port which is used for the registry creation (if none is running)
XuluServerStarter.javaprogram java The path to the java program
XuluServerStarter.codebasedir The absolute path to the codebase directory (should be the path to the binaries)
XuluServerStarter.securitypolicy The path to the security policy
XuluServerStarter.furtherjavaarguments further JVM arguments
XuluServerStarter.classpath The libaries needed
XuluServerStarter.memorymax 64 The maximum memory the XuluSever attempts to use (-xmx)
XuluServerStarter.memorymin 4 The inital memory the XuluServer uses (-xms)

Author:
Dominik Appl
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Method Summary
 void actionPerformed(ActionEvent e)
           
 void bind(String bindingName, Remote bindingInstance, int defaultPort)
          Copied from Helper and modified so that it does not depend on log4j.
 boolean isRunning()
           
static void main(String[] args)
          Starts the XuluServerStarter
The parameter -start can be used to start the Server at launch of the Starter.
 void restart()
          restarts the process
 void start()
          Creates the Java commandline and starts the XuluServer
 void stop()
          stops the process
 
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
 

Method Detail

restart

public void restart()
             throws RemoteException
Description copied from interface: Starter
restarts the process

Specified by:
restart in interface Starter
Throws:
RemoteException

start

public void start()
           throws RemoteException
Creates the Java commandline and starts the XuluServer

Specified by:
start in interface Starter
Throws:
RemoteException
See Also:
Starter.start()

stop

public void stop()
          throws RemoteException
Description copied from interface: Starter
stops the process

Specified by:
stop in interface Starter
Throws:
RemoteException

main

public static void main(String[] args)
Starts the XuluServerStarter
The parameter -start can be used to start the Server at launch of the Starter.
The parameter -cmd will use the given command to try to start the server. Else the XuluConfig will be used.
The parameter -noGUI forces the starter to not use any GUI functionality.


isRunning

public boolean isRunning()
                  throws RemoteException
Specified by:
isRunning in interface Starter
Returns:
true, if the process is running
Throws:
RemoteException

bind

public void bind(String bindingName,
                 Remote bindingInstance,
                 int defaultPort)
          throws RemoteException
Copied from Helper and modified so that it does not depend on log4j. Binds the remote object's stub in the registry. Creates a registry if no running registry is found.

Parameters:
bindingName - the name to be used for binding
bindingInstance - an instance of the type to bind to the registry
defaultPort - the default registry port
Throws:
RemoteException - if something goes wrong

actionPerformed

public void actionPerformed(ActionEvent e)
Specified by:
actionPerformed in interface ActionListener