|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.wst.server.core.ServerCore
public final class ServerCore
Main class for server core API.
This class provides API to access most of the types in the server framework, including server runtimes and servers. The methods on this class are thread safe.
This class provides all its functionality through static members. It is not intended to be subclassed or instantiated.
Method Summary | |
---|---|
static void |
addRuntimeLifecycleListener(IRuntimeLifecycleListener listener)
Adds a new runtime lifecycle listener. |
static void |
addServerLifecycleListener(IServerLifecycleListener listener)
Adds a new server lifecycle listener. |
static IRuntime |
findRuntime(java.lang.String id)
Returns the runtime with the given id, or null
if none. |
static IRuntimeType |
findRuntimeType(java.lang.String id)
Returns the runtime type with the given id, or null
if none. |
static IServer |
findServer(java.lang.String id)
Returns the server with the given id, or null
if none. |
static IServerType |
findServerType(java.lang.String id)
Returns the server type with the given id, or null
if none. |
static IServer |
getDefaultServer(IModule module)
Returns the preferred runtime server for the given module. |
static IProjectProperties |
getProjectProperties(org.eclipse.core.resources.IProject project)
Deprecated. Project facet support should now be used instead of this API. @see org.eclipse.wst.common.project.facet.core.IFacetedProject#getRuntime() |
static IRuntime[] |
getRuntimes()
Returns an array of all known runtime instances. |
static IRuntimeType[] |
getRuntimeTypes()
Returns an array of all known runtime types. |
static IServer[] |
getServers()
Returns an array of all known server instances. |
static IServerType[] |
getServerTypes()
Returns an array of all known server types. |
static void |
removeRuntimeLifecycleListener(IRuntimeLifecycleListener listener)
Removes a runtime lifecycle listener. |
static void |
removeServerLifecycleListener(IServerLifecycleListener listener)
Removes a server lifecycle listener. |
static void |
setDefaultServer(IModule module,
IServer server,
org.eclipse.core.runtime.IProgressMonitor monitor)
Sets the preferred runtime server for the given module. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static IProjectProperties getProjectProperties(org.eclipse.core.resources.IProject project)
project
- a project
public static IRuntimeType[] getRuntimeTypes()
A new array is returned on each call, so clients may store or modify the result.
IRuntimeType
public static IRuntimeType findRuntimeType(java.lang.String id)
null
if none. This convenience method searches the list of known
runtime types (getRuntimeTypes()
) for the one with a matching
runtime type id (IRuntimeType.getId()
). The id may not be null.
id
- the runtime type id
null
if there is no runtime type
with the given idpublic static IServerType[] getServerTypes()
A new array is returned on each call, so clients may store or modify the result.
IServerType
public static IServerType findServerType(java.lang.String id)
null
if none. This convenience method searches the list of known
server types (getServerTypes()
) for the one with a matching
server type id (IServerType.getId()
). The id may not be null.
id
- the server type id
null
if there is no server type
with the given idpublic static IRuntime findRuntime(java.lang.String id)
null
if none. This convenience method searches the list of known
runtimes (getRuntimes()
) for the one with a matching
runtime id (IRuntime.getId()
). The id may not be null.
id
- the runtime id
null
if there is no runtime
with the given idpublic static IRuntime[] getRuntimes()
A new array is returned on each call, so clients may store or modify the result.
IRuntime
public static IServer findServer(java.lang.String id)
null
if none. This convenience method searches the list of known
servers (getServers()
) for the one with a matching
server id (IServerAttributes.getId()
). The id must not be null.
id
- the server id
null
if there is no server
with the given idpublic static IServer[] getServers()
A new array is returned on each call, so clients may store or modify the result.
IServer
public static void addRuntimeLifecycleListener(IRuntimeLifecycleListener listener)
listener
- a runtime lifecycle listenerremoveRuntimeLifecycleListener(IRuntimeLifecycleListener)
public static void removeRuntimeLifecycleListener(IRuntimeLifecycleListener listener)
listener
- a runtime lifecycle listeneraddRuntimeLifecycleListener(IRuntimeLifecycleListener)
public static void addServerLifecycleListener(IServerLifecycleListener listener)
listener
- a server lifecycle listenerremoveServerLifecycleListener(IServerLifecycleListener)
public static void removeServerLifecycleListener(IServerLifecycleListener listener)
listener
- a server lifecycle listener
#addServerLifecycleListener(IServerLifecycleListener)public static IServer getDefaultServer(IModule module)
module
- a module
null
if there is no
default serverpublic static void setDefaultServer(IModule module, IServer server, org.eclipse.core.runtime.IProgressMonitor monitor) throws org.eclipse.core.runtime.CoreException
module
- the module to set the default forserver
- the server to set the default server, or null
to unset the defaultmonitor
- a progress monitor, or null
if progress
reporting and cancellation are not desired
org.eclipse.core.runtime.CoreException
- if there is a problem setting the default server
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |