org.netbeans.modules.j2ee.deployment.plugins.api
Class StartServer

java.lang.Object
  extended by org.netbeans.modules.j2ee.deployment.plugins.api.StartServer

public abstract class StartServer
extends Object

Server lifecycle services from the IDE. J2eeserver will use these services to automatically start or stop admin server and managed (virtual) target servers (in debug mode) during deployment or debugging execution.

See Also:
OptionalDeploymentManagerFactory

Constructor Summary
StartServer()
           
 
Method Summary
 boolean canStopDeploymentManagerSilently()
          See stopDeploymentManagerSilently
abstract  ServerDebugInfo getDebugInfo(javax.enterprise.deploy.spi.Target target)
          Returns the host/port necessary for connecting to the server's debug information.
abstract  boolean isAlsoTargetServer(javax.enterprise.deploy.spi.Target target)
          Returns true if the admin server is also the given target server (share the same vm).
abstract  boolean isDebuggable(javax.enterprise.deploy.spi.Target target)
          Returns true if the given target is in debug mode.
abstract  boolean isRunning()
          Returns true if this admin server is running.
 boolean isRunning(javax.enterprise.deploy.spi.Target target)
          Returns the running state of a specific target.
 boolean needsRestart(javax.enterprise.deploy.spi.Target target)
          Returns true if target server needs a restart for last configuration changes to take effect.
abstract  boolean needsStartForAdminConfig()
          Returns true if the admin server should be started before admininistrative configuration.
abstract  boolean needsStartForConfigure()
          Returns true if the admin server should be started before server deployment configuration.
abstract  boolean needsStartForTargetList()
          Returns true if the admin server should be started before asking for target list.
abstract  javax.enterprise.deploy.spi.status.ProgressObject startDebugging(javax.enterprise.deploy.spi.Target target)
          Start or restart the target in debug mode.
abstract  javax.enterprise.deploy.spi.status.ProgressObject startDeploymentManager()
          Starts the admin server.
 javax.enterprise.deploy.spi.status.ProgressObject startProfiling(javax.enterprise.deploy.spi.Target target, ProfilerServerSettings settings)
          Start the target in profile mode, null target implies the admin server.
 javax.enterprise.deploy.spi.status.ProgressObject startTarget(javax.enterprise.deploy.spi.Target target)
          Starts the target server asynchronously and reports the status through the returned ProgressObject.
abstract  javax.enterprise.deploy.spi.status.ProgressObject stopDeploymentManager()
          Stops the admin server.
 void stopDeploymentManagerSilently()
          Optional method.
 javax.enterprise.deploy.spi.status.ProgressObject stopTarget(javax.enterprise.deploy.spi.Target target)
          Stops the target server asynchronously and reports the status through the returned ProgressObject.
 boolean supportsStartDebugging(javax.enterprise.deploy.spi.Target target)
          Can be the specified target server started in the debug mode? If the target is also an admin server can be the admin server started in the debug mode?
abstract  boolean supportsStartDeploymentManager()
          Returns true if the admin server can be started through this spi.
 boolean supportsStartProfiling(javax.enterprise.deploy.spi.Target target)
          Can be the specified target server started in profile mode? If the target is also an admin server can be the admin server started in profile mode?
 boolean supportsStartTarget(javax.enterprise.deploy.spi.Target target)
          Returns if the plugin can start/stop single target servers.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StartServer

public StartServer()
Method Detail

isAlsoTargetServer

public abstract boolean isAlsoTargetServer(javax.enterprise.deploy.spi.Target target)
Returns true if the admin server is also the given target server (share the same vm). Start/stopping/debug apply to both servers. When the given target server is null, service should return true when admin server is also some target.

Parameters:
target - the target server in question; could be null.
Returns:
true when admin is also target server

supportsStartDeploymentManager

public abstract boolean supportsStartDeploymentManager()
Returns true if the admin server can be started through this spi.


supportsStartTarget

public boolean supportsStartTarget(javax.enterprise.deploy.spi.Target target)
Returns if the plugin can start/stop single target servers. This should be overwritten as needed.

Parameters:
target - the target server in question, could be null in which case the answer should probably be false.
Returns:
true if this plugin can currently handle state management for the specific target.
Since:
1.6

supportsStartDebugging

public boolean supportsStartDebugging(javax.enterprise.deploy.spi.Target target)
Can be the specified target server started in the debug mode? If the target is also an admin server can be the admin server started in the debug mode?

Parameters:
target - the target server in question, null implies the case where target is also an admin server.
Returns:
true if the target server can be started in the debug mode, false otherwise. The default return value is false.
Since:
1.7

supportsStartProfiling

public boolean supportsStartProfiling(javax.enterprise.deploy.spi.Target target)
Can be the specified target server started in profile mode? If the target is also an admin server can be the admin server started in profile mode?

Parameters:
target - the target server in question, null implies the case where target is also an admin server.
Returns:
true if the target server can be started in profile mode, false otherwise. The default return value is false.
Since:
1.9

startDeploymentManager

public abstract javax.enterprise.deploy.spi.status.ProgressObject startDeploymentManager()
Starts the admin server. Note that this means that the DeploymentManager was originally created disconnected. After calling this, the DeploymentManager will be connected, so any old cached DeploymentManager will be discarded. All diagnostics should be communicated through ProgressObject without exceptions thrown.

Returns:
ProgressObject object used to monitor start server progress

stopDeploymentManager

public abstract javax.enterprise.deploy.spi.status.ProgressObject stopDeploymentManager()
Stops the admin server. The DeploymentManager object will be disconnected. All diagnostic should be communicated through ServerProgres with no exceptions thrown.

Returns:
ServerProgress object used to monitor start server progress

stopDeploymentManagerSilently

public void stopDeploymentManagerSilently()
Optional method. This implementation does nothing. Stops the admin server. The DeploymentManager object will be disconnected. The call should terminate immediately and not wait for the server to stop.
This will be used at IDE shutdown so that the server shutdown does not block the IDE.


canStopDeploymentManagerSilently

public boolean canStopDeploymentManagerSilently()
See stopDeploymentManagerSilently

Returns:
override and return true if stopDeploymentManagerSilently is implemented

needsStartForConfigure

public abstract boolean needsStartForConfigure()
Returns true if the admin server should be started before server deployment configuration.


needsStartForTargetList

public abstract boolean needsStartForTargetList()
Returns true if the admin server should be started before asking for target list.


needsStartForAdminConfig

public abstract boolean needsStartForAdminConfig()
Returns true if the admin server should be started before admininistrative configuration.


isRunning

public abstract boolean isRunning()
Returns true if this admin server is running.


isRunning

public boolean isRunning(javax.enterprise.deploy.spi.Target target)
Returns the running state of a specific target. This should be overwritten by plugins which support multiple target servers via one admin server.

Parameters:
target - the target server in question; null value implies the query is against the admin server.
Returns:
true if the server is question is running.
Since:
1.6

isDebuggable

public abstract boolean isDebuggable(javax.enterprise.deploy.spi.Target target)
Returns true if the given target is in debug mode.


startTarget

public javax.enterprise.deploy.spi.status.ProgressObject startTarget(javax.enterprise.deploy.spi.Target target)
Starts the target server asynchronously and reports the status through the returned ProgressObject. This should be overwritten by plugins which support the state management of different target servers.

Parameters:
target - a non-null target server to be started
Returns:
a ProgressObject which is used to communicate the progess/state of this action. Should not be null when supportsStartTarget returns true on same target.
Since:
1.6

stopTarget

public javax.enterprise.deploy.spi.status.ProgressObject stopTarget(javax.enterprise.deploy.spi.Target target)
Stops the target server asynchronously and reports the status through the returned ProgressObject. This should be overwritten by plugins which support the state management of different target servers.

Parameters:
target - a non-null target server to be stopped
Returns:
a ProgressObject which is used to communicate the progess/state of this action. Should not be null when supportsStartTarget return true on the same target.
Since:
1.6

startDebugging

public abstract javax.enterprise.deploy.spi.status.ProgressObject startDebugging(javax.enterprise.deploy.spi.Target target)
Start or restart the target in debug mode. If target is also domain admin, the amdin is restarted in debug mode. All diagnostic should be communicated through ServerProgres with no exceptions thrown.

Parameters:
target - the target server
Returns:
ServerProgress object to monitor progress on start operation

startProfiling

public javax.enterprise.deploy.spi.status.ProgressObject startProfiling(javax.enterprise.deploy.spi.Target target,
                                                                        ProfilerServerSettings settings)
Start the target in profile mode, null target implies the admin server.

Parameters:
target - the target server in question, null target implies the admin server.
settings - profiler server settings.
Returns:
ServerProgress object to monitor progress on start operation.
Since:
1.9

getDebugInfo

public abstract ServerDebugInfo getDebugInfo(javax.enterprise.deploy.spi.Target target)
Returns the host/port necessary for connecting to the server's debug information.


needsRestart

public boolean needsRestart(javax.enterprise.deploy.spi.Target target)
Returns true if target server needs a restart for last configuration changes to take effect. Implementation should override when communication about this server state is needed.

Parameters:
target - target server; null implies the case where target is also admin server.

 

Built on March 27 2006.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.