com.borland.jbuilder.runtime.servlet
Interface ServerSetup


public interface ServerSetup

Provides and verifies the setup for a particular web server/servlet engine, and acts as a factory for corresponding ServerStarter objects. Implementations should be OpenTools that register an instance with the ServerManager at startup (by implementing initOpenTool as well).


Method Summary
 boolean attemptDefaultConfiguration()
          If implemented, should try to set up server by guessing where the JARs are, based on where JBuilder is installed and the default install location of the server.
 boolean configure()
          Called when isConfigured (and attemptDefaultConfiguration) returns false so that UI may be presented to the user for manual configuration.
 java.lang.String getClassPath()
          The server JARs must be included in the classpath to actually start the server.
 java.lang.String getJspImplementationClass()
          CodeInsight for JSPs needs the name of the base JSP implementation class, e.g.
 java.lang.String[] getPackages()
          The debugger needs the names of the packages that comprise the server so that tracing for those classes can be disabled.
 java.lang.String getSourcePath()
          The source path to the web server is used for JSP CodeInsight, to show descriptive parameter names instead of p0, p1, etc.
 boolean isConfigured()
          Checks that the server can be started; in particular by knowing where the server JARs are.
 ServerStarter newStarter()
          Factory method that returns a new instance of a ServerStarter associated with this particular server setup.
 

Method Detail

isConfigured

public boolean isConfigured()
Checks that the server can be started; in particular by knowing where the server JARs are.
Returns:
whether server is set up.

attemptDefaultConfiguration

public boolean attemptDefaultConfiguration()
If implemented, should try to set up server by guessing where the JARs are, based on where JBuilder is installed and the default install location of the server. This method will be called on-demand the first time the server is used; for example, the server is executed, or the project's run configuration is edited. After that, it will never be called if isConfigured returns true.
Returns:
whether setup was successful. If not implemented, must return false.
See Also:
com.borland.primetime.properties.PropertyManager.getInstallRootUrl()

configure

public boolean configure()
Called when isConfigured (and attemptDefaultConfiguration) returns false so that UI may be presented to the user for manual configuration. Also called from the run configuration dialog box when the user chooses to setup the server.
Returns:
whether setup was successful.

getClassPath

public java.lang.String getClassPath()
The server JARs must be included in the classpath to actually start the server. Also, if any glue code is needed (for example, SHTML support for JSWDK is provided by ShtmlLoader/ShtmlLoaderEcho in com.borland.primetime.runtime.servlet), entries that point to that code must also be included in the classpath.

This path is also used for JSP CodeInsight.

Returns:
classpath string (using platform separators) containing JARs and paths for the server, suitable for insertion in a command-line. If no classpath is set, return an empty string.

getSourcePath

public java.lang.String getSourcePath()
The source path to the web server is used for JSP CodeInsight, to show descriptive parameter names instead of p0, p1, etc.
Returns:
source path string (using platform separators) containing JARs and paths for the server, suitable for insertion in a command-line. If no source path is set, return an empty string.

getPackages

public java.lang.String[] getPackages()
The debugger needs the names of the packages that comprise the server so that tracing for those classes can be disabled. The package names may include a trailing asterisk as a wildcard, e.g. "org.apache.tomcat.*"
Returns:
array of package names

getJspImplementationClass

public java.lang.String getJspImplementationClass()
CodeInsight for JSPs needs the name of the base JSP implementation class, e.g. "com.sun.jsp.runtime.HttpJspBase" for JSWDK
Returns:
fully-qualified class name

newStarter

public ServerStarter newStarter()
Factory method that returns a new instance of a ServerStarter associated with this particular server setup.
Returns:
a new instance