Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: dab445892a48175557fb626caad99373f677786d (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
57
58
59
60
61
62
63
/*******************************************************************************
 * Copyright (c) 2008, 2015 IBM Corporation and others.
 *
 * This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License 2.0
 * which accompanies this distribution, and is available at
 * https://www.eclipse.org/legal/epl-2.0/
 *
 * SPDX-License-Identifier: EPL-2.0
 *
 * 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 If anything prevented starting the server.
	 */
	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 If there was any error during stopping.
	 */
	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