fr.paris5.shaman.system
Class ServerController

java.lang.Object
  |
  +--fr.paris5.shaman.system.ServerController
Direct Known Subclasses:
InsightServerController, TomcatServerController

public abstract class ServerController
extends java.lang.Object

Handles the lifecyle of a server. Does interfere with a already-running server.

Version:
$Id: ServerController.java,v 1.3 2002/07/04 10:05:16 caillette Exp $
Author:
Laurent Caillette

Field Summary
private static int INTERNAL_ERROR
           
private static int READY
           
private static int SERVER_ALREADY_RUNNING
           
private static int SERVER_STARTED
           
private static int SERVER_STOPPED
           
private  SystemDirectory.ServerKey serverKey
           
private  ServerSystem serverSystem
           
private  int state
           
 
Constructor Summary
ServerController(ServerSystem serverSystem, SystemDirectory.ServerKey serverKey)
           
 
Method Summary
protected  void doShutdown(java.util.Properties antUserProperties)
           
protected  void doStartup(java.util.Properties antUserProperties)
           
 void executeDeploy(java.util.Properties antUserProperties)
           
 void executeStartTarget(java.util.Properties antUserProperties)
          Launches the Ant task in a separate thread, since sometimes it returns only after server shutdown.
 void executeStopTarget(java.util.Properties antUserProperties)
           
 SystemDirectory.ServerKey getServerKey()
           
 ServerSystem getServerSystem()
           
protected abstract  boolean isRunning(java.util.Properties antUserProperties)
           
 void shutdown(java.util.Properties antUserProperties)
           
 void startup(java.util.Properties antUserProperties)
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

serverSystem

private final ServerSystem serverSystem

serverKey

private final SystemDirectory.ServerKey serverKey

state

private int state

READY

private static final int READY

SERVER_ALREADY_RUNNING

private static final int SERVER_ALREADY_RUNNING

SERVER_STARTED

private static final int SERVER_STARTED

SERVER_STOPPED

private static final int SERVER_STOPPED

INTERNAL_ERROR

private static final int INTERNAL_ERROR
Constructor Detail

ServerController

public ServerController(ServerSystem serverSystem,
                        SystemDirectory.ServerKey serverKey)
Method Detail

getServerSystem

public final ServerSystem getServerSystem()

getServerKey

public final SystemDirectory.ServerKey getServerKey()

executeDeploy

public final void executeDeploy(java.util.Properties antUserProperties)
                         throws java.lang.Exception

isRunning

protected abstract boolean isRunning(java.util.Properties antUserProperties)

startup

public final void startup(java.util.Properties antUserProperties)
                   throws java.lang.Exception

doStartup

protected void doStartup(java.util.Properties antUserProperties)
                  throws java.lang.Exception

shutdown

public final void shutdown(java.util.Properties antUserProperties)
                    throws java.lang.Exception

doShutdown

protected void doShutdown(java.util.Properties antUserProperties)
                   throws java.lang.Exception

executeStartTarget

public final void executeStartTarget(java.util.Properties antUserProperties)
                              throws java.lang.Exception
Launches the Ant task in a separate thread, since sometimes it returns only after server shutdown.
Parameters:
antUserProperties -  
Throws:
java.lang.Exception -  

executeStopTarget

public final void executeStopTarget(java.util.Properties antUserProperties)
                             throws java.lang.Exception


Copyright © 2002 Laurent Caillette and l'Université René Descartes, Paris 5. All rights reserved.