Initial commit from SVN.

This commit is contained in:
wcrisman
2014-05-30 10:31:51 -07:00
commit b45e56b890
1968 changed files with 370949 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
<classpathentry combineaccessrules="false" kind="src" path="/Common"/>
<classpathentry combineaccessrules="false" kind="src" path="/Foundation"/>
<classpathentry combineaccessrules="false" kind="src" path="/Orb"/>
<classpathentry combineaccessrules="false" kind="src" path="/Foundation Web Server Monitor Shared"/>
<classpathentry combineaccessrules="false" kind="src" path="/Foundation Web Server Shared"/>
<classpathentry combineaccessrules="false" kind="src" path="/Class File Services"/>
<classpathentry combineaccessrules="false" kind="src" path="/Foundation Web Interfaces"/>
<classpathentry kind="output" path="bin"/>
</classpath>

Binary file not shown.

View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Foundation Web Server Monitor</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View File

@@ -0,0 +1 @@
cmd.exe /K c:\Java\jdk1.7\bin\keytool.exe -genkey -keyalg RSA -keystore .keystore -storepass monitor_928c45Jl10DTaz -keypass monitor_0177JtmssaKp -validity 1825 -dname "cn=localhost, ou=IT, o=Declarative Engineerng LLC, c=U

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/Foundation Web Server Monitor/src/com/foundation/web/monitor/application/WebServerMonitorApplication.java"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="1"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
</listAttribute>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="com.foundation.web.monitor.application.WebServerMonitorApplication"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="Foundation Web Server Monitor"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dmanager.address=localhost:9450 -Dmanager.user=admin -Dmanager.password=1qaz2wsx -Dweb.server.path=c:/temp/webserver -Dgenerate.proxies=true -Dtest=false -Dconsole.log=true"/>
</launchConfiguration>

View File

@@ -0,0 +1,3 @@
Method #0 = com.foundation.attribute.IReflectUpdateHandler.update(long;com.foundation.attribute.AbstractReflectData;int;long;
Method #1 = com.foundation.attribute.IReflectUpdateHandler.getNextProcessId
Method #2 = com.foundation.attribute.IReflectUpdateHandler.joinReflections(long;long;int;int;

View File

@@ -0,0 +1,20 @@
Method #0 = com.foundation.attribute.IReflectable.getReflected
Method #1 = com.foundation.attribute.IReflectable.isReflection(com.foundation.attribute.ReflectionContext;
Method #2 = com.foundation.attribute.IReflectable.isReflection
Method #3 = com.foundation.attribute.IReflectable.zzrReflectionGetLastUpdateMessageNumber(java.lang.Object;com.foundation.attribute.IReflectUpdateHandler;
Method #4 = com.foundation.attribute.IReflectable.zzrCollectPostSynchronizeReflectables(java.lang.Object;com.foundation.attribute.CreateReflectDataContext;
Method #5 = com.foundation.attribute.IReflectable.getReflectionContext
Method #6 = com.foundation.attribute.IReflectable.zzrReflectionRegister(com.foundation.attribute.IReflectUpdateHandler;com.foundation.attribute.ReflectRegistrationData;
Method #7 = com.foundation.attribute.IReflectable.reflectionSynchronize(com.foundation.attribute.IReflectUpdateHandler;com.foundation.attribute.AbstractReflectData;com.foundation.attribute.CreateReflectDataContext;
Method #8 = com.foundation.attribute.IReflectable.reflectionUnregister(com.foundation.attribute.IReflectUpdateHandler;
Method #9 = com.foundation.attribute.IReflectable.zzrIsReflection(java.lang.Object;com.foundation.attribute.ReflectionContext;
Method #10 = com.foundation.attribute.IReflectable.zzrGetReflectionContext(java.lang.Object;
Method #11 = com.foundation.attribute.IReflectable.zzrGetReflectionId(java.lang.Object;
Method #12 = com.foundation.attribute.IReflectable.zzrReflectionCreateSafeCopy(java.lang.Object;com.foundation.attribute.ReflectionContext;
Method #13 = com.foundation.attribute.IReflectable.zzrReflectionPreSynchronize(java.lang.Object;com.foundation.attribute.ReflectionContext;com.foundation.attribute.ReflectionContext;com.foundation.common.IEntity;com.foundation.attribute.IReflectable;com.foundation.attribute.ReflectionContext;
Method #14 = com.foundation.attribute.IReflectable.zzrReflectionDestroy(java.lang.Object;
Method #15 = com.foundation.attribute.IReflectable.zzrReflectionInitialize(java.lang.Object;com.foundation.attribute.AbstractReflectData;
Method #16 = com.foundation.attribute.IReflectable.zzrReflectionPostInitialize(java.lang.Object;com.foundation.attribute.AbstractReflectData;
Method #17 = com.foundation.attribute.IReflectable.zzrReflectionLocalRegister(java.lang.Object;com.foundation.attribute.CreateReflectDataContext;
Method #18 = com.foundation.clone.ICloneable.cloneObject(com.foundation.metadata.CloneContext;com.foundation.common.MetadataContainer;
Method #19 = com.foundation.metadata.ISupportsContainment.getMonitor

View File

@@ -0,0 +1,21 @@
Method #0 = com.foundation.attribute.IReflectableObject.reflectionLoadAttribute(java.lang.String;com.foundation.attribute.IReflectUpdateHandler;com.foundation.attribute.ReflectRegistrationData;
Method #1 = com.foundation.attribute.IReflectable.getReflected
Method #2 = com.foundation.attribute.IReflectable.isReflection(com.foundation.attribute.ReflectionContext;
Method #3 = com.foundation.attribute.IReflectable.isReflection
Method #4 = com.foundation.attribute.IReflectable.zzrReflectionGetLastUpdateMessageNumber(java.lang.Object;com.foundation.attribute.IReflectUpdateHandler;
Method #5 = com.foundation.attribute.IReflectable.zzrCollectPostSynchronizeReflectables(java.lang.Object;com.foundation.attribute.CreateReflectDataContext;
Method #6 = com.foundation.attribute.IReflectable.getReflectionContext
Method #7 = com.foundation.attribute.IReflectable.zzrReflectionRegister(com.foundation.attribute.IReflectUpdateHandler;com.foundation.attribute.ReflectRegistrationData;
Method #8 = com.foundation.attribute.IReflectable.reflectionSynchronize(com.foundation.attribute.IReflectUpdateHandler;com.foundation.attribute.AbstractReflectData;com.foundation.attribute.CreateReflectDataContext;
Method #9 = com.foundation.attribute.IReflectable.reflectionUnregister(com.foundation.attribute.IReflectUpdateHandler;
Method #10 = com.foundation.attribute.IReflectable.zzrIsReflection(java.lang.Object;com.foundation.attribute.ReflectionContext;
Method #11 = com.foundation.attribute.IReflectable.zzrGetReflectionContext(java.lang.Object;
Method #12 = com.foundation.attribute.IReflectable.zzrGetReflectionId(java.lang.Object;
Method #13 = com.foundation.attribute.IReflectable.zzrReflectionCreateSafeCopy(java.lang.Object;com.foundation.attribute.ReflectionContext;
Method #14 = com.foundation.attribute.IReflectable.zzrReflectionPreSynchronize(java.lang.Object;com.foundation.attribute.ReflectionContext;com.foundation.attribute.ReflectionContext;com.foundation.common.IEntity;com.foundation.attribute.IReflectable;com.foundation.attribute.ReflectionContext;
Method #15 = com.foundation.attribute.IReflectable.zzrReflectionDestroy(java.lang.Object;
Method #16 = com.foundation.attribute.IReflectable.zzrReflectionInitialize(java.lang.Object;com.foundation.attribute.AbstractReflectData;
Method #17 = com.foundation.attribute.IReflectable.zzrReflectionPostInitialize(java.lang.Object;com.foundation.attribute.AbstractReflectData;
Method #18 = com.foundation.attribute.IReflectable.zzrReflectionLocalRegister(java.lang.Object;com.foundation.attribute.CreateReflectDataContext;
Method #19 = com.foundation.clone.ICloneable.cloneObject(com.foundation.metadata.CloneContext;com.foundation.common.MetadataContainer;
Method #20 = com.foundation.metadata.ISupportsContainment.getMonitor

View File

@@ -0,0 +1,20 @@
Method #0 = com.foundation.attribute.IReflectable.getReflected
Method #1 = com.foundation.attribute.IReflectable.isReflection(com.foundation.attribute.ReflectionContext;
Method #2 = com.foundation.attribute.IReflectable.isReflection
Method #3 = com.foundation.attribute.IReflectable.zzrReflectionGetLastUpdateMessageNumber(java.lang.Object;com.foundation.attribute.IReflectUpdateHandler;
Method #4 = com.foundation.attribute.IReflectable.zzrCollectPostSynchronizeReflectables(java.lang.Object;com.foundation.attribute.CreateReflectDataContext;
Method #5 = com.foundation.attribute.IReflectable.getReflectionContext
Method #6 = com.foundation.attribute.IReflectable.zzrReflectionRegister(com.foundation.attribute.IReflectUpdateHandler;com.foundation.attribute.ReflectRegistrationData;
Method #7 = com.foundation.attribute.IReflectable.reflectionSynchronize(com.foundation.attribute.IReflectUpdateHandler;com.foundation.attribute.AbstractReflectData;com.foundation.attribute.CreateReflectDataContext;
Method #8 = com.foundation.attribute.IReflectable.reflectionUnregister(com.foundation.attribute.IReflectUpdateHandler;
Method #9 = com.foundation.attribute.IReflectable.zzrIsReflection(java.lang.Object;com.foundation.attribute.ReflectionContext;
Method #10 = com.foundation.attribute.IReflectable.zzrGetReflectionContext(java.lang.Object;
Method #11 = com.foundation.attribute.IReflectable.zzrGetReflectionId(java.lang.Object;
Method #12 = com.foundation.attribute.IReflectable.zzrReflectionCreateSafeCopy(java.lang.Object;com.foundation.attribute.ReflectionContext;
Method #13 = com.foundation.attribute.IReflectable.zzrReflectionPreSynchronize(java.lang.Object;com.foundation.attribute.ReflectionContext;com.foundation.attribute.ReflectionContext;com.foundation.common.IEntity;com.foundation.attribute.IReflectable;com.foundation.attribute.ReflectionContext;
Method #14 = com.foundation.attribute.IReflectable.zzrReflectionDestroy(java.lang.Object;
Method #15 = com.foundation.attribute.IReflectable.zzrReflectionInitialize(java.lang.Object;com.foundation.attribute.AbstractReflectData;
Method #16 = com.foundation.attribute.IReflectable.zzrReflectionPostInitialize(java.lang.Object;com.foundation.attribute.AbstractReflectData;
Method #17 = com.foundation.attribute.IReflectable.zzrReflectionLocalRegister(java.lang.Object;com.foundation.attribute.CreateReflectDataContext;
Method #18 = com.foundation.clone.ICloneable.cloneObject(com.foundation.metadata.CloneContext;com.foundation.common.MetadataContainer;
Method #19 = com.foundation.metadata.ISupportsContainment.getMonitor

View File

@@ -0,0 +1,102 @@
Method #0 = com.common.util.IList.getLocateComparator
Method #1 = com.common.util.IList.setLocateComparator(com.common.comparison.IComparator;
Method #2 = com.common.util.IList.getOrderComparator
Method #3 = com.common.util.IList.setOrderComparator(com.common.comparison.IComparator;
Method #4 = com.common.util.IIndexedCollection.add(int;java.lang.Object;
Method #5 = com.common.util.IIndexedCollection.remove(int;
Method #6 = com.common.util.IIndexedCollection.get(int;
Method #7 = com.common.util.IIndexedCollection.addAll(int;com.common.util.IIndexedCollection;int;int;
Method #8 = com.common.util.IIndexedCollection.addAll(int;[Ljava.lang.Object;;
Method #9 = com.common.util.IIndexedCollection.addAll(int;[Ljava.lang.Object;;int;int;
Method #10 = com.common.util.IIndexedCollection.addAll(int;com.common.util.ICollection;
Method #11 = com.common.util.IIndexedCollection.set(int;java.lang.Object;
Method #12 = com.common.util.IIndexedCollection.replace(int;java.lang.Object;
Method #13 = com.common.util.IIndexedCollection.getFirst
Method #14 = com.common.util.IIndexedCollection.getIndexOf(java.lang.Object;
Method #15 = com.common.util.IIndexedCollection.getLast
Method #16 = com.common.util.IIndexedCollection.move(java.lang.Object;int;
Method #17 = com.common.util.IIndexedCollection.move(int;int;
Method #18 = com.common.util.IIndexedCollection.moveToFirst(int;
Method #19 = com.common.util.IIndexedCollection.moveToFirst(java.lang.Object;
Method #20 = com.common.util.IIndexedCollection.moveToLast(java.lang.Object;
Method #21 = com.common.util.IIndexedCollection.moveToLast(int;
Method #22 = com.common.util.IIndexedCollection.getLastIndexOf(java.lang.Object;
Method #23 = com.common.util.IIndexedCollection.indexedIterator
Method #24 = com.common.util.ICollection.add(java.lang.Object;
Method #25 = com.common.util.ICollection.remove(java.lang.Object;
Method #26 = com.common.util.ICollection.addAll([Ljava.lang.Object;;
Method #27 = com.common.util.ICollection.addAll(com.common.util.IIndexedCollection;int;int;
Method #28 = com.common.util.ICollection.addAll(com.common.util.ICollection;
Method #29 = com.common.util.ICollection.addAll([Ljava.lang.Object;;int;int;
Method #30 = com.common.util.ICollection.addAll(com.common.util.IIterator;
Method #31 = com.common.util.ICollection.iterator
Method #32 = com.common.util.ICollection.containsValue(java.lang.Object;
Method #33 = com.common.util.ICollection.getSize
Method #34 = com.common.util.ICollection.replace(java.lang.Object;java.lang.Object;
Method #35 = com.common.util.ICollection.replaceAll(com.common.util.ICollection;com.common.util.ICollection;
Method #36 = com.common.util.ICollection.replaceAll(com.common.util.ICollection;
Method #37 = com.common.util.ICollection.toArray
Method #38 = com.common.util.ICollection.toArray(java.lang.Object;
Method #39 = com.common.util.ICollection.removeAll([Ljava.lang.Object;;int;int;
Method #40 = com.common.util.ICollection.removeAll(com.common.util.IIterator;
Method #41 = com.common.util.ICollection.removeAll(com.common.util.ICollection;
Method #42 = com.common.util.ICollection.removeAll([Ljava.lang.Object;;
Method #43 = com.common.util.ICollection.removeAll
Method #44 = com.common.util.ICollection.isChangeable(boolean;
Method #45 = com.common.util.ICollection.isChangeable
Method #46 = com.common.util.ICollection.select(com.common.event.BooleanHandler1;com.common.util.IList;
Method #47 = com.common.util.ICollection.reject(com.common.event.BooleanHandler1;com.common.util.IList;
Method #48 = com.common.util.ICollection.collect(com.common.event.ObjectHandler1;com.common.util.IList;
Method #49 = com.common.util.ICollection.perform(com.common.event.VoidHandler1;
Method #50 = com.foundation.util.IManagedCollection.execute(com.foundation.util.IManagedCollection$ICollectionOperation;
Method #51 = com.foundation.util.IManagedCollection.setErrorInfo(java.lang.Object;
Method #52 = com.foundation.util.IManagedCollection.getErrorInfo
Method #53 = com.common.util.ICollection.getFirst
Method #54 = com.foundation.util.ITrackedCollection.resetVirtualObjectChangeFlags
Method #55 = com.foundation.util.ITrackedCollection.reverseObjectChanges
Method #56 = com.foundation.util.ITrackedCollection.reverseVirtualObjectChanges
Method #57 = com.foundation.util.ITrackedCollection.getCollectionChanges(com.common.util.ICollection;com.common.util.ICollection;
Method #58 = com.foundation.util.ITrackedCollection.resetChangeTracking
Method #59 = com.foundation.util.ITrackedCollection.hasCollectionChanges
Method #60 = com.foundation.attribute.IReflectable.getReflected
Method #61 = com.foundation.attribute.IReflectable.isReflection(com.foundation.attribute.ReflectionContext;
Method #62 = com.foundation.attribute.IReflectable.isReflection
Method #63 = com.foundation.attribute.IReflectable.zzrReflectionGetLastUpdateMessageNumber(java.lang.Object;com.foundation.attribute.IReflectUpdateHandler;
Method #64 = com.foundation.attribute.IReflectable.zzrCollectPostSynchronizeReflectables(java.lang.Object;com.foundation.attribute.CreateReflectDataContext;
Method #65 = com.foundation.attribute.IReflectable.getReflectionContext
Method #66 = com.foundation.attribute.IReflectable.zzrReflectionRegister(com.foundation.attribute.IReflectUpdateHandler;com.foundation.attribute.ReflectRegistrationData;
Method #67 = com.foundation.attribute.IReflectable.reflectionSynchronize(com.foundation.attribute.IReflectUpdateHandler;com.foundation.attribute.AbstractReflectData;com.foundation.attribute.CreateReflectDataContext;
Method #68 = com.foundation.attribute.IReflectable.reflectionUnregister(com.foundation.attribute.IReflectUpdateHandler;
Method #69 = com.foundation.attribute.IReflectable.zzrIsReflection(java.lang.Object;com.foundation.attribute.ReflectionContext;
Method #70 = com.foundation.attribute.IReflectable.zzrGetReflectionContext(java.lang.Object;
Method #71 = com.foundation.attribute.IReflectable.zzrGetReflectionId(java.lang.Object;
Method #72 = com.foundation.attribute.IReflectable.zzrReflectionCreateSafeCopy(java.lang.Object;com.foundation.attribute.ReflectionContext;
Method #73 = com.foundation.attribute.IReflectable.zzrReflectionPreSynchronize(java.lang.Object;com.foundation.attribute.ReflectionContext;com.foundation.attribute.ReflectionContext;com.foundation.common.IEntity;com.foundation.attribute.IReflectable;com.foundation.attribute.ReflectionContext;
Method #74 = com.foundation.attribute.IReflectable.zzrReflectionDestroy(java.lang.Object;
Method #75 = com.foundation.attribute.IReflectable.zzrReflectionInitialize(java.lang.Object;com.foundation.attribute.AbstractReflectData;
Method #76 = com.foundation.attribute.IReflectable.zzrReflectionPostInitialize(java.lang.Object;com.foundation.attribute.AbstractReflectData;
Method #77 = com.foundation.attribute.IReflectable.zzrReflectionLocalRegister(java.lang.Object;com.foundation.attribute.CreateReflectDataContext;
Method #78 = com.foundation.clone.ICloneable.cloneObject(com.foundation.metadata.CloneContext;com.foundation.common.MetadataContainer;
Method #79 = com.foundation.metadata.ISupportsContainment.getMonitor
Method #80 = com.foundation.attribute.IReflectCollectionSupport.synchronizeReflection(com.foundation.attribute.IReflectUpdateHandler;com.foundation.attribute.AbstractReflectData;
Method #81 = com.foundation.attribute.IReflectCollectionSupport.unregisterReflection(com.foundation.attribute.IReflectUpdateHandler;
Method #82 = com.foundation.attribute.IReflectSupport.getHash
Method #83 = com.foundation.attribute.IReflectSupport.setHash(int;
Method #84 = com.foundation.attribute.IReflectSupport.getReflectedObject
Method #85 = com.foundation.attribute.IReflectSupport.destroyReflection
Method #86 = com.foundation.attribute.IReflectSupport.getSupportedObject
Method #87 = com.foundation.attribute.IReflectSupport.completeSynchronization(com.foundation.attribute.AbstractReflectData;com.foundation.attribute.AbstractReflectData;
Method #88 = com.foundation.attribute.IReflectSupport.getReflectionObject
Method #89 = com.foundation.attribute.IReflectSupport.getSynchronizationData(com.foundation.metadata.CloneContext;
Method #90 = com.foundation.attribute.IReflectSupport.updateReflection(com.foundation.attribute.AbstractReflectData;
Method #91 = com.foundation.attribute.IReflectSupport.setCategoryNumber(long;
Method #92 = com.foundation.attribute.IReflectSupport.getCategoryNumber
Method #93 = com.foundation.event.IEventEmitter.registerListener(com.foundation.metadata.Event;com.foundation.event.IHandler;boolean;
Method #94 = com.foundation.event.IEventEmitter.registerListener(int;com.foundation.event.IHandler;boolean;
Method #95 = com.foundation.event.IEventEmitter.unregisterListener(int;com.foundation.event.IHandler;
Method #96 = com.foundation.event.IEventEmitter.unregisterListener(com.foundation.metadata.Event;com.foundation.event.IHandler;
Method #97 = com.foundation.util.IInlineCollectionObservable.addCollectionObserver(com.foundation.util.IInlineCollectionObserver;
Method #98 = com.foundation.util.IInlineCollectionObservable.removeCollectionObserver(com.foundation.util.IInlineCollectionObserver;
Method #99 = com.foundation.util.IInlineCollectionObservable.getCollection
Method #100 = com.foundation.util.IInlineIndexedCollectionObservable.addCollectionObserver(com.foundation.util.IInlineIndexedCollectionObserver;
Method #101 = com.foundation.util.IInlineIndexedCollectionObservable.removeCollectionObserver(com.foundation.util.IInlineIndexedCollectionObserver;

View File

@@ -0,0 +1 @@
Method #0 = com.foundation.web.monitor.shared.IManagerConnector.login(java.lang.String;java.lang.String;long;

View File

@@ -0,0 +1,5 @@
Method #0 = com.foundation.web.monitor.shared.IWebServerInterface.shutdown
Method #1 = com.foundation.web.monitor.shared.IWebServerInterface.startup
Method #2 = com.foundation.web.monitor.shared.IWebServerInterface.getWebServerLog
Method #3 = com.foundation.web.monitor.shared.IWebServerInterface.getWebServer
Method #4 = com.foundation.web.monitor.shared.IWebServerInterface.getStatus

View File

@@ -0,0 +1,21 @@
Method #0 = com.foundation.web.monitor.shared.model.IWebServerStatus.getIsRunning
Method #1 = com.foundation.attribute.IReflectable.getReflected
Method #2 = com.foundation.attribute.IReflectable.isReflection(com.foundation.attribute.ReflectionContext;
Method #3 = com.foundation.attribute.IReflectable.isReflection
Method #4 = com.foundation.attribute.IReflectable.zzrReflectionGetLastUpdateMessageNumber(java.lang.Object;com.foundation.attribute.IReflectUpdateHandler;
Method #5 = com.foundation.attribute.IReflectable.zzrCollectPostSynchronizeReflectables(java.lang.Object;com.foundation.attribute.CreateReflectDataContext;
Method #6 = com.foundation.attribute.IReflectable.getReflectionContext
Method #7 = com.foundation.attribute.IReflectable.zzrReflectionRegister(com.foundation.attribute.IReflectUpdateHandler;com.foundation.attribute.ReflectRegistrationData;
Method #8 = com.foundation.attribute.IReflectable.reflectionSynchronize(com.foundation.attribute.IReflectUpdateHandler;com.foundation.attribute.AbstractReflectData;com.foundation.attribute.CreateReflectDataContext;
Method #9 = com.foundation.attribute.IReflectable.reflectionUnregister(com.foundation.attribute.IReflectUpdateHandler;
Method #10 = com.foundation.attribute.IReflectable.zzrIsReflection(java.lang.Object;com.foundation.attribute.ReflectionContext;
Method #11 = com.foundation.attribute.IReflectable.zzrGetReflectionContext(java.lang.Object;
Method #12 = com.foundation.attribute.IReflectable.zzrGetReflectionId(java.lang.Object;
Method #13 = com.foundation.attribute.IReflectable.zzrReflectionCreateSafeCopy(java.lang.Object;com.foundation.attribute.ReflectionContext;
Method #14 = com.foundation.attribute.IReflectable.zzrReflectionPreSynchronize(java.lang.Object;com.foundation.attribute.ReflectionContext;com.foundation.attribute.ReflectionContext;com.foundation.common.IEntity;com.foundation.attribute.IReflectable;com.foundation.attribute.ReflectionContext;
Method #15 = com.foundation.attribute.IReflectable.zzrReflectionDestroy(java.lang.Object;
Method #16 = com.foundation.attribute.IReflectable.zzrReflectionInitialize(java.lang.Object;com.foundation.attribute.AbstractReflectData;
Method #17 = com.foundation.attribute.IReflectable.zzrReflectionPostInitialize(java.lang.Object;com.foundation.attribute.AbstractReflectData;
Method #18 = com.foundation.attribute.IReflectable.zzrReflectionLocalRegister(java.lang.Object;com.foundation.attribute.CreateReflectDataContext;
Method #19 = com.foundation.clone.ICloneable.cloneObject(com.foundation.metadata.CloneContext;com.foundation.common.MetadataContainer;
Method #20 = com.foundation.metadata.ISupportsContainment.getMonitor

View File

@@ -0,0 +1 @@
Method #0 = com.foundation.web.server.shared.IWebServerMonitorConnection.setConnector(com.foundation.web.server.shared.IWebServer;

View File

@@ -0,0 +1 @@
Method #0 = com.foundation.web.server.shared.IWebServerProxy.shutdown

View File

@@ -0,0 +1,6 @@
Method #0 = com.foundation.web.server.shared.IWebServer.shutdown
Method #1 = com.foundation.web.server.shared.IWebServer.refreshWebapps
Method #2 = com.foundation.web.server.shared.IWebServer.refreshWebapp(java.lang.String;
Method #3 = com.foundation.web.server.shared.IWebServer.getWebappBundles
Method #4 = com.foundation.web.server.shared.IWebServer.removeWebapp(java.lang.String;
Method #5 = com.foundation.web.server.shared.IWebServer.reloadWebapp(java.lang.String;

View File

@@ -0,0 +1,62 @@
Method #0 = com.foundation.web.server.shared.model.IWebappLog.getEntries(int;int;
Method #1 = com.foundation.web.server.shared.model.IWebappLog.getEntryCount
Method #2 = com.foundation.common.IEntity.entityGetKey
Method #3 = com.foundation.common.IEntity.entitySetKey(java.lang.Object;
Method #4 = com.foundation.common.IEntity.isObjectNew
Method #5 = com.foundation.common.IEntity.getIsAltered
Method #6 = com.foundation.common.IEntity.entityUpdate(java.lang.Runnable;java.lang.Object;
Method #7 = com.foundation.common.IEntity.entityUpdate(com.foundation.transaction.TransactionContextHolder;
Method #8 = com.foundation.common.IEntity.entityUpdate(java.lang.Runnable;java.lang.Object;int;
Method #9 = com.foundation.common.IEntity.entityUpdate(java.lang.Runnable;int;
Method #10 = com.foundation.common.IEntity.entityUpdate(java.lang.Runnable;
Method #11 = com.foundation.common.IEntity.entityUpdate(int;
Method #12 = com.foundation.common.IEntity.entityUpdate
Method #13 = com.foundation.common.IEntity.entityDelete(com.foundation.transaction.TransactionContextHolder;
Method #14 = com.foundation.common.IEntity.entityDelete(int;
Method #15 = com.foundation.common.IEntity.entityDelete
Method #16 = com.foundation.common.IEntity.resetVirtualObjectChangeFlags
Method #17 = com.foundation.common.IEntity.resetVirtualObjectAlteredFlags
Method #18 = com.foundation.common.IEntity.getApplication
Method #19 = com.foundation.common.IEntity.getTransactionService
Method #20 = com.foundation.common.IEntity.getAttributeSupport
Method #21 = com.foundation.common.IEntity.getAttributeCount
Method #22 = com.foundation.common.IEntity.getAttributeName(int;
Method #23 = com.foundation.common.IEntity.getOldAttributeValue(com.foundation.metadata.Attribute;
Method #24 = com.foundation.common.IEntity.isObjectRepositoryBound
Method #25 = com.foundation.common.IEntity.getIsObjectChanged
Method #26 = com.foundation.common.IEntity.getIsVirtualObjectChanged
Method #27 = com.foundation.common.IEntity.resetObjectChangeFlags
Method #28 = com.foundation.common.IEntity.reverseObjectChanges
Method #29 = com.foundation.common.IEntity.reverseVirtualObjectChanges
Method #30 = com.foundation.common.IEntity.getIsVirtualObjectAltered
Method #31 = com.foundation.common.IEntity.resetAlteredFlag
Method #32 = com.foundation.common.IEntity.getPartOfEntity
Method #33 = com.foundation.common.IEntity.getPartOfEntityCounter
Method #34 = com.foundation.common.IEntity.getRepositoryIdentifier(java.lang.Object;
Method #35 = com.foundation.common.IEntity.getRepositoryIdentifier
Method #36 = com.foundation.common.IEntity.useRepositoryVersionTracking
Method #37 = com.foundation.attribute.IReflectableObject.reflectionLoadAttribute(java.lang.String;com.foundation.attribute.IReflectUpdateHandler;com.foundation.attribute.ReflectRegistrationData;
Method #38 = com.foundation.attribute.IReflectable.getReflected
Method #39 = com.foundation.attribute.IReflectable.isReflection(com.foundation.attribute.ReflectionContext;
Method #40 = com.foundation.attribute.IReflectable.isReflection
Method #41 = com.foundation.attribute.IReflectable.zzrReflectionGetLastUpdateMessageNumber(java.lang.Object;com.foundation.attribute.IReflectUpdateHandler;
Method #42 = com.foundation.attribute.IReflectable.zzrCollectPostSynchronizeReflectables(java.lang.Object;com.foundation.attribute.CreateReflectDataContext;
Method #43 = com.foundation.attribute.IReflectable.getReflectionContext
Method #44 = com.foundation.attribute.IReflectable.zzrReflectionRegister(com.foundation.attribute.IReflectUpdateHandler;com.foundation.attribute.ReflectRegistrationData;
Method #45 = com.foundation.attribute.IReflectable.reflectionSynchronize(com.foundation.attribute.IReflectUpdateHandler;com.foundation.attribute.AbstractReflectData;com.foundation.attribute.CreateReflectDataContext;
Method #46 = com.foundation.attribute.IReflectable.reflectionUnregister(com.foundation.attribute.IReflectUpdateHandler;
Method #47 = com.foundation.attribute.IReflectable.zzrIsReflection(java.lang.Object;com.foundation.attribute.ReflectionContext;
Method #48 = com.foundation.attribute.IReflectable.zzrGetReflectionContext(java.lang.Object;
Method #49 = com.foundation.attribute.IReflectable.zzrGetReflectionId(java.lang.Object;
Method #50 = com.foundation.attribute.IReflectable.zzrReflectionCreateSafeCopy(java.lang.Object;com.foundation.attribute.ReflectionContext;
Method #51 = com.foundation.attribute.IReflectable.zzrReflectionPreSynchronize(java.lang.Object;com.foundation.attribute.ReflectionContext;com.foundation.attribute.ReflectionContext;com.foundation.common.IEntity;com.foundation.attribute.IReflectable;com.foundation.attribute.ReflectionContext;
Method #52 = com.foundation.attribute.IReflectable.zzrReflectionDestroy(java.lang.Object;
Method #53 = com.foundation.attribute.IReflectable.zzrReflectionInitialize(java.lang.Object;com.foundation.attribute.AbstractReflectData;
Method #54 = com.foundation.attribute.IReflectable.zzrReflectionPostInitialize(java.lang.Object;com.foundation.attribute.AbstractReflectData;
Method #55 = com.foundation.attribute.IReflectable.zzrReflectionLocalRegister(java.lang.Object;com.foundation.attribute.CreateReflectDataContext;
Method #56 = com.foundation.clone.ICloneable.cloneObject(com.foundation.metadata.CloneContext;com.foundation.common.MetadataContainer;
Method #57 = com.foundation.metadata.ISupportsContainment.getMonitor
Method #58 = com.foundation.event.IEventEmitter.registerListener(com.foundation.metadata.Event;com.foundation.event.IHandler;boolean;
Method #59 = com.foundation.event.IEventEmitter.registerListener(int;com.foundation.event.IHandler;boolean;
Method #60 = com.foundation.event.IEventEmitter.unregisterListener(int;com.foundation.event.IHandler;
Method #61 = com.foundation.event.IEventEmitter.unregisterListener(com.foundation.metadata.Event;com.foundation.event.IHandler;

View File

@@ -0,0 +1,287 @@
package com.foundation.web.monitor.application;
import java.io.File;
import java.io.FileInputStream;
import java.util.Properties;
import com.common.comparison.Comparator;
import com.common.debug.Debug;
import com.common.debug.DefaultLog;
import com.common.debug.FileLog;
import com.common.orb.Orb;
import com.common.thread.ActiveScheduler;
import com.common.thread.Scheduler;
import com.common.util.StringSupport;
import com.de22.orb.Address;
import com.de22.orb.NioEngine;
import com.de22.orb.optional.ServerSocketOptions;
import com.de22.orb.optional.SocketOptions;
import com.de22.orb.security.SslSecurityProvider;
import com.foundation.application.Application;
import com.foundation.web.monitor.controller.ManagerConnector;
import com.foundation.web.monitor.controller.WebServerInterface;
import com.foundation.web.monitor.shared.IManagerConnector;
import com.foundation.web.server.shared.IWebServerMonitorConnection;
import com.foundation.web.server.shared.IWebServer;
/**
* Monitors and controls the starting/stopping of the web server process.
* Also provides an interface for the Web Server Manager tool to connect, login, and access the web server.
*/
public class WebServerMonitorApplication extends Application {
/** The property file location property. */
public static final String PROPERTY_FILE = "properties";
/** The property name that determines whether we generate proxies. This should only be true during development. */
public static final String PROPERTY_GENERATE_PROXIES = "generate.proxies";
/** The property name that gives us the ip:port for starting the application browser's server socket listener. */
public static final String PROPERTY_APPBROWSER_SERVER_ADDRESS = "application.browser.address";
/** The from address used to send automated emails to contacts. */
public static final String PROPERTY_EMAIL_FROM_ADDRESS = "email.from";
/** The host name for the mail server. */
public static final String PROPERTY_EMAIL_HOST = "email.host";
/** The user name to log in to the mail server. */
public static final String PROPERTY_EMAIL_USER = "email.user";
/** The password to log in to the mail server. */
public static final String PROPERTY_EMAIL_PASSWORD = "email.password";
/** The address to open a server socket on to allow the web server manager to connect. */
public static final String PROPERTY_MANAGER_ADDRESS = "manager.address";
/** The user name the web server manager should use when connecting. */
public static final String PROPERTY_MANAGER_USER = "manager.user";
/** The password the web server manager should use when connecting. */
public static final String PROPERTY_MANAGER_PASSWORD = "manager.password";
/** The optional path to the java bin directory where the java.exe will be found and used for the execution of the web server. If not given then the default system path will be used to find java.exe. */
public static final String PROPERTY_JAVA_BIN_PATH = "java.bin.path";
/** The path to the web server. This may be null if the web server is in the same directory as this web server monitor. */
public static final String PROPERTY_WEB_SERVER_PATH = "web.server.path";
/** Whether the process should log to the console versus a log file. The console is preferred for testing, but runtime should use the log file. The log file will be in the base directory. */
public static final String PROPERTY_CONSOLE_LOG = "console.log";
/** The optional base directory for the process. This will be the startup location or ./ if not specified. */
public static final String PROPERTY_BASE_DIRECTORY = "base.directory";
/** The properties used by the web application. */
private Properties properties;
/** The base directory for the application. This allows the directory to be modified as needed without affecting other setup code. */
private File baseDirectory = new File("./");
/** The non-blocking IO Engine used by the orb. */
private NioEngine nioEngine = null;
private static final WebServerMonitorApplication singleton = new WebServerMonitorApplication();
/**
* Starts the Petit Teton application.
* <p>Note: This runs the PetitTeton web application in standalone mode.</p>
* @param args None expected.
*/
public static void main(String[] args) {
//Setup the debug log.//
Debug.setLog(new DefaultLog());
getSingleton().startup(System.getProperties());
//Enable the wait for shutdown call on the Mac such that the main thread never dies.//
// getSingleton().waitForShutdown();
}//main()//
/**
* Simplifies retrieving a property from the application's property set.
* @param key The key for the property.
* @return The value of the property, or null if it doesn't exist.
*/
public static String getProperty(String key) {
return getSingleton().getProperties().getProperty(key);
}//getProperty()//
/**
* Simplifies retrieving a property from the application's property set.
* @param key The key for the property.
* @param defaultValue The default value to use if the key is not specified.
* @return The value of the property, or null if it doesn't exist.
*/
public static String getProperty(String key, String defaultValue) {
return getSingleton().getProperties().getProperty(key, defaultValue);
}//getProperty()//
/**
* Gets the one and only instance of the application.
* @return The singleton instance.
*/
public static WebServerMonitorApplication getSingleton() {
return singleton;
}//getSingleton()//
/**
* WebServerMonitorApplication constructor.
*/
public WebServerMonitorApplication() {
}//WebServerMonitorApplication()//
/**
* Gets the directory containing the application's resources.
* @return The file referencing the application's base path.
*/
public File getBaseDirectory() {
return baseDirectory;
}//getBaseDirectory()//
/**
* Sets the directory containing the application's resources.
* @param baseDirectory The file referencing the application's base path.
*/
public void setBaseDirectory(File baseDirectory) {
this.baseDirectory = baseDirectory == null ? new File("./") : baseDirectory;
}//setBaseDirectory()//
/**
* Gets the set of properties for the application. This should be used in place of System.getProperties().
* @return The properties for this application.
*/
public Properties getProperties() {
return properties;
}//getProperties()//
/* (non-Javadoc)
* @see com.foundation.application.Application#getDefaultRepositoryIdentifier()
*/
public Object getDefaultRepositoryIdentifier() {
return null;
}//getDefaultRepositoryIdentifier()//
/* (non-Javadoc)
* @see com.foundation.application.Application#getMetadataLocation()
*/
public Object getMetadataLocation() {
return null;
}//getMetadataLocation()//
/**
* Gets the optional non-blocking I/O engine.
* @return The io engine used with the sockets.
*/
public NioEngine getNioEngine() {
return nioEngine;
}//getNioEngine()//
/* (non-Javadoc)
* @see com.foundation.application.Application#internalShutdown()
*/
protected void internalShutdown() {
try {
Orb.shutdown();
}//try//
catch(Throwable e) {}
try {
Scheduler.shutdown();
ActiveScheduler.getSingleton().shutdown();
}//try//
catch(Throwable e) {}
super.internalShutdown();
}//internalShutdown()//
/* (non-Javadoc)
* @see com.foundation.application.Application#startup()
*/
protected void startup(java.util.Properties properties) {
String generateProxiesProperty;
boolean generateProxies;
String consoleLog;
setBaseDirectory(new File(properties.getProperty(PROPERTY_BASE_DIRECTORY, ".")));
this.properties = properties;
//Load properties from the property file into the system properties.//
if(this.properties.getProperty(PROPERTY_FILE) != null) {
FileInputStream fin = null;
try {
fin = new FileInputStream(new File(getBaseDirectory(), this.properties.getProperty(PROPERTY_FILE)));
this.properties.load(fin);
}//try//
catch(Throwable e) {
Debug.log("Couldn't load the property file: " + this.properties.getProperty(PROPERTY_FILE));
}//catch//
finally {
try {fin.close();} catch(Throwable e) {}
}//finally//
}//if//
consoleLog = getProperty(PROPERTY_CONSOLE_LOG, "false");
if(!consoleLog.equals("true")) {
Debug.setLog(new FileLog(new File(getBaseDirectory(), "log.txt")));
}//if//
generateProxiesProperty = getProperty(PROPERTY_GENERATE_PROXIES, "false");
generateProxies = generateProxiesProperty.equals("yes") || generateProxiesProperty.equals("on") || generateProxiesProperty.equals("true");
// //Setup the metadata service.//
// setupMetadataService();
// //Setup the resource service.//
// setupResourceService();
// //Setup the transaction service.//
// setupTransactionService();
// getTransactionService().debug(TransactionService.DEBUG_ALL);
//Setup the ORB.//
Orb.setOrbWrapper(new com.de22.orb.optional.CommonOrbWrapper(generateProxies ? new com.de22.orb.development.OrbClassLoader(new File(getBaseDirectory(), "proxies")) : null, null, null));
try {
nioEngine = new NioEngine(40);
}//try//
catch(Throwable e) {
Debug.log(e);
}//catch//
try {
//Start the application specific code.//
startApplication();
}//try//
catch(Throwable e) {
//Log all errors that are not caught earlier in the program.//
Debug.log(e);
}//catch//
}//startup()//
/**
* Starts the actual application.
*/
private void startApplication() {
String managerAddress = getProperty(PROPERTY_MANAGER_ADDRESS);
String managerUser = getProperty(PROPERTY_MANAGER_USER);
String managerPassword = getProperty(PROPERTY_MANAGER_PASSWORD);
String test = getProperty("test");
if(managerAddress != null && managerUser != null && managerPassword != null) {
try {
Object serverSocketId = Orb.openServerSocket("WebServerManagerConnector", new ServerSocketOptions(new Address(managerAddress), null, new SocketOptions(0), /*getNioEngine()*/ null, null, 0, 60000, /*new SslSecurityProvider("SSLv3", new java.io.File(getBaseDirectory(), ".keystore").getAbsolutePath(), "monitor_928c45Jl10DTaz", "monitor_0177JtmssaKp")*/ null));
if(serverSocketId != null) {
int webServerConnectorPort = 9448;
Object webServerSocketId = null;
final WebServerInterface webServerInterface;
ManagerConnector managerConnector;
while(webServerSocketId == null) {
webServerSocketId = Orb.openServerSocket("WebServerConnector", new ServerSocketOptions(new Address("127.0.0.1:" + ++webServerConnectorPort), null, new SocketOptions(0), getNioEngine(), null, 0, 60000, null));
}//while//
//Setup the connectors for the Manager tool (the client).//
webServerInterface = new WebServerInterface(webServerConnectorPort);
managerConnector = new ManagerConnector(getProperty(PROPERTY_MANAGER_USER), getProperty(PROPERTY_MANAGER_PASSWORD), webServerInterface);
//Setup the login proxy and bind it to the ORB, and setup the web server interface.//
Orb.bind(Orb.getProxy(managerConnector, IManagerConnector.class), IManagerConnector.ORB_NAME, null);
//Setup the connector for the web server to connect back to this monitoring system.//
Orb.bind(Orb.getProxy(new IWebServerMonitorConnection() {
public void setConnector(IWebServer connector) {
webServerInterface.setWebServer(connector);
}//setConnector()//
}, IWebServerMonitorConnection.class), IWebServerMonitorConnection.ORB_NAME, null);
if(!Comparator.equals("true", test)) {
//Auto start the web server.//
webServerInterface.startup();
}//if//
else {
Debug.log("You can now start the web server passing -Dmonitor.port=" + webServerConnectorPort);
}//else//
}//if//
else {
Debug.log(new RuntimeException("Unable to open the server socket on the given address: " + new Address(managerAddress).toString()));
}//else//
}//try//
catch(Throwable e) {
Debug.log(e);
}//catch//
}//if//
else {
Debug.log(new RuntimeException("Failed to provide properties for one or more of: '" + PROPERTY_MANAGER_ADDRESS + "', '" + PROPERTY_MANAGER_USER + "', '" + PROPERTY_MANAGER_PASSWORD + "'."));
}//else//
}//startApplication()//
}//WebServerMonitorApplication//

