|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.wst.server.core.model.RuntimeDelegate
public abstract class RuntimeDelegate
A runtime delegate provides the implementation for various
generic and server-type-specific operations for a specific type of runtime.
A runtime delegate is specified by the
class
attribute of a runtimeTypes
extension.
When the runtime instance needs to be given a delegate, the delegate class
specified for the runtime type is instantiated with a 0-argument constructor
and primed with delegate.initialize(runtime)
,
which it is expected to hang on to. Later, when
delegate.dispose()
is called as the runtime instance is
being discarded, the delegate is expected to let go of the runtime instance.
RuntimeDelegate supports an open-ended set of attribute-value pairs. All state stored in this manner will be saved when the runtime working copy is saved, and persisted across workbench sessions. Runtime delegates may keep state in instance fields, but that state is transient and will not be persisted across workbench sessions. To save state across workbench sessions, it must be persisted using the attributes.
This abstract class is intended to be extended only by clients
to extend the runtimeTypes
extension point.
IRuntime
,
IRuntimeWorkingCopy
Constructor Summary | |
---|---|
RuntimeDelegate()
Delegates must have a public 0-arg constructor. |
Method Summary | |
---|---|
void |
dispose()
Disposes of this runtime delegate. |
IRuntime |
getRuntime()
Returns the runtime that this runtime delegate corresponds to. |
IRuntimeWorkingCopy |
getRuntimeWorkingCopy()
Returns the runtime working copy that this runtime delegate corresponds to. |
void |
setDefaults(IProgressMonitor monitor)
Initializes this runtime with default values. |
IStatus |
validate()
Validates this runtime instance. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RuntimeDelegate()
Method Detail |
---|
public final IRuntime getRuntime()
public final IRuntimeWorkingCopy getRuntimeWorkingCopy()
public IStatus validate()
This method is called by the web server core framework,
in response to a call to IRuntime.validate(IProgressMonitor)
.
Clients should never call this method.
IStatus.OK
if this
runtime is valid, otherwise a status object indicating what is
wrong with itpublic void dispose()
This method is called by the web server core framework. Clients should never call this method.
Implementations are expected to let go of the delegate's reference to the runtime, deregister listeners, etc.
public void setDefaults(IProgressMonitor monitor)
monitor
- a progress monitor, or null
if progress
reporting and cancellation are not desired
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |