janb 2003/08/15 07:12:56
Modified: modules/core/src/java/org/apache/geronimo/web
AbstractWebApplication.java
AbstractWebContainer.java WebConnector.java
WebContainer.java
Log:
Refactored Container to RPCContainer and AbstractRPCContainer. Many classes
in ejb package required modification
to use RPCContainer instead of Container - for now this is done with class
casts, which look messy, maybe theres
a better way.
Revision Changes Path
1.2 +72 -77
incubator-geronimo/modules/core/src/java/org/apache/geronimo/web/AbstractWebApplication.java
Index: AbstractWebApplication.java
===================================================================
RCS file:
/home/cvs/incubator-geronimo/modules/core/src/java/org/apache/geronimo/web/AbstractWebApplication.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- AbstractWebApplication.java 14 Aug 2003 09:55:11 -0000 1.1
+++ AbstractWebApplication.java 15 Aug 2003 14:12:56 -0000 1.2
@@ -54,7 +54,6 @@
* ====================================================================
*/
-
package org.apache.geronimo.web;
import java.net.URL;
@@ -62,7 +61,6 @@
import org.apache.geronimo.common.AbstractComponent;
import org.w3c.dom.Document;
-
/*
--------------------------------------------------------------------------------------
*/
/**
* AbstractWebApplication
@@ -74,14 +72,12 @@
*
* @version $Revision$ $Date$
*/
-public class AbstractWebApplication extends AbstractComponent implements
WebApplication {
-
-
- public AbstractWebApplication ()
- {
- }
-
+public class AbstractWebApplication
+ extends AbstractComponent
+ implements WebApplication
+{
+
/*
--------------------------------------------------------------------------------------
*/
/* Start the webapp. Called by the container or management interface
@@ -89,79 +85,78 @@
* @throws IllegalStateException
* @see org.apache.geronimo.common.Component#start()
*/
- public void doStart() throws Exception {
+ public void doStart()
+ throws Exception
+ {
if (getContainer() == null)
- throw new IllegalStateException ("WebApplication must have a
container set before START can be called");
-
- //start the webapp
- }
+ throw new IllegalStateException("WebApplication must have a
container set before START can be called");
+ //start the webapp
+ }
-
- /*
--------------------------------------------------------------------------------------
*/
- /* Stop the webapp. Called by the container, or by mangement
+ /*
--------------------------------------------------------------------------------------
*/
+ /* Stop the webapp. Called by the container, or by mangement
* interface
- *
- * @see org.apache.geronimo.common.Component#stop()
- */
- public void doStop() {
-
- }
+ *
+ * @see org.apache.geronimo.common.Component#stop()
+ */
+ public void doStop()
+ {
+ }
+ /*
--------------------------------------------------------------------------------------
*/
+ /* Return the list of Servlets of this webapp
+ * @return
+ * @see org.apache.geronimo.web.WebApplication#getServlets()
+ */
+ public String[] getServlets()
+ {
+ return null;
+ }
-
-
-
-
- /*
--------------------------------------------------------------------------------------
*/
- /* Return the list of Servlets of this webapp
- * @return
- * @see org.apache.geronimo.web.WebApplication#getServlets()
- */
- public String[] getServlets() {
- return null;
- }
-
-
- /*
--------------------------------------------------------------------------------------
*/
- /* Get the context path of this webapp
- * @return
- * @see org.apache.geronimo.web.WebApplication#getContextName()
- */
- public String getContextPath() {
- // TODO
- return null;
- }
-
- /*
--------------------------------------------------------------------------------------
*/
- /*
- * @return
- * @see org.apache.geronimo.web.WebApplication#getDeploymentDescriptor()
- */
- public Document getDeploymentDescriptor() {
- // TODO
- return null;
- }
-
- /*
--------------------------------------------------------------------------------------
*/
- /*
- * @return
- * @see
org.apache.geronimo.web.WebApplication#getDeploymentDescriptorURL()
- */
- public URL getDeploymentDescriptorURL() {
- // TODO
- return null;
- }
-
- /*
--------------------------------------------------------------------------------------
*/
- /*
- * @return
- * @see org.apache.geronimo.web.WebApplication#getURL()
- */
- public URL getURL() {
- // TODO
- return null;
- }
+ /*
--------------------------------------------------------------------------------------
*/
+ /* Get the context path of this webapp
+ * @return
+ * @see org.apache.geronimo.web.WebApplication#getContextName()
+ */
+ public String getContextPath()
+ {
+ // TODO
+ return null;
+ }
+
+ /*
--------------------------------------------------------------------------------------
*/
+ /*
+ * @return
+ * @see org.apache.geronimo.web.WebApplication#getDeploymentDescriptor()
+ */
+ public Document getDeploymentDescriptor()
+ {
+ // TODO
+ return null;
+ }
+
+ /*
--------------------------------------------------------------------------------------
*/
+ /*
+ * @return
+ * @see
org.apache.geronimo.web.WebApplication#getDeploymentDescriptorURL()
+ */
+ public URL getDeploymentDescriptorURL()
+ {
+ // TODO
+ return null;
+ }
+
+ /*
--------------------------------------------------------------------------------------
*/
+ /*
+ * @return
+ * @see org.apache.geronimo.web.WebApplication#getURL()
+ */
+ public URL getURL()
+ {
+ // TODO
+ return null;
+ }
}
1.2 +3 -61
incubator-geronimo/modules/core/src/java/org/apache/geronimo/web/AbstractWebContainer.java
Index: AbstractWebContainer.java
===================================================================
RCS file:
/home/cvs/incubator-geronimo/modules/core/src/java/org/apache/geronimo/web/AbstractWebContainer.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- AbstractWebContainer.java 14 Aug 2003 09:55:11 -0000 1.1
+++ AbstractWebContainer.java 15 Aug 2003 14:12:56 -0000 1.2
@@ -58,11 +58,10 @@
-import javax.management.ObjectName;
+
import org.apache.geronimo.common.AbstractContainer;
-import org.apache.geronimo.common.Invocation;
-import org.apache.geronimo.common.InvocationResult;
+
@@ -138,63 +137,6 @@
defaultWebXmlURL = url;
}
- /*
--------------------------------------------------------------------------------------
*/
- /* @todo work out if this method can be delegated to some other subclass
- * @param invocation
- * @return
- * @throws Exception
- * @see
org.apache.geronimo.common.Container#invoke(org.apache.geronimo.common.Invocation)
- */
- public InvocationResult invoke(Invocation invocation) throws Exception {
- // TODO
- return null;
- }
-
- /*
--------------------------------------------------------------------------------------
*/
- /* @todo work out what relationship, if any, this has to Component
- * @param logicalPluginName
- * @return
- * @see org.apache.geronimo.common.Container#getPlugin(java.lang.String)
- */
- public ObjectName getPlugin(String logicalPluginName) {
- // TODO
- return null;
- }
-
- /*
--------------------------------------------------------------------------------------
*/
- /* @todo Work out if this is the method to add Components.
- *
- * @param logicalPluginName
- * @param objectName
- * @see
org.apache.geronimo.common.Container#putPlugin(java.lang.String,
javax.management.ObjectName)
- */
- public void putPlugin(String logicalPluginName, ObjectName objectName) {
- // TODO
-
- }
-
- /*
--------------------------------------------------------------------------------------
*/
- /* @todo work out what relationship if any this has to Components
- * @param logicalPluginName
- * @return
- * @deprecated
- * @see
org.apache.geronimo.common.Container#getPluginObject(java.lang.String)
- */
- public Object getPluginObject(String logicalPluginName) {
- // TODO
- return null;
- }
- /*
--------------------------------------------------------------------------------------
*/
- /* @todo workout what relationship, if any, this has to Components
- * @param logicalPluginName
- * @param plugin
- * @deprecated
- * @see
org.apache.geronimo.common.Container#putPluginObject(java.lang.String,
java.lang.Object)
- */
- public void putPluginObject(String logicalPluginName, Object plugin) {
- // TODO
-
- }
}
1.4 +52 -57
incubator-geronimo/modules/core/src/java/org/apache/geronimo/web/WebConnector.java
Index: WebConnector.java
===================================================================
RCS file:
/home/cvs/incubator-geronimo/modules/core/src/java/org/apache/geronimo/web/WebConnector.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- WebConnector.java 14 Aug 2003 20:24:34 -0000 1.3
+++ WebConnector.java 15 Aug 2003 14:12:56 -0000 1.4
@@ -63,13 +63,8 @@
*/
package org.apache.geronimo.web;
-
-
import org.apache.geronimo.common.Component;
-
-
-
/*
--------------------------------------------------------------------------------------
*/
/**
* WebConnector
@@ -77,57 +72,57 @@
*
* @version $Revision$ $Date$
*/
-public interface WebConnector extends Component {
+public interface WebConnector extends Component
+{
+
/*--------------------------------------------------------------------------------
*/
+ /** Port number of connector
+ * @param port number on which to listen
+ */
+ public void setPort(int port);
+
+ public int getPort();
+
+
/*--------------------------------------------------------------------------------
*/
+ /** Protocol of connector
+ * @param protocol eg http, https, ftp etc
+ */
+ public void setProtocol(String protocol);
+
+ public String getProtocol();
+
+
/*--------------------------------------------------------------------------------
*/
+ /** Interface of connector
+ * @param iface (hostname or IP) on which to listen
+ */
+ public void setInterface(String iface);
+
+ public String getInterface();
+
+
/*--------------------------------------------------------------------------------
*/
+ /** Maximum number of connections supported by connector
+ * @param maxConnects
+ */
+ public void setMaxConnections(int maxConnects);
+
+ public int getMaxConnections();
+
+
/*--------------------------------------------------------------------------------
*/
+ /** Maximum time (in ms) that a connection can be idle
+ * before the connector will close it.
+ * @param maxIdleTime time in msec
+ */
+ public void setMaxIdleTime(int maxIdleTime);
+
+ public int getMaxIdleTime();
+
+
/*--------------------------------------------------------------------------------
*/
+ /** Names of contexts that must be registered and started
+ * in the associated web container before this connector will
+ * accept connections.
+ * @param contexts
+ */
+ public void setContexts(String[] contexts);
-
/*--------------------------------------------------------------------------------
*/
- /** Port number of connector
- * @param port number on which to listen
- */
- public void setPort (int port);
-
- public int getPort ();
-
-
/*--------------------------------------------------------------------------------
*/
- /** Protocol of connector
- * @param protocol eg http, https, ftp etc
- */
- public void setProtocol (String protocol);
-
- public String getProtocol();
-
-
/*--------------------------------------------------------------------------------
*/
- /** Interface of connector
- * @param iface (hostname or IP) on which to listen
- */
- public void setInterface (String iface);
-
- public String getInterface ();
-
-
/*--------------------------------------------------------------------------------
*/
- /** Maximum number of connections supported by connector
- * @param maxConnects
- */
- public void setMaxConnections (int maxConnects);
-
- public int getMaxConnections ();
-
-
/*--------------------------------------------------------------------------------
*/
- /** Maximum time (in ms) that a connection can be idle
- * before the connector will close it.
- * @param maxIdleTime time in msec
- */
- public void setMaxIdleTime (int maxIdleTime);
-
- public int getMaxIdleTime ();
-
-
/*--------------------------------------------------------------------------------
*/
- /** Names of contexts that must be registered and started
- * in the associated web container before this connector will
- * accept connections.
- * @param contexts
- */
- public void setContexts (String[] contexts);
-
- public String[] getContexts();
+ public String[] getContexts();
}
1.2 +20 -24
incubator-geronimo/modules/core/src/java/org/apache/geronimo/web/WebContainer.java
Index: WebContainer.java
===================================================================
RCS file:
/home/cvs/incubator-geronimo/modules/core/src/java/org/apache/geronimo/web/WebContainer.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- WebContainer.java 14 Aug 2003 09:55:11 -0000 1.1
+++ WebContainer.java 15 Aug 2003 14:12:56 -0000 1.2
@@ -54,7 +54,6 @@
* ====================================================================
*/
-
package org.apache.geronimo.web;
import org.apache.geronimo.common.Container;
@@ -63,33 +62,30 @@
* WebContainer
*
*
- * @version $Revision$
+ * @version $Revision$ $Date$
*/
-public interface WebContainer extends Container {
+public interface WebContainer extends Container
+{
-
-
/*--------------------------------------------------------------------------------
*/
- /** Deploy a web application. Convenience method to
+
/*--------------------------------------------------------------------------------
*/
+ /** Deploy a web application. Convenience method to
* have the container create the WebApplication and add it to itself.
- * @param url
- * @throws Exception
- */
- public void deploy (String url) throws Exception;
-
-
+ * @param url
+ * @throws Exception
+ */
+ public void deploy(String url) throws Exception;
-
/*--------------------------------------------------------------------------------
*/
- /** Set up a web.xml descriptor for the Container to use as
+
/*--------------------------------------------------------------------------------
*/
+ /** Set up a web.xml descriptor for the Container to use as
* defaults.
- * @param url
- */
- public void setDefaultWebXmlURL (String url);
-
-
-
/*--------------------------------------------------------------------------------
*/
- /** Get the url of the default web.xml descriptor used
+ * @param url
+ */
+ public void setDefaultWebXmlURL(String url);
+
+
/*--------------------------------------------------------------------------------
*/
+ /** Get the url of the default web.xml descriptor used
* by this container.
- * @return
- */
- public String getDefaultWebXmlURL ();
+ * @return
+ */
+ public String getDefaultWebXmlURL();
}