View File

@@ -0,0 +1,20 @@
package com.foundation.web.monitor.controller;
import com.foundation.application.IApplication;
import com.foundation.controller.Controller;
import com.foundation.web.monitor.application.WebServerMonitorApplication;
public class AbstractController extends Controller {
/**
* AbstractController constructor.
*/
public AbstractController() {
}//AbstractController()//
/**
* Gets the application object that this object is running under. The application object provides the object various services that it will need.
* @return The application reference for the application this object is running under.
*/
public IApplication getApplication() {
return WebServerMonitorApplication.getSingleton();
}//getApplication()//
}//AbstractController//

View File

@@ -0,0 +1,91 @@
package com.foundation.web.monitor.controller;
import com.common.io.StreamSupport;
import com.common.orb.Orb;
import com.common.security.Sha512;
import com.common.util.StringSupport;
import com.foundation.web.monitor.shared.IManagerConnector;
import com.foundation.web.monitor.shared.IWebServerInterface;
import com.foundation.metadata.Attribute;
public class ManagerConnector extends AbstractController implements IManagerConnector {
public static final Attribute WEB_SERVER_INTERFACE = registerAttribute(ManagerConnector.class, "webServerInterface");
public static final Attribute USER = registerAttribute(ManagerConnector.class, "user");
public static final Attribute PASSWORD = registerAttribute(ManagerConnector.class, "password");
/**
* ManagerConnector constructor.
*/
public ManagerConnector(String user, String password, WebServerInterface webServerInterface) {
setUser(user);
setPassword(password);
setWebServerInterface((IWebServerInterface) Orb.getProxy(webServerInterface, IWebServerInterface.class));
}//ManagerConnector()//
/* (non-Javadoc)
* @see com.foundation.web.manager.shared.IManagerConnector#login(java.lang.String, java.lang.String, long)
*/
public IWebServerInterface login(String user, String passwordHash, long timestamp) {
long current = System.currentTimeMillis();
IWebServerInterface result = null;
//Verify that the client timestamp is less than 10 minutes from the current server time, and that the user name's match, and that the hash of the password + timestamp matches.//
if(Math.abs(timestamp - current) <= 600000) {
if(user.equals(getUser())) {
Sha512 hashAlgorithm = new Sha512();
byte[] tsBytes = new byte[8];
StreamSupport.writeLong(timestamp, tsBytes, 0);
hashAlgorithm.add(getPassword());
hashAlgorithm.add(tsBytes);
if(passwordHash.equals(StringSupport.toHexString(hashAlgorithm.hash()))) {
//Return the web server interface to provide the client with access to the server.//
result = getWebServerInterface();
}//if//
}//if//
}//if//
return result;
}//login()//
/**
* Gets the webServerInterface value.
* @return The webServerInterface value.
*/
private IWebServerInterface getWebServerInterface() {
return (IWebServerInterface) getAttributeValue(WEB_SERVER_INTERFACE);
}//getWebServerInterface()//
/**
* Sets the webServerInterface value.
* @param webServerInterface The webServerInterface value.
*/
private void setWebServerInterface(IWebServerInterface webServerInterface) {
setAttributeValue(WEB_SERVER_INTERFACE, webServerInterface);
}//setWebServerInterface()//
/**
* Gets the user value.
* @return The user value.
*/
private String getUser() {
return (String) getAttributeValue(USER);
}//getUser()//
/**
* Sets the user value.
* @param user The user value.
*/
private void setUser(String user) {
setAttributeValue(USER, user);
}//setUser()//
/**
* Gets the password value.
* @return The password value.
*/
private String getPassword() {
return (String) getAttributeValue(PASSWORD);
}//getPassword()//
/**
* Sets the password value.
* @param password The password value.
*/
private void setPassword(String password) {
setAttributeValue(PASSWORD, password);
}//setPassword()//
}//ManagerConnector//

