|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.server.deploy.DeployController<I>
public abstract class DeployController<I extends DeployInstance>
DeployController controls the lifecycle of the DeployInstance.
| Field Summary | |
|---|---|
protected Lifecycle |
_lifecycle
|
static java.lang.String |
REDEPLOY_AUTOMATIC
|
static long |
REDEPLOY_CHECK_INTERVAL
|
static java.lang.String |
REDEPLOY_DEFAULT
|
static java.lang.String |
REDEPLOY_LAZY
|
static java.lang.String |
REDEPLOY_MANUAL
|
static java.lang.String |
STARTUP_AUTOMATIC
|
static java.lang.String |
STARTUP_DEFAULT
|
static java.lang.String |
STARTUP_LAZY
|
static java.lang.String |
STARTUP_MANUAL
|
| Constructor Summary | |
|---|---|
protected |
DeployController(java.lang.String id)
|
protected |
DeployController(java.lang.String id,
java.lang.ClassLoader parentLoader)
|
| Method Summary | |
|---|---|
void |
addLifecycleListener(LifecycleListener listener)
|
protected void |
addManifestClassPath()
Adds any manifest Class-Path |
protected void |
configureInstance(I deployInstance)
Configuration of the instance |
protected boolean |
destroy()
Destroys the entry. |
protected void |
expandArchive()
Deploys the entry, e.g. |
java.lang.Throwable |
getConfigException()
|
protected DeployControllerAdmin |
getDeployAdmin()
Returns the deploy admin. |
I |
getDeployInstance()
Returns the current instance. |
java.lang.String |
getId()
Returns the controller's id. |
protected java.util.logging.Logger |
getLog()
Returns the appropriate log for debugging. |
protected java.lang.String |
getMBeanId()
|
protected java.lang.String |
getMBeanTypeName()
|
java.lang.ClassLoader |
getParentClassLoader()
Returns the parent class loader. |
long |
getRedeployCheckInterval()
Gets the redeploy-check-interval |
java.lang.String |
getRedeployMode()
Returns the redeploy mode. |
long |
getStartTime()
Returns the start time of the entry. |
java.lang.String |
getStartupMode()
Returns the startup mode. |
int |
getStartupPriority()
Gets the startup priority. |
java.lang.String |
getState()
Returns the state name. |
void |
handleAlarm(Alarm alarm)
Handles the redeploy check alarm. |
boolean |
init()
Initialize the entry. |
protected void |
initBegin()
Initial calls for init. |
protected void |
initEnd()
Final calls for init. |
protected abstract I |
instantiateDeployInstance()
Creates an instance. |
boolean |
isActive()
Returns true if the instance is in the active state. |
boolean |
isActiveIdle()
Returns true if the instance has been idle for longer than its timeout. |
boolean |
isDestroyed()
Returns true if the entry is destroyed. |
boolean |
isError()
Return true if the instance is in the error state. |
boolean |
isErrorNow()
Returns true if there's currently an error. |
boolean |
isModified()
Returns true if the entry is modified. |
boolean |
isModifiedNow()
Returns true if the entry is modified. |
boolean |
isNameMatch(java.lang.String name)
Returns true if the entry matches. |
boolean |
isStopped()
Returns true if the instance is in the stopped state. |
boolean |
isStoppedLazy()
Returns true for the stop-lazy state |
boolean |
logModified(java.util.logging.Logger log)
Log the reason for modification |
protected void |
mergeController(DeployController oldController)
Merges with the old controller. |
void |
mergeRedeployCheckInterval(long interval)
Sets the redeploy-check-interval |
void |
mergeRedeployMode(java.lang.String mode)
Merge the redeploy mode. |
void |
mergeStartupMode(java.lang.String mode)
Merge the startup mode. |
I |
request()
Returns the instance for a top-level request |
void |
restart()
Force an instance restart from an admin command. |
void |
setRedeployCheckInterval(Period period)
Sets the redeploy-check-interval |
void |
setRedeployMode(java.lang.String mode)
Sets the redeploy mode. |
void |
setStartupMode(java.lang.String mode)
Sets the startup mode. |
void |
setStartupPriority(int priority)
Sets the startup priority. |
void |
start()
Force an instance start from an admin command. |
protected I |
startImpl()
Starts the entry. |
void |
startOnInit()
Redeploys the entry if it's modified. |
void |
stop()
Stops the controller from an admin command. |
I |
subrequest()
Returns the instance for a subrequest. |
static java.lang.String |
toRedeployCode(java.lang.String mode)
Converts redeploy mode to code. |
static java.lang.String |
toStartupCode(java.lang.String mode)
Converts startup mode to code. |
java.lang.String |
toString()
Returns the entry's debug name. |
void |
update()
Update the controller from an admin command. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String STARTUP_DEFAULT
public static final java.lang.String STARTUP_AUTOMATIC
public static final java.lang.String STARTUP_LAZY
public static final java.lang.String STARTUP_MANUAL
public static final java.lang.String REDEPLOY_DEFAULT
public static final java.lang.String REDEPLOY_AUTOMATIC
public static final java.lang.String REDEPLOY_LAZY
public static final java.lang.String REDEPLOY_MANUAL
public static final long REDEPLOY_CHECK_INTERVAL
protected final Lifecycle _lifecycle
| Constructor Detail |
|---|
protected DeployController(java.lang.String id)
protected DeployController(java.lang.String id,
java.lang.ClassLoader parentLoader)
| Method Detail |
|---|
public void addLifecycleListener(LifecycleListener listener)
public final java.lang.String getId()
public java.lang.ClassLoader getParentClassLoader()
public void setStartupMode(java.lang.String mode)
public void setStartupPriority(int priority)
public int getStartupPriority()
protected void mergeController(DeployController oldController)
public void mergeStartupMode(java.lang.String mode)
public java.lang.String getStartupMode()
public static java.lang.String toStartupCode(java.lang.String mode)
throws ConfigException
ConfigExceptionpublic void setRedeployMode(java.lang.String mode)
public void mergeRedeployMode(java.lang.String mode)
public java.lang.String getRedeployMode()
public static java.lang.String toRedeployCode(java.lang.String mode)
throws ConfigException
ConfigExceptionpublic void mergeRedeployCheckInterval(long interval)
public void setRedeployCheckInterval(Period period)
public long getRedeployCheckInterval()
public boolean isNameMatch(java.lang.String name)
public long getStartTime()
protected DeployControllerAdmin getDeployAdmin()
public final boolean init()
protected void initBegin()
protected void initEnd()
protected java.lang.String getMBeanTypeName()
protected java.lang.String getMBeanId()
public java.lang.String getState()
public boolean isActive()
public boolean isStopped()
public boolean isStoppedLazy()
public boolean isActiveIdle()
public boolean isError()
public boolean isErrorNow()
public boolean isModified()
isModified in interface Dependencypublic boolean logModified(java.util.logging.Logger log)
logModified in interface Dependencypublic boolean isModifiedNow()
public final I getDeployInstance()
public void startOnInit()
public final void start()
public java.lang.Throwable getConfigException()
public final void stop()
public final void restart()
public final void update()
public I request()
public I subrequest()
protected I startImpl()
protected void expandArchive()
throws java.lang.Exception
java.lang.Exceptionprotected abstract I instantiateDeployInstance()
protected void addManifestClassPath()
throws java.io.IOException
java.io.IOException
protected void configureInstance(I deployInstance)
throws java.lang.Throwable
java.lang.Throwablepublic void handleAlarm(Alarm alarm)
handleAlarm in interface AlarmListenerpublic boolean isDestroyed()
protected boolean destroy()
protected java.util.logging.Logger getLog()
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||