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,9 @@
<?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="/Foundation Web Server Shared"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Foundation Web Server Monitor Shared</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,16 @@
package com.foundation.web.monitor.shared;
/**
* Provides an connector to allow the web server manager tool to login and gain access to the web server's interface & controls.
*/
public interface IManagerConnector {
public static final String ORB_NAME = "ManagerConnector";
/**
* Lets the manager application login and gain access to the web server.
* @param user The user to login with.
* @param passwordHash The password hashed with the timestamp, used to login with.
* @param timestamp The timestamp used in the password hash. This shouldn't be too old otherwise the server may reject the login request.
* @return The web server's interface, or null if the login was unsuccessful.
*/
public IWebServerInterface login(String user, String passwordHash, long timestamp);
}//IManagerConnector//

View File

@@ -0,0 +1,32 @@
package com.foundation.web.monitor.shared;
import com.foundation.attribute.IReflectable;
import com.foundation.web.monitor.shared.model.IWebServerStatus;
import com.foundation.web.monitor.shared.model.WebServerLog;
import com.foundation.web.server.shared.IWebServer;
public interface IWebServerInterface {
/**
* Gets the web server status model.
* @return The model detailing the current status of the server.
*/
public IWebServerStatus getStatus();
/**
* Gets the web server reference.
* @return The web server.
*/
public IWebServer getWebServer();
/**
* Gets the log for the web server.
* @return The log containing the output of the web server.
*/
public WebServerLog getWebServerLog();
/**
* Starts up the web server.
*/
public void startup();
/**
* Shuts down the web server.
*/
public void shutdown();
}//IWebServerInterface//

View File

@@ -0,0 +1,12 @@
package com.foundation.web.monitor.shared.model;
import com.foundation.application.IApplication;
import com.foundation.model.Model;
public abstract class AbstractModel extends Model {
/**
* AbstractModel constructor.
*/
public AbstractModel() {
}//AbstractModel()//
}//AbstractModel//

View File

@@ -0,0 +1,11 @@
package com.foundation.web.monitor.shared.model;
import com.foundation.attribute.IReflectable;
public interface IWebServerStatus extends IReflectable {
/**
* Gets the isRunning value.
* @return The isRunning value.
*/
public Boolean getIsRunning();
}//IWebServerStatus//

View File

@@ -0,0 +1,39 @@
package com.foundation.web.monitor.shared.model;
import com.foundation.metadata.Attribute;
import com.foundation.util.IManagedList;
import com.foundation.util.ManagedList;
/**
* Maintains an overall log of output from the web server.
*/
public class WebServerLog extends AbstractModel {
public static final Attribute LINES = registerCollection(WebServerLog.class, "lines", AO_PART_OF | AO_LAZY);
/**
* WebServerLog constructor.
*/
public WebServerLog() {
}//WebServerLog()//
/* (non-Javadoc)
* @see com.foundation.common.Entity#lazyLoadAttribute(com.foundation.metadata.Attribute)
*/
protected Object lazyLoadAttribute(Attribute attribute) {
Object result = null;
if(attribute == LINES) {
result = new ManagedList(100, 100);
}//if//
else {
result = super.lazyLoadAttribute(attribute);
}//else//
return result;
}//lazyLoadAttribute()//
/**
* Gets the collection of log lines of text. Entries are java.lang.String's and go from oldest to newest.
* @return The collection of logged lines of text.
*/
public IManagedList getLines() {
return (IManagedList) getAttributeValue(LINES);
}//getLines()//
}//WebServerLog//

View File

@@ -0,0 +1,28 @@
package com.foundation.web.monitor.shared.model;
import com.foundation.metadata.Attribute;
/**
* Maintains the status of the web server.
*/
public class WebServerStatus extends AbstractModel implements IWebServerStatus {
public static final Attribute IS_RUNNING = registerAttribute(WebServerStatus.class, "isRunning", Boolean.FALSE);
/**
* WebServerStatus constructor.
*/
public WebServerStatus() {
}//WebServerStatus()//
/* (non-Javadoc)
* @see com.foundation.web.monitor.shared.model.IWebServerStatus#getIsRunning()
*/
public Boolean getIsRunning() {
return (Boolean) getAttributeValue(IS_RUNNING);
}//getIsRunning()//
/**
* Sets the isRunning value.
* @param isRunning The isRunning value.
*/
public void setIsRunning(Boolean isRunning) {
setAttributeValue(IS_RUNNING, isRunning);
}//setIsRunning()//
}//WebServerStatus//