Eclipse Platform
2.0

org.eclipse.help
Class AppServer

java.lang.Object
  |
  +--org.eclipse.help.AppServer

public class AppServer
extends Object

Singleton class for obtaining the platform app server.

Note: This class/interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.


Constructor Summary
AppServer()
           
 
Method Summary
static boolean add(String webAppName, String plugin, String path)
          Adds the specified webapp from a plugin.
static String getHost()
          Returns the host name or ip the app server runs on.
static int getPort()
          Returns the port number the app server listens on.
static boolean isRunning()
          Checks if the app server is running.
static void remove(String webApp, String plugin)
          Removes the specified webapp.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AppServer

public AppServer()
Method Detail

add

public static boolean add(String webAppName,
                          String plugin,
                          String path)
Adds the specified webapp from a plugin.

It is assumed that webapp names are unique. It is suggested to create unique web app names by prefixing them with the plugin id.

Parameters:
webAppName - the name of the web application (context name)
plugin - the plugin identifier of the webapp
path - the plugin relative path where the web app WAR or directory is located
Returns:
true if the webapp was added, false otherwise

remove

public static void remove(String webApp,
                          String plugin)
Removes the specified webapp.

Parameters:
webApp - the name of the web app
plugin - the plugin containg the web app. Not used now.

getHost

public static String getHost()
Returns the host name or ip the app server runs on.

Returns:
String representaion of host name of IP, null if server not started yet

getPort

public static int getPort()
Returns the port number the app server listens on.

Returns:
integer port number, 0 if server not started

isRunning

public static boolean isRunning()
Checks if the app server is running.

Returns:
true if the app server is running

Eclipse Platform
2.0

Copyright (c) IBM Corp. and others 2000, 2002. All Rights Reserved.