|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Represents a server type from which server instances can be created.
The server core framework supports
an open-ended set of server types, which are contributed via
the serverTypes
extension point in the server core
plug-in. Server type objects carry no state (all information is
read-only and is supplied by the server type declaration).
The global list of known server types is available via
ServerCore.getServerTypes()
.
This interface is not intended to be implemented by clients.
Two server types are identical if and only if they have the same id.
Method Summary | |
---|---|
IServerWorkingCopy |
createServer(java.lang.String id,
IFile file,
IProgressMonitor monitor)
Creates a working copy instance of this server type. |
IServerWorkingCopy |
createServer(java.lang.String id,
IFile file,
IRuntime runtime,
IProgressMonitor monitor)
Creates an working copy instance of this server type. |
java.lang.String |
getDescription()
Returns the displayable description for this server type. |
java.lang.String |
getId()
Returns the id of this server type. |
java.lang.String |
getName()
Returns the displayable name for this server type. |
IRuntimeType |
getRuntimeType()
Returns the type of server runtime that this type of server requires. |
boolean |
hasRuntime()
Returns whether this type of server requires a server runtime. |
boolean |
hasServerConfiguration()
Returns whether this type of server requires a server configuration. |
boolean |
supportsLaunchMode(java.lang.String launchMode)
Returns whether this type of server supports the given launch mode. |
boolean |
supportsRemoteHosts()
Returns true if this type of server can run on a remote host. |
Method Detail |
public java.lang.String getId()
public java.lang.String getName()
Note that this name is appropriate for the current locale.
public java.lang.String getDescription()
Note that this description is appropriate for the current locale.
public IRuntimeType getRuntimeType()
[issue: "runtimeTypeId" is mandatory according the serverTypes schema. This suggests that all types of servers have a server runtime. But there is also a boolean "runtime" attribute indicating whether the server requires a runtime. I supect that server type has an optional server runtime, in which case you can make "runtimeTypeId" optional and dispense with "runtime".]
[issue: Does it really make sense for runtimeTypes and serverTypes be separate extension points? Would it not be sufficient to have the party declaring the server type also declare the server runtime type? Having runtimeType as a separate extension point only makes sense if it would be possible in principle to declare a server runtime type that could actually be used on serveral server types. If server runtimes always end up being server-type specific, it would be better to combine them.]
[issue: What should happen when a server type mentions the id of a server runtime type that is not known to the system?]
public boolean hasRuntime()
[issue: See issues on getRuntimeType(). I suspect this method is unnecessary, and that this.getRuntimeType() != null will do.]
true
if this type of server requires
a server runtime, and false
if it does notgetRuntimeType()
public boolean supportsLaunchMode(java.lang.String launchMode)
[issue: It also seems odd that this is part of the server type declaration. This means that any server type has to commit so early on which modes it supports.]
launchMode
- a mode in which a server can be launched,
one of the mode constants defined by
org.eclipse.debug.core.ILaunchManager
public boolean hasServerConfiguration()
[issue: It's not clear how this method differs from this.getServerConfigurationType() != null]
true
if this type of server requires
a server configuration, and false
if it does notpublic boolean supportsRemoteHosts()
true
if this type of server can run on a remote host.
Returns false
if the server type can only be run on "localhost"
(the local machine).
true
if this type of server can run on
a remote host, and false
if it cannotpublic IServerWorkingCopy createServer(java.lang.String id, IFile file, IRuntime runtime, IProgressMonitor monitor) throws CoreException
IServerWorkingCopy.save(boolean, IProgressMonitor)
to bring the server instance into existence.
[issue: Why is a runtime passed in? IServerWorkingCopy.setRuntime(runtime) could be called on the result to accomplish the same thing.]
[issue: The implementation of this method never creates a server config working copy, whereas the other one does!?] Consider combining the method with the other.]
The server returned from this method will have it's host set to "localhost". Other defaults will be set by calling the server delegate's setDefaults() method.
id
- the id to assign to the server instance; a generated
id is used if id is null
or an empty stringfile
- the file in the workspace where the server instance
is to be serialized, or null
if the information is
instead to be persisted with the workspace but not with any
particular workspace resourceruntime
- the runtime to associate with the server instance,
or null
if nonemonitor
- a progress monitor, or null
if progress
reporting and cancellation are not desired
CoreException
- if an exception occurs while creating this runtime
or setting it's default valuespublic IServerWorkingCopy createServer(java.lang.String id, IFile file, IProgressMonitor monitor) throws CoreException
IServerWorkingCopy.save(boolean, IProgressMonitor)
to bring the server instance into existence.
[issue: Since this method just creates a working copy, it's not clear the operation is long-running and in need of a progress monitor.]
The server returned from this method will have it's host set to "localhost". Other defaults will be set by calling the server delegate's setDefaults() method.
[issue: The implementation of this method creates a server config working copy, whereas the other one does not!? Consider combining the method with the other.]
id
- the id to assign to the server instance; a generated
id is used if id is null
or an empty stringfile
- the file in the workspace where the server instance
is to be serialized, or null
if the information is
instead to be persisted with the workspace but not with any
particular workspace resourcemonitor
- a progress monitor, or null
if progress
reporting and cancellation are not desired
CoreException
- if an exception occurs while creating this runtime
or setting it's default values
|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |