|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthelma.main.Server
public class Server
Helma server main class.
Field Summary | |
---|---|
protected java.io.File |
hopHome
|
protected JettyServer |
jetty
|
boolean |
paranoid
|
long |
starttime
|
static java.lang.String |
version
|
protected org.apache.xmlrpc.WebServer |
xmlrpc
|
Constructor Summary | |
---|---|
Server(ServerConfig config)
Constructs a new Server instance with an array of command line options. |
Method Summary | |
---|---|
void |
checkAppManager(int port)
Make sure this server has an ApplicationManager (e.g. |
static void |
checkJavaVersion()
check if we are running on a Java 2 VM - otherwise exit with an error message |
static void |
checkRunning(ServerConfig config)
Check wheter a server is already running on any of the given ports - otherwise exit with an error message |
Application |
getApplication(java.lang.String name)
Get an Application by name |
java.lang.Object[] |
getApplications()
Get an Iterator over the applications currently running on this Server. |
java.io.File |
getAppsHome()
|
ResourceProperties |
getAppsProperties(java.lang.String appName)
Return the apps.properties entries for a given application |
static ServerConfig |
getConfig(java.lang.String[] args)
parse the command line arguments, read a given server.properties file and check the values given for server ports |
java.io.File |
getDbHome()
|
ResourceProperties |
getDbProperties()
Return the server-wide db.properties |
java.util.Vector |
getExtensions()
|
java.io.File |
getHopHome()
Get the Home directory of this server. |
org.apache.commons.logging.Log |
getLogger()
Get a logger to use for output in this server. |
ResourceProperties |
getProperties()
Return the server.properties for this server |
java.lang.String |
getProperty(java.lang.String key)
|
static Server |
getServer()
Get the main Server instance. |
static org.apache.xmlrpc.WebServer |
getXmlRpcServer()
Get the Server's XML-RPC web server. |
static void |
guessConfig(ServerConfig config)
get main property file from home dir or vice versa, depending on what we have |
void |
init()
initialize the server |
static void |
main(java.lang.String[] args)
static main entry point. |
static void |
parseArgs(ServerConfig config,
java.lang.String[] args)
parse argument list from command line and store values in given ServerConfig object |
static void |
printUsageError()
print the usage hints |
static void |
printUsageError(java.lang.String msg)
print the usage hints and prefix them with a message. |
void |
run()
The main method of the Server. |
void |
start()
|
void |
startApplication(java.lang.String name)
|
void |
stop()
|
void |
stopApplication(java.lang.String name)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String version
protected java.io.File hopHome
public final long starttime
public boolean paranoid
protected JettyServer jetty
protected org.apache.xmlrpc.WebServer xmlrpc
Constructor Detail |
---|
public Server(ServerConfig config)
Method Detail |
---|
public static void main(java.lang.String[] args)
public static void checkJavaVersion()
public static ServerConfig getConfig(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
- on any configuration errorpublic static void parseArgs(ServerConfig config, java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
- when argument can't be parsed into an InetAddrPort
or invalid token is given.public static void guessConfig(ServerConfig config) throws java.lang.Exception
java.lang.Exception
public static void printUsageError(java.lang.String msg)
public static void printUsageError()
public static void checkRunning(ServerConfig config)
public void init()
public void start()
public void stop()
public void run()
run
in interface java.lang.Runnable
public void checkAppManager(int port)
public java.lang.Object[] getApplications()
public Application getApplication(java.lang.String name)
public org.apache.commons.logging.Log getLogger()
public java.io.File getHopHome()
public static Server getServer()
public static org.apache.xmlrpc.WebServer getXmlRpcServer()
public java.lang.String getProperty(java.lang.String key)
key
- ...
public ResourceProperties getProperties()
public ResourceProperties getDbProperties()
public ResourceProperties getAppsProperties(java.lang.String appName)
appName
- the app name
public java.io.File getAppsHome()
public java.io.File getDbHome()
public java.util.Vector getExtensions()
public void startApplication(java.lang.String name)
name
- ...public void stopApplication(java.lang.String name)
name
- ...
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |