|
SmartFrog 3.10.000 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.smartfrog.sfcore.reference.RemoteReferenceResolverHelperImpl
org.smartfrog.sfcore.prim.PrimImpl
org.smartfrog.services.os.runshell.RunShellImpl
public class RunShellImpl
This class implements the Compound interface because it can "contain" Virtual Hosts components. The Apache interface is the Remoteable interface and the Runnable interface is used to monitor the httpd process. The httpd process is started in sfStart by setting the apacheState variable to true and ended in sfTerminate by setting the apacheState variable to false. The Internet Activator scripts are used to edit the httpd.conf file. These rely on certain environment variables being set, these variables are defined in the sf file and are passed to the common.executeScript() method. Adding them to the sf file avoids the need to hard code these paramters. The scripts are downloaded from a webserver and are then saved locally.
| Field Summary | |
|---|---|
protected OutputStreamIntf |
outputStreamObj
Output stream consumer. |
protected java.lang.String |
workDir
The String for working directory. |
| Fields inherited from class org.smartfrog.sfcore.prim.PrimImpl |
|---|
refLivenessDelay, refLivenessFactor, sfCompleteName, sfContext, sfDeployHooks, sfDeployWithHooks, sfExportRef, sfIsDeployed, sfIsStarted, sfIsTerminated, sfIsTerminating, sfLivenessCount, sfLivenessDelay, sfLivenessFactor, sfLivenessSender, sfParent, sfStartHooks, sfTerminateWithHooks, termLock |
| Fields inherited from interface org.smartfrog.services.os.runshell.RunShell |
|---|
varCMDs, varDelayBetweenCmds, varEnvProp, varErrorMsgTo, varErrorStreamTo, varExitCmd, varExitValue, varLineReturn, varLogger, varOutputMsgTo, varOutputStreamTo, varPrintStack, varSFProcessId, varSFProcessName, varSFWorkDir, varShellArguments, varShellCommand, varShouldDetach, varShouldTerminate, varStatus, varTerminateOnFailure, varUseExitCmd, varWaitSignalGoAhead |
| Constructor Summary | |
|---|---|
RunShellImpl()
Constructor. |
|
| Method Summary | |
|---|---|
void |
execBatch(java.util.Vector cmds)
Exceutes the batch of commands. |
void |
execCmd(java.lang.String cmd)
Executes the given command. |
java.lang.String |
getNotifierId()
Gets the identity of the notifier process. |
protected void |
readSFAttributes()
Reads SF description = initial configuration. |
void |
run()
Main processing method for the RunProcess object. |
void |
sfDeploy()
This method retrieves the paramters from the .sf file. |
void |
sfStart()
This sets a flag that will start the httpd process running. |
void |
sfTerminateWith(TerminationRecord tr)
This shuts down Apache by requesting that the ApacheState variable be set to false. |
| Methods inherited from class org.smartfrog.sfcore.reference.RemoteReferenceResolverHelperImpl |
|---|
sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolveWithParser |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.smartfrog.sfcore.prim.Prim |
|---|
sfAddAttribute, sfAttributeKeyFor, sfAttributes, sfCompleteName, sfContainsAttribute, sfContainsValue, sfContext, sfDeployedHost, sfDeployedProcessName, sfDeployWith, sfDetach, sfDetachAndTerminate, sfDumpState, sfIsDeployed, sfIsStarted, sfIsTerminated, sfIsTerminating, sfParent, sfParentageChanged, sfRemoveAttribute, sfReplaceAttribute, sfTerminate, sfTerminatedWith, sfTerminateQuietlyWith, sfValues |
| Methods inherited from interface org.smartfrog.sfcore.prim.Liveness |
|---|
sfPing |
| Methods inherited from interface org.smartfrog.sfcore.reference.RemoteReferenceResolver |
|---|
sfResolve, sfResolve, sfResolveHere, sfResolveHere, sfResolveParent |
| Methods inherited from interface org.smartfrog.sfcore.reference.RemoteReferenceResolverHelper |
|---|
sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolveWithParser |
| Methods inherited from interface org.smartfrog.sfcore.prim.Diagnostics |
|---|
sfDiagnosticsReport |
| Field Detail |
|---|
protected java.lang.String workDir
protected OutputStreamIntf outputStreamObj
| Constructor Detail |
|---|
public RunShellImpl()
throws java.rmi.RemoteException
java.rmi.RemoteException - In case of network/rmi error| Method Detail |
|---|
public void sfDeploy()
throws SmartFrogException,
java.rmi.RemoteException
sfDeploy in interface PrimsfDeploy in class PrimImplSmartFrogException - deployment failure
java.rmi.RemoteException - In case of network/rmi errorpublic void run()
run in interface java.lang.Runnable
protected void readSFAttributes()
throws SmartFrogException,
java.rmi.RemoteException
SmartFrogException
java.rmi.RemoteException
public void sfStart()
throws SmartFrogException,
java.rmi.RemoteException
sfStart in interface PrimsfStart in class PrimImplSmartFrogException - starting failure
java.rmi.RemoteException - In cas eof network/rmi errorpublic void sfTerminateWith(TerminationRecord tr)
sfTerminateWith in class PrimImpltr - TerminationRecord objectpublic void execCmd(java.lang.String cmd)
execCmd in interface RunShellcmd - command to be exceutedpublic void execBatch(java.util.Vector cmds)
execBatch in interface RunShellcmds - vector of commands to be executedpublic java.lang.String getNotifierId()
|
SmartFrog CORE 3.10.000 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||