Skip to main content
summaryrefslogtreecommitdiffstats
blob: db6eb7cf8acab936654081901cba35c770eacaee (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/*******************************************************************************
 * Copyright (c) 2008 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/

package org.eclipse.help.server;
import org.eclipse.core.runtime.CoreException;

/**
 * @since 3.4
 * Abstract class representing a web server which can be used to host the Eclipse help
 * system using the extension point org.eclipse.help.base.server. Classes extending this
 * abstract class must be capable of launching a Web Server and
 */

public abstract class HelpServer {

	/**
	 * Start a server application to host the Eclipse help system. The server is
	 * responsible for initializing the servlets, jsp files and other resources
	 * for the help system as defined by the extension points <code>org.eclipse.equinox.http.registry.resources</code>
	 * and <code>org.eclipse.equinox.http.registry.servlets</code> for the httpcontextId
	 * <code>org.eclipse.help.webapp.help</code>
	 * @param webappName The name of this web application
	 * @throws Exception
	 */
	public abstract void start(String webappName) throws Exception;

	/**
	 * Stop a server application. If an application of this name has not been started do nothing
	 * @param webappName the name of a running web application
	 * @throws CoreException
	 */
    public abstract void stop(String webappName) throws CoreException ;

	/**
	* Returns the port number the app server listens on
	* @return integer port number, 0 if server not started
	*/
    public abstract int getPort();


	/**
	* Returns the host name or ip the app server runs on.
	*
	* @return String representation of host name of IP, null if server not
	*         started yet
	*/
    public abstract String getHost();
}

Back to the top