|
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.sfcore.compound.CompoundImpl
org.smartfrog.examples.dynamicwebserver.apache.ApacheImpl
public class ApacheImpl
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.
| Field Summary |
|---|
| Fields inherited from class org.smartfrog.sfcore.compound.CompoundImpl |
|---|
childCap, childInc, lifecycleChildren, sfChildren, sfSyncTerminate |
| 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.examples.dynamicwebserver.apache.Apache |
|---|
APACHECTLLOCATION, BASECONFIGFILENAME, BASECONFIGLOCATION, CONFIGFILENAME, CONFIGLOCATION, ENVVARS, INTERCHECKTIME, LOCATION, LOGTO, MANAGEDAEMON |
| Constructor Summary | |
|---|---|
ApacheImpl()
Standard Remotable constructor |
|
| Method Summary | |
|---|---|
boolean |
getApacheState()
Get Apache state |
int |
getData()
Returns an int containing the number of threads - implementation of DataSource interface |
void |
refreshConfig(java.lang.String scriptURL,
java.lang.String fileName)
This method is not currently used but could be used to maintain a desired configuration of Apache and then periodically refresh Apache to this state. |
void |
refreshDaemon()
This method is not used by the ApacheImpl class but would be used by a Remote client. |
void |
run()
This method is used to 'maintain' a processes desired state. |
void |
setApacheState(boolean newState)
The logic behind this is: if Apache is not running and the desired state is to be running then Set Apaches state to running call start() else Set Apaches state to the required state end It is not possible to simply change the variable to true and start a new thread because it may already be running and you would end up starting too many httpd processes. |
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. |
void |
startDaemon()
This method is not used by the ApacheImpl class but would be used by a Remote client. |
void |
stopDaemon()
This method is not used by the ApacheImpl class but would be used by a Remote client. |
| Methods inherited from class org.smartfrog.sfcore.compound.CompoundImpl |
|---|
sfAddChild, sfASyncTerminateWith, sfChildren, sfContainsChild, sfCreateNewApp, sfCreateNewChild, sfCreateNewChild, sfDeployChildren, sfDeployComponentDescription, sfDeployWith, sfDeployWithChildren, sfDumpState, sfParentageChanged, sfPing, sfPingChild, sfRemoveAttribute, sfRemoveChild, sfStartChildren, sfSyncTerminateWith, sfTerminatedWith |
| 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.compound.Compound |
|---|
sfCreateNewApp, sfCreateNewChild, sfCreateNewChild, sfDeployComponentDescription |
| 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 |
| Methods inherited from interface org.smartfrog.sfcore.prim.ChildMinder |
|---|
sfAddChild, sfChildren, sfContainsChild, sfRemoveChild |
| Constructor Detail |
|---|
public ApacheImpl()
throws java.rmi.RemoteException
java.rmi.RemoteException - in case of Remote/network error| Method Detail |
|---|
public void sfDeploy()
throws SmartFrogException,
java.rmi.RemoteException
sfDeploy in interface PrimsfDeploy in class CompoundImplSmartFrogException - error in deploying the component
java.rmi.RemoteException - in case of Remote/network error
public void sfStart()
throws SmartFrogException,
java.rmi.RemoteException
sfStart in interface PrimsfStart in class CompoundImplSmartFrogException - error in starting the component
java.rmi.RemoteException - in case of Remote/network errorpublic void sfTerminateWith(TerminationRecord tr)
sfTerminateWith in class CompoundImpltr - TerminationRecord objectpublic void setApacheState(boolean newState)
newState - new state of Apachepublic boolean getApacheState()
public void run()
run in interface java.lang.Runnable
public void startDaemon()
throws java.rmi.RemoteException
startDaemon in interface Apachejava.rmi.RemoteException - in case of Remote/network error
public void stopDaemon()
throws java.rmi.RemoteException
stopDaemon in interface Apachejava.rmi.RemoteException - in case of Remote/network error
public void refreshDaemon()
throws java.rmi.RemoteException
refreshDaemon in interface Apachejava.rmi.RemoteException - in case of Remote/network error
public void refreshConfig(java.lang.String scriptURL,
java.lang.String fileName)
throws java.rmi.RemoteException
refreshConfig in interface ApachescriptURL - script urlfileName - file name
java.rmi.RemoteException - in case of Remote/network error
public int getData()
throws java.rmi.RemoteException
getData in interface DataSourcejava.rmi.RemoteException - in case of Remote/network error
|
SmartFrog CORE 3.10.000 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||