View File

@@ -0,0 +1,140 @@
package com.foundation.web.monitor.controller;
import java.io.File;
import java.io.InputStream;
import com.common.debug.Debug;
import com.common.thread.IRunnable;
import com.common.thread.ThreadService;
import com.common.util.StringSupport;
import com.foundation.attribute.SingleThreadedReflectionContext;
import com.foundation.util.IManagedList;
import com.foundation.web.monitor.application.WebServerMonitorApplication;
import com.foundation.web.monitor.shared.IWebServerInterface;
import com.foundation.web.monitor.shared.model.IWebServerStatus;
import com.foundation.web.monitor.shared.model.WebServerLog;
import com.foundation.web.monitor.shared.model.WebServerStatus;
import com.foundation.web.server.shared.IWebServer;
public class WebServerInterface extends AbstractController implements IWebServerInterface {
private WebServerStatus webServerStatus = new WebServerStatus();
private volatile Process webServerProcess = null;
private int webServerPort;
private volatile IWebServer webServer = null;
/** The log of the web server process output. */
private WebServerLog webServerLog = new WebServerLog();
/**
* WebServerInterface constructor.
* @param webServerPort The port the server socket is listening on (via localhost) for the web server process to connect on.
*/
public WebServerInterface(int webServerPort) {
this.webServerPort = webServerPort;
}//WebServerInterface()//
/* (non-Javadoc)
* @see com.foundation.web.monitor.shared.IWebServerInterface#getWebServer()
*/
public IWebServer getWebServer() {
return webServer;
}//getWebServer()//
/**
* Sets the web server proxy, usable to interact with the actual web server.
* @param webServer The web server's proxy interface.
*/
public void setWebServer(IWebServer webServer) {
this.webServer = webServer;
}//setWebServer()//
/* (non-Javadoc)
* @see com.foundation.web.monitor.shared.IWebServerInterface#getStatus()
*/
public IWebServerStatus getStatus() {
return webServerStatus;
}//getStatus()//
/* (non-Javadoc)
* @see com.foundation.web.monitor.shared.IWebServerInterface#getWebServerLog()
*/
public WebServerLog getWebServerLog() {
return webServerLog;
}//getWebServerLog()//
/* (non-Javadoc)
* @see com.foundation.web.manager.shared.IWebServerInterface#startup()
*/
public void startup() {
try {
String javaBinPath = WebServerMonitorApplication.getProperty(WebServerMonitorApplication.PROPERTY_JAVA_BIN_PATH);
String webServerPath = WebServerMonitorApplication.getProperty(WebServerMonitorApplication.PROPERTY_WEB_SERVER_PATH);
final SingleThreadedReflectionContext logContext = new SingleThreadedReflectionContext();
webServerProcess = Runtime.getRuntime().exec((javaBinPath != null ? javaBinPath + "/" : "") + "java.exe -XX:MaxPermSize=256m -Xmx2g -cp \"Brainstorm Web Server.jar\"; -Dproperties=\"release.properties\" -Dpath.server.xml=\"./server.xml\" -Dmonitor.port=\"" + webServerPort + "\" com.foundation.web.application.BrainstormWebServer \"./Brainstorm Web Server Core.jar\" \"./swt.jar\"", null, webServerPath != null ? new File(webServerPath) : null);
((WebServerStatus) getStatus()).setIsRunning(Boolean.TRUE);
logContext.initialize();
logContext.executeAsync(new IRunnable() {
// ThreadService.run(new Runnable() {
public Object run() {
InputStream in = webServerProcess.getInputStream();
StringBuilder line = new StringBuilder(100);
IManagedList logLines = (IManagedList) logContext.createReflection(webServerLog.getLines());
try {
while(true) {
int next = in.read();
if(next == -1) break;
line.append((char) next);
if(line.charAt(line.length() - 1) == '\n') {
// Debug.log(line.toString());
logLines.add(line.toString());
if(logLines.getSize() > 10000) {
logLines.remove(0);
}//if//
//Synchronize the log lines list with the reflected list if there are no more lines immiediately in the pipe. This is a slight efficiency improvement to reduce network traffic.//
if(in.available() == 0) {
logContext.synchronizeAll(null, false);
}//if//
line.setLength(0);
}//if//
}//while//
}//try//
catch(Throwable e) {
//Debug.log(e);
}//catch//
return null;
}//run()//
});
//Start a thread to wait for the web server process to terminate.//
ThreadService.run(new Runnable() {
public void run() {
try {
int exitValue = webServerProcess.waitFor();
((WebServerStatus) getStatus()).setIsRunning(Boolean.FALSE);
Debug.log("Web Server shutdown with exit value of: " + exitValue);
}//try//
catch(Throwable e) {
Debug.handle(e);
}//catch//
}//run()//
});
}//try//
catch(Throwable e) {
Debug.log("Failed to start the web server.", e);
}//catch//
}//startup()//
/* (non-Javadoc)
* @see com.foundation.web.manager.shared.IWebServerInterface#shutdown()
*/
public void shutdown() {
if(webServerProcess != null) {
webServerProcess.destroy();
webServerProcess = null;
}//if//
}//shutdown()//
}//WebServerInterface//