Skip to Content.
Sympa Menu

notify-dpml - r1092 - in trunk/main: metro/exec/src/main/net/dpml/metro/exec metro/model/src/main/net/dpml/metro metro/runtime/src/main/net/dpml/metro/runtime metro/test/src/main/net/dpml/test/composite metro/test/src/test/net/dpml/metro/runtime/test metro/tools/src/main/net/dpml/metro/tools planet/http/impl/src/main/net/dpml/http planet/http/test/src/test/net/dpml/http/test planet/http/war/src/main/org/acme

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: mcconnell at BerliOS <mcconnell AT mail.berlios.de>
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: r1092 - in trunk/main: metro/exec/src/main/net/dpml/metro/exec metro/model/src/main/net/dpml/metro metro/runtime/src/main/net/dpml/metro/runtime metro/test/src/main/net/dpml/test/composite metro/test/src/test/net/dpml/metro/runtime/test metro/tools/src/main/net/dpml/metro/tools planet/http/impl/src/main/net/dpml/http planet/http/test/src/test/net/dpml/http/test planet/http/war/src/main/org/acme
  • Date: Tue, 14 Feb 2006 10:36:36 +0100

Author: mcconnell
Date: 2006-02-14 10:36:29 +0100 (Tue, 14 Feb 2006)
New Revision: 1092

Added:
trunk/main/metro/model/src/main/net/dpml/metro/ComponentModelManager.java
trunk/main/metro/model/src/main/net/dpml/metro/ContextModelManager.java
Removed:
trunk/main/metro/model/src/main/net/dpml/metro/ComponentManager.java

trunk/main/metro/model/src/main/net/dpml/metro/ComponentModelOperations.java
trunk/main/metro/model/src/main/net/dpml/metro/ContextManager.java
trunk/main/metro/model/src/main/net/dpml/metro/ContextModelOperations.java
Modified:
trunk/main/metro/exec/src/main/net/dpml/metro/exec/ComponentAdapter.java
trunk/main/metro/model/src/main/net/dpml/metro/ComponentContext.java
trunk/main/metro/model/src/main/net/dpml/metro/ComponentHandler.java
trunk/main/metro/model/src/main/net/dpml/metro/ComponentModel.java
trunk/main/metro/model/src/main/net/dpml/metro/ContextModel.java

trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultComponentHandler.java

trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultComponentModel.java

trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultContextModel.java

trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultPartsManager.java
trunk/main/metro/test/src/main/net/dpml/test/composite/PartsComponent.java

trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/ContextModelTestCase.java

trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/ObserverTestCase.java
trunk/main/metro/tools/src/main/net/dpml/metro/tools/ValueDataType.java
trunk/main/planet/http/impl/src/main/net/dpml/http/BoundedThreadPool.java
trunk/main/planet/http/impl/src/main/net/dpml/http/ContextHelper.java
trunk/main/planet/http/impl/src/main/net/dpml/http/HashUserRealm.java

trunk/main/planet/http/impl/src/main/net/dpml/http/ResourceContextHandler.java
trunk/main/planet/http/impl/src/main/net/dpml/http/ResourceHandler.java
trunk/main/planet/http/impl/src/main/net/dpml/http/Server.java

trunk/main/planet/http/impl/src/main/net/dpml/http/ServletContextHandler.java
trunk/main/planet/http/impl/src/main/net/dpml/http/ServletHandler.java
trunk/main/planet/http/impl/src/main/net/dpml/http/ServletHolder.java
trunk/main/planet/http/impl/src/main/net/dpml/http/ServletMapping.java
trunk/main/planet/http/impl/src/main/net/dpml/http/SslSocketConnector.java

trunk/main/planet/http/impl/src/main/net/dpml/http/WebAppContextHandler.java
trunk/main/planet/http/test/src/test/net/dpml/http/test/ServerTestCase.java
trunk/main/planet/http/war/src/main/org/acme/DispatchServlet.java
Log:
checkstyle

Modified:
trunk/main/metro/exec/src/main/net/dpml/metro/exec/ComponentAdapter.java
===================================================================
--- trunk/main/metro/exec/src/main/net/dpml/metro/exec/ComponentAdapter.java
2006-02-14 06:22:39 UTC (rev 1091)
+++ trunk/main/metro/exec/src/main/net/dpml/metro/exec/ComponentAdapter.java
2006-02-14 09:36:29 UTC (rev 1092)
@@ -43,8 +43,8 @@
import net.dpml.part.Model;
import net.dpml.part.Service;

-import net.dpml.metro.ComponentManager;
-import net.dpml.metro.ContextManager;
+import net.dpml.metro.ComponentModelManager;
+import net.dpml.metro.ContextModelManager;

import net.dpml.configuration.Configurable;
import net.dpml.configuration.Configuration;
@@ -156,10 +156,10 @@
throw new UnsupportedOperationException( "Parameters not
currently supported." );
}

- if( model instanceof ComponentManager )
+ if( model instanceof ComponentModelManager )
{
- ComponentManager componentModel = (ComponentManager) model;
- ContextManager cm = componentModel.getContextManager();
+ ComponentModelManager componentModel = (ComponentModelManager)
model;
+ ContextModelManager cm = componentModel.getContextManager();
Enumeration names = properties.propertyNames();
while( names.hasMoreElements() )
{

Modified: trunk/main/metro/model/src/main/net/dpml/metro/ComponentContext.java
===================================================================
--- trunk/main/metro/model/src/main/net/dpml/metro/ComponentContext.java
2006-02-14 06:22:39 UTC (rev 1091)
+++ trunk/main/metro/model/src/main/net/dpml/metro/ComponentContext.java
2006-02-14 09:36:29 UTC (rev 1092)
@@ -19,6 +19,7 @@
package net.dpml.metro;

import java.net.URI;
+import java.rmi.RemoteException;

import net.dpml.part.Controller;

@@ -36,7 +37,7 @@
* Return the current controller.
* @return the root system controller
*/
- Controller getController();
+ Controller getController() throws RemoteException;

/**
* Create a nested component handler.

Modified: trunk/main/metro/model/src/main/net/dpml/metro/ComponentHandler.java
===================================================================
--- trunk/main/metro/model/src/main/net/dpml/metro/ComponentHandler.java
2006-02-14 06:22:39 UTC (rev 1091)
+++ trunk/main/metro/model/src/main/net/dpml/metro/ComponentHandler.java
2006-02-14 09:36:29 UTC (rev 1092)
@@ -18,8 +18,10 @@

package net.dpml.metro;

+import java.rmi.RemoteException;
import java.util.Map;

+import net.dpml.part.Component;
import net.dpml.part.ComponentOperations;

/**
@@ -29,7 +31,8 @@
* @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
* @version @PROJECT-VERSION@
*/
-public interface ComponentHandler extends ComponentOperations,
ComponentContext
+//public interface ComponentHandler extends ComponentOperations,
ComponentContext
+public interface ComponentHandler extends Component, ComponentContext
{
/**
* Return a mutable context map. The map may be used by component
@@ -38,18 +41,18 @@
*
* @return the context map
*/
- Map getContextMap();
+ Map getContextMap() throws RemoteException;

/**
* Return the manager for the assigned component model.
* @return the component model manager
*/
- ComponentManager getComponentManager();
+ ComponentModelManager getComponentManager() throws RemoteException;

/**
* Return the internal parts manager.
* @return the parts manager
*/
- PartsManager getPartsManager();
+ PartsManager getPartsManager() throws RemoteException;
}


Deleted: trunk/main/metro/model/src/main/net/dpml/metro/ComponentManager.java
===================================================================
--- trunk/main/metro/model/src/main/net/dpml/metro/ComponentManager.java
2006-02-14 06:22:39 UTC (rev 1091)
+++ trunk/main/metro/model/src/main/net/dpml/metro/ComponentManager.java
2006-02-14 09:36:29 UTC (rev 1092)
@@ -1,69 +0,0 @@
-/*
- * Copyright 2005 Stephen J. McConnell.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied.
- *
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package net.dpml.metro;
-
-import net.dpml.metro.info.CollectionPolicy;
-
-import net.dpml.part.ActivationPolicy;
-
-import net.dpml.lang.UnknownKeyException;
-
-/**
- * The ComponentManager interface provides support for manipulatation of
- * a local component model.
- *
- * @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
- * @version @PROJECT-VERSION@
- */
-public interface ComponentManager extends ComponentModelOperations
-{
- /**
- * Return the context model manager.
- * @return the context model manager
- */
- ContextManager getContextManager();
-
- /**
- * Return the set of subsidiary component model keys.
- * @return the part keys
- */
- String[] getPartKeys();
-
- /**
- * Return a subsidiary component manager.
- * @param key the component part key
- * @return the component manager
- * @exception UnknownKeyException if the key is not recognized
- * @see #getPartKeys()
- */
- ComponentManager getComponentManager( String key ) throws
UnknownKeyException;
-
- /**
- * Set the component activation policy to the supplied value.
- * @param policy the new activation policy
- */
- void setActivationPolicy( ActivationPolicy policy );
-
- /**
- * Override the assigned collection policy.
- * @param policy the collection policy value
- */
- void setCollectionPolicy( CollectionPolicy policy );
-}
-

Modified: trunk/main/metro/model/src/main/net/dpml/metro/ComponentModel.java
===================================================================
--- trunk/main/metro/model/src/main/net/dpml/metro/ComponentModel.java
2006-02-14 06:22:39 UTC (rev 1091)
+++ trunk/main/metro/model/src/main/net/dpml/metro/ComponentModel.java
2006-02-14 09:36:29 UTC (rev 1092)
@@ -22,6 +22,15 @@

import net.dpml.part.Model;

+import net.dpml.metro.info.LifestylePolicy;
+import net.dpml.metro.info.CollectionPolicy;
+import net.dpml.metro.data.ClassLoaderDirective;
+import net.dpml.metro.data.CategoryDirective;
+
+import net.dpml.configuration.Configuration;
+
+import net.dpml.parameters.Parameters;
+
/**
* The ComponentModel interface defines the remotely accessible aspects of a
component
* configuration.
@@ -29,7 +38,7 @@
* @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
* @version @PROJECT-VERSION@
*/
-public interface ComponentModel extends Model, ComponentModelOperations
+public interface ComponentModel extends Model
{
/**
* Return the current context model.
@@ -38,5 +47,65 @@
* @exception RemoteException if a remote exception occurs
*/
ContextModel getContextModel() throws RemoteException;
-}

+ /**
+ * Return the component name.
+ * @return the name
+ * @exception RemoteException if a remote exception occurs
+ */
+ String getName() throws RemoteException;
+
+ /**
+ * Return the component implementation class name.
+ *
+ * @return the classname of the implementation
+ * @exception RemoteException if a remote exception occurs
+ */
+ String getImplementationClassName() throws RemoteException;
+
+ /**
+ * Return the component classloader directive.
+ *
+ * @return the classloader directive for the component
+ * @exception RemoteException if a remote exception occurs
+ */
+ ClassLoaderDirective getClassLoaderDirective() throws RemoteException;
+
+ /**
+ * Return the component lifestyle policy.
+ *
+ * @return the lifestyle policy value
+ * @exception RemoteException if a remote exception occurs
+ */
+ LifestylePolicy getLifestylePolicy() throws RemoteException;
+
+ /**
+ * Return the current component collection policy. If null, the component
+ * type collection policy will be returned.
+ *
+ * @return a HARD, WEAK, SOFT or SYSTEM
+ * @exception RemoteException if a remote exception occurs
+ */
+ CollectionPolicy getCollectionPolicy() throws RemoteException;
+
+ /**
+ * Return the component configuration.
+ * @return the configuration
+ * @exception RemoteException if a remote exception occurs
+ */
+ Configuration getConfiguration() throws RemoteException;
+
+ /**
+ * Return the component parameters.
+ * @return the parameters
+ * @exception RemoteException if a remote exception occurs
+ */
+ Parameters getParameters() throws RemoteException;
+
+ /**
+ * Return the component logging categories.
+ * @return the categories
+ * @exception RemoteException if a remote exception occurs
+ */
+ CategoryDirective[] getCategoryDirectives() throws RemoteException;}
+

Copied:
trunk/main/metro/model/src/main/net/dpml/metro/ComponentModelManager.java
(from rev 1088,
trunk/main/metro/model/src/main/net/dpml/metro/ComponentManager.java)
===================================================================
--- trunk/main/metro/model/src/main/net/dpml/metro/ComponentManager.java
2006-02-13 02:09:38 UTC (rev 1088)
+++ trunk/main/metro/model/src/main/net/dpml/metro/ComponentModelManager.java
2006-02-14 09:36:29 UTC (rev 1092)
@@ -0,0 +1,71 @@
+/*
+ * Copyright 2005 Stephen J. McConnell.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied.
+ *
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.dpml.metro;
+
+import java.rmi.RemoteException;
+
+import net.dpml.metro.info.CollectionPolicy;
+
+import net.dpml.part.ActivationPolicy;
+
+import net.dpml.lang.UnknownKeyException;
+
+/**
+ * The ComponentManager interface provides support for manipulatation of
+ * a local component model.
+ *
+ * @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
+ * @version @PROJECT-VERSION@
+ */
+public interface ComponentModelManager extends ComponentModel
+{
+ /**
+ * Return the context model manager.
+ * @return the context model manager
+ */
+ ContextModelManager getContextManager() throws RemoteException;
+
+ /**
+ * Return the set of subsidiary component model keys.
+ * @return the part keys
+ */
+ String[] getPartKeys() throws RemoteException;
+
+ /**
+ * Return a subsidiary component manager.
+ * @param key the component part key
+ * @return the component manager
+ * @exception UnknownKeyException if the key is not recognized
+ * @see #getPartKeys()
+ */
+ ComponentModelManager getComponentManager( String key ) throws
UnknownKeyException, RemoteException;
+
+ /**
+ * Set the component activation policy to the supplied value.
+ * @param policy the new activation policy
+ */
+ void setActivationPolicy( ActivationPolicy policy ) throws
RemoteException;
+
+ /**
+ * Override the assigned collection policy.
+ * @param policy the collection policy value
+ */
+ void setCollectionPolicy( CollectionPolicy policy ) throws
RemoteException;
+}
+

Deleted:
trunk/main/metro/model/src/main/net/dpml/metro/ComponentModelOperations.java
===================================================================
---
trunk/main/metro/model/src/main/net/dpml/metro/ComponentModelOperations.java
2006-02-14 06:22:39 UTC (rev 1091)
+++
trunk/main/metro/model/src/main/net/dpml/metro/ComponentModelOperations.java
2006-02-14 09:36:29 UTC (rev 1092)
@@ -1,103 +0,0 @@
-/*
- * Copyright 2005 Stephen J. McConnell.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied.
- *
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package net.dpml.metro;
-
-import java.rmi.RemoteException;
-
-import net.dpml.metro.info.LifestylePolicy;
-import net.dpml.metro.info.CollectionPolicy;
-import net.dpml.metro.data.ClassLoaderDirective;
-import net.dpml.metro.data.CategoryDirective;
-
-import net.dpml.configuration.Configuration;
-
-import net.dpml.parameters.Parameters;
-
-/**
- * The ComponentModelOperations interface defines the set of operations
shared
- * across local and remote clients.
- *
- * @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
- * @version @PROJECT-VERSION@
- */
-public interface ComponentModelOperations
-{
- /**
- * Return the component name.
- * @return the name
- * @exception RemoteException if a remote exception occurs
- */
- String getName() throws RemoteException;
-
- /**
- * Return the component implementation class name.
- *
- * @return the classname of the implementation
- * @exception RemoteException if a remote exception occurs
- */
- String getImplementationClassName() throws RemoteException;
-
- /**
- * Return the component classloader directive.
- *
- * @return the classloader directive for the component
- * @exception RemoteException if a remote exception occurs
- */
- ClassLoaderDirective getClassLoaderDirective() throws RemoteException;
-
- /**
- * Return the component lifestyle policy.
- *
- * @return the lifestyle policy value
- * @exception RemoteException if a remote exception occurs
- */
- LifestylePolicy getLifestylePolicy() throws RemoteException;
-
- /**
- * Return the current component collection policy. If null, the component
- * type collection policy will be returned.
- *
- * @return a HARD, WEAK, SOFT or SYSTEM
- * @exception RemoteException if a remote exception occurs
- */
- CollectionPolicy getCollectionPolicy() throws RemoteException;
-
- /**
- * Return the component configuration.
- * @return the configuration
- * @exception RemoteException if a remote exception occurs
- */
- Configuration getConfiguration() throws RemoteException;
-
- /**
- * Return the component parameters.
- * @return the parameters
- * @exception RemoteException if a remote exception occurs
- */
- Parameters getParameters() throws RemoteException;
-
- /**
- * Return the component logging categories.
- * @return the categories
- * @exception RemoteException if a remote exception occurs
- */
- CategoryDirective[] getCategoryDirectives() throws RemoteException;
-
-}
-

Deleted: trunk/main/metro/model/src/main/net/dpml/metro/ContextManager.java
===================================================================
--- trunk/main/metro/model/src/main/net/dpml/metro/ContextManager.java
2006-02-14 06:22:39 UTC (rev 1091)
+++ trunk/main/metro/model/src/main/net/dpml/metro/ContextManager.java
2006-02-14 09:36:29 UTC (rev 1092)
@@ -1,54 +0,0 @@
-/*
- * Copyright 2005 Stephen J. McConnell.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied.
- *
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package net.dpml.metro;
-
-import net.dpml.metro.info.PartReference;
-
-import net.dpml.part.Directive;
-
-import net.dpml.lang.UnknownKeyException;
-
-/**
- * The ContextManager interface exposes a management view of a local context
model
- *
- * @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
- * @version @PROJECT-VERSION@
- */
-public interface ContextManager extends ContextModelOperations
-{
- /**
- * Set a context entry directive value.
- * @param key the context entry key
- * @param directive the context entry directive
- * @exception UnknownKeyException if the key is unknown
- */
- void setEntryDirective( String key, Directive directive ) throws
UnknownKeyException;
-
- /**
- * Apply an array of tagged directive as an atomic operation.
Application of
- * directives to the context model is atomic such that changes are
applied under a
- * 'all-or-nothing' policy.
- *
- * @param directives an array of part references
- * @exception UnknownKeyException if a key within the array does not
match a key within
- * the context model.
- */
- void setEntryDirectives( PartReference[] directives ) throws
UnknownKeyException;
-
-}

Modified: trunk/main/metro/model/src/main/net/dpml/metro/ContextModel.java
===================================================================
--- trunk/main/metro/model/src/main/net/dpml/metro/ContextModel.java
2006-02-14 06:22:39 UTC (rev 1091)
+++ trunk/main/metro/model/src/main/net/dpml/metro/ContextModel.java
2006-02-14 09:36:29 UTC (rev 1092)
@@ -19,13 +19,53 @@
package net.dpml.metro;

import java.rmi.Remote;
+import java.rmi.RemoteException;

+import net.dpml.metro.info.EntryDescriptor;
+import net.dpml.part.Directive;
+
+import net.dpml.lang.UnknownKeyException;
+
+
/**
* The ContextModel interface defines the remotely accessible component
context.
*
* @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
* @version @PROJECT-VERSION@
*/
-public interface ContextModel extends Remote, ContextModelOperations
+public interface ContextModel extends Remote
{
+ /**
+ * Return the set of context entries descriptors.
+ *
+ * @return context entry descriptor array
+ * @exception RemoteException if a remote exception occurs
+ */
+ EntryDescriptor[] getEntryDescriptors() throws RemoteException;
+
+ /**
+ * Return a of context entry descriptor.
+ *
+ * @param key the entry key
+ * @return the entry descriptor
+ * @exception UnknownKeyException if the key is unknown
+ * @exception RemoteException if a remote exception occurs
+ */
+ EntryDescriptor getEntryDescriptor( String key ) throws
UnknownKeyException, RemoteException;
+
+ /**
+ * Return the current directive assigned to a context entry.
+ * @param key the context entry key
+ * @return the directive
+ * @exception UnknownKeyException if the key is unknown
+ * @exception RemoteException if a remote exception occurs
+ */
+ Directive getEntryDirective( String key ) throws UnknownKeyException,
RemoteException;
+
+ /**
+ * Validate the model.
+ * @exception ValidationException if one or more issues exist within the
model
+ * @exception RemoteException if a remote exception occurs
+ */
+ void validate() throws ValidationException, RemoteException;
}

Copied:
trunk/main/metro/model/src/main/net/dpml/metro/ContextModelManager.java (from
rev 1088, trunk/main/metro/model/src/main/net/dpml/metro/ContextManager.java)
===================================================================
--- trunk/main/metro/model/src/main/net/dpml/metro/ContextManager.java
2006-02-13 02:09:38 UTC (rev 1088)
+++ trunk/main/metro/model/src/main/net/dpml/metro/ContextModelManager.java
2006-02-14 09:36:29 UTC (rev 1092)
@@ -0,0 +1,56 @@
+/*
+ * Copyright 2005 Stephen J. McConnell.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied.
+ *
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.dpml.metro;
+
+import java.rmi.RemoteException;
+
+import net.dpml.metro.info.PartReference;
+
+import net.dpml.part.Directive;
+
+import net.dpml.lang.UnknownKeyException;
+
+/**
+ * The ContextModelManager interface exposes a management view of a local
context model
+ *
+ * @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
+ * @version @PROJECT-VERSION@
+ */
+public interface ContextModelManager extends ContextModel
+{
+ /**
+ * Set a context entry directive value.
+ * @param key the context entry key
+ * @param directive the context entry directive
+ * @exception UnknownKeyException if the key is unknown
+ */
+ void setEntryDirective( String key, Directive directive ) throws
UnknownKeyException, RemoteException;
+
+ /**
+ * Apply an array of tagged directive as an atomic operation.
Application of
+ * directives to the context model is atomic such that changes are
applied under a
+ * 'all-or-nothing' policy.
+ *
+ * @param directives an array of part references
+ * @exception UnknownKeyException if a key within the array does not
match a key within
+ * the context model.
+ */
+ void setEntryDirectives( PartReference[] directives ) throws
UnknownKeyException, RemoteException;
+
+}

Deleted:
trunk/main/metro/model/src/main/net/dpml/metro/ContextModelOperations.java
===================================================================
---
trunk/main/metro/model/src/main/net/dpml/metro/ContextModelOperations.java
2006-02-14 06:22:39 UTC (rev 1091)
+++
trunk/main/metro/model/src/main/net/dpml/metro/ContextModelOperations.java
2006-02-14 09:36:29 UTC (rev 1092)
@@ -1,70 +0,0 @@
-/*
- * Copyright 2005 Stephen J. McConnell.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied.
- *
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package net.dpml.metro;
-
-import java.rmi.RemoteException;
-
-import net.dpml.metro.info.EntryDescriptor;
-import net.dpml.part.Directive;
-
-import net.dpml.lang.UnknownKeyException;
-
-/**
- * The ContextModelOperations interface defines the operations common to
- * local and remote consumers of a component context.
- *
- * @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
- * @version @PROJECT-VERSION@
- */
-public interface ContextModelOperations
-{
- /**
- * Return the set of context entries descriptors.
- *
- * @return context entry descriptor array
- * @exception RemoteException if a remote exception occurs
- */
- EntryDescriptor[] getEntryDescriptors() throws RemoteException;
-
- /**
- * Return a of context entry descriptor.
- *
- * @param key the entry key
- * @return the entry descriptor
- * @exception UnknownKeyException if the key is unknown
- * @exception RemoteException if a remote exception occurs
- */
- EntryDescriptor getEntryDescriptor( String key ) throws
UnknownKeyException, RemoteException;
-
- /**
- * Return the current directive assigned to a context entry.
- * @param key the context entry key
- * @return the directive
- * @exception UnknownKeyException if the key is unknown
- * @exception RemoteException if a remote exception occurs
- */
- Directive getEntryDirective( String key ) throws UnknownKeyException,
RemoteException;
-
- /**
- * Validate the model.
- * @exception ValidationException if one or more issues exist within the
model
- * @exception RemoteException if a remote exception occurs
- */
- void validate() throws ValidationException, RemoteException;
-}

Modified:
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultComponentHandler.java
===================================================================
---
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultComponentHandler.java
2006-02-14 06:22:39 UTC (rev 1091)
+++
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultComponentHandler.java
2006-02-14 09:36:29 UTC (rev 1092)
@@ -42,7 +42,7 @@
import net.dpml.metro.ComponentModel;
import net.dpml.metro.ComponentHandler;
import net.dpml.metro.PartsManager;
-import net.dpml.metro.ComponentManager;
+import net.dpml.metro.ComponentModelManager;

import net.dpml.logging.Logger;

@@ -343,16 +343,16 @@
* Return the component model assiged to the handler.
* @return the component model
*/
- public ComponentManager getComponentManager()
+ public ComponentModelManager getComponentManager()
{
- if( m_model instanceof ComponentManager )
+ if( m_model instanceof ComponentModelManager )
{
- return (ComponentManager) m_model;
+ return (ComponentModelManager) m_model;
}
else
{
final String error =
- "Cannot cast componet model to the manager interface.";
+ "Cannot cast component model to the manager interface.";
throw new IllegalStateException( error );
}
}

Modified:
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultComponentModel.java
===================================================================
---
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultComponentModel.java
2006-02-14 06:22:39 UTC (rev 1091)
+++
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultComponentModel.java
2006-02-14 09:36:29 UTC (rev 1092)
@@ -36,8 +36,8 @@
import net.dpml.metro.info.Composite;
import net.dpml.metro.ComponentModel;
import net.dpml.metro.ContextModel;
-import net.dpml.metro.ComponentManager;
-import net.dpml.metro.ContextManager;
+import net.dpml.metro.ComponentModelManager;
+import net.dpml.metro.ContextModelManager;

import net.dpml.part.Directive;
import net.dpml.part.ActivationPolicy;
@@ -64,7 +64,7 @@
* @version @PROJECT-VERSION@
*/
class DefaultComponentModel extends UnicastEventSource
- implements ComponentModel, ComponentManager, Configurable
+ implements ComponentModelManager, Configurable
{
//
------------------------------------------------------------------------
// state
@@ -328,11 +328,11 @@
* Return the context manager.
* @return the context manager
*/
- public ContextManager getContextManager()
+ public ContextModelManager getContextManager()
{
- if( m_context instanceof ContextManager )
+ if( m_context instanceof ContextModelManager )
{
- return (ContextManager) m_context;
+ return (ContextModelManager) m_context;
}
else
{
@@ -355,9 +355,9 @@
* Return the component model of an internal part referenced by the
supplied key.
* @return the internal part component model
*/
- public ComponentManager getComponentManager( String key ) throws
UnknownKeyException
+ public ComponentModelManager getComponentManager( String key ) throws
UnknownKeyException
{
- ComponentManager model = (ComponentManager) m_parts.get( key );
+ ComponentModelManager model = (ComponentModelManager) m_parts.get(
key );
if( null == model )
{
throw new UnknownKeyException( key );

Modified:
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultContextModel.java
===================================================================
---
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultContextModel.java
2006-02-14 06:22:39 UTC (rev 1091)
+++
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultContextModel.java
2006-02-14 09:36:29 UTC (rev 1092)
@@ -31,7 +31,7 @@
import net.dpml.metro.info.PartReference;
import net.dpml.metro.info.Type;

-import net.dpml.metro.ContextManager;
+import net.dpml.metro.ContextModelManager;
import net.dpml.metro.ValidationException;
import net.dpml.metro.ValidationException.Issue;
import net.dpml.metro.ContextModel;
@@ -51,7 +51,7 @@
* @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
* @version @PROJECT-VERSION@
*/
-class DefaultContextModel extends UnicastEventSource implements
ContextModel, ContextManager
+class DefaultContextModel extends UnicastEventSource implements
ContextModelManager
{
//
------------------------------------------------------------------------
// immutable state

Modified:
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultPartsManager.java
===================================================================
---
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultPartsManager.java
2006-02-14 06:22:39 UTC (rev 1091)
+++
trunk/main/metro/runtime/src/main/net/dpml/metro/runtime/DefaultPartsManager.java
2006-02-14 09:36:29 UTC (rev 1092)
@@ -27,7 +27,7 @@

import net.dpml.metro.PartsManager;
import net.dpml.metro.ComponentHandler;
-import net.dpml.metro.ComponentManager;
+import net.dpml.metro.ComponentModelManager;
import net.dpml.metro.ComponentModel;

import net.dpml.part.ActivationPolicy;
@@ -91,14 +91,14 @@
m_logger = logger;

ClassLoader classloader = handler.getClassLoader();
- ComponentManager model = handler.getComponentManager();
+ ComponentModelManager model = handler.getComponentManager();
String[] keys = model.getPartKeys();
for( int i=0; i<keys.length; i++ )
{
String key = keys[i];
try
{
- ComponentManager m = model.getComponentManager( key );
+ ComponentModelManager m = model.getComponentManager( key );
ComponentModel cm = (ComponentModel) m;
Component h = control.createDefaultComponentHandler(
handler, classloader, cm, true );
m_handlers.put( key, h );

Modified:
trunk/main/metro/test/src/main/net/dpml/test/composite/PartsComponent.java
===================================================================
---
trunk/main/metro/test/src/main/net/dpml/test/composite/PartsComponent.java
2006-02-14 06:22:39 UTC (rev 1091)
+++
trunk/main/metro/test/src/main/net/dpml/test/composite/PartsComponent.java
2006-02-14 09:36:29 UTC (rev 1092)
@@ -19,6 +19,7 @@
package net.dpml.test.composite;

import java.awt.Color;
+import java.rmi.RemoteException;

import net.dpml.logging.Logger;

@@ -88,7 +89,7 @@
*/
public PartsComponent(
final Logger logger, final Context context, final PartsManager parts )
- throws UnknownKeyException
+ throws UnknownKeyException, RemoteException
{
logger.debug( "instantiation" );


Modified:
trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/ContextModelTestCase.java
===================================================================
---
trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/ContextModelTestCase.java
2006-02-14 06:22:39 UTC (rev 1091)
+++
trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/ContextModelTestCase.java
2006-02-14 09:36:29 UTC (rev 1092)
@@ -26,8 +26,8 @@

import net.dpml.part.Controller;

-import net.dpml.metro.ComponentManager;
-import net.dpml.metro.ContextManager;
+import net.dpml.metro.ComponentModelManager;
+import net.dpml.metro.ContextModelManager;
import net.dpml.metro.ValidationException;
import net.dpml.metro.ValidationException.Issue;
import net.dpml.metro.data.ValueDirective;
@@ -40,7 +40,7 @@
*/
public class ContextModelTestCase extends TestCase
{
- private ComponentManager m_model;
+ private ComponentModelManager m_model;

/**
* Testcase setup during which the part definition 'example.part'
@@ -52,7 +52,7 @@
final String path = "example.part";
final File test = new File( System.getProperty( "project.test.dir" )
);
final URI uri = new File( test, path ).toURI();
- m_model = (ComponentManager) Controller.STANDARD.createModel( uri );
+ m_model = (ComponentModelManager) Controller.STANDARD.createModel(
uri );
}

/**
@@ -61,7 +61,7 @@
*/
public void testContextModel() throws Exception
{
- ContextManager context = m_model.getContextManager();
+ ContextModelManager context = m_model.getContextManager();
assertNotNull( "context", context );
EntryDescriptor[] entries = context.getEntryDescriptors();
assertEquals( "entries", 1, entries.length );
@@ -83,7 +83,7 @@
*/
public void testValidationWithoutCause() throws Exception
{
- ContextManager context = m_model.getContextManager();
+ ContextModelManager context = m_model.getContextManager();
context.validate();
}

@@ -93,7 +93,7 @@
*/
public void testValidationWithCause() throws Exception
{
- ContextManager context = m_model.getContextManager();
+ ContextModelManager context = m_model.getContextManager();
context.setEntryDirective( "color", null );
try
{

Modified:
trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/ObserverTestCase.java
===================================================================
---
trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/ObserverTestCase.java
2006-02-14 06:22:39 UTC (rev 1091)
+++
trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/ObserverTestCase.java
2006-02-14 09:36:29 UTC (rev 1092)
@@ -30,8 +30,8 @@

import net.dpml.metro.data.ValueDirective;
import net.dpml.metro.ComponentModel;
-import net.dpml.metro.ComponentManager;
-import net.dpml.metro.ContextManager;
+import net.dpml.metro.ComponentModelManager;
+import net.dpml.metro.ContextModelManager;

/**
* Test aspects of the component model implementation.
@@ -40,7 +40,7 @@
*/
public class ObserverTestCase extends TestCase
{
- private ComponentManager m_model;
+ private ComponentModelManager m_model;

/**
* Test case setup.
@@ -51,7 +51,7 @@
final String path = "observer.part";
final File test = new File( System.getProperty( "project.test.dir" )
);
final URI uri = new File( test, path ).toURI();
- m_model = (ComponentManager) Controller.STANDARD.createModel( uri );
+ m_model = (ComponentModelManager) Controller.STANDARD.createModel(
uri );
}

/**
@@ -60,7 +60,7 @@
*/
public void testContextModel() throws Exception
{
- ContextManager context = (ContextManager)
m_model.getContextManager();
+ ContextModelManager context = (ContextModelManager)
m_model.getContextManager();
Component component = Controller.STANDARD.createComponent(
(ComponentModel) m_model );
Provider provider = component.getProvider();
Object instance = provider.getValue( false );

Modified:
trunk/main/metro/tools/src/main/net/dpml/metro/tools/ValueDataType.java
===================================================================
--- trunk/main/metro/tools/src/main/net/dpml/metro/tools/ValueDataType.java
2006-02-14 06:22:39 UTC (rev 1091)
+++ trunk/main/metro/tools/src/main/net/dpml/metro/tools/ValueDataType.java
2006-02-14 09:36:29 UTC (rev 1092)
@@ -23,7 +23,6 @@

import net.dpml.metro.data.ValueDirective;

-import net.dpml.transit.Construct;
import net.dpml.transit.Value;

import org.apache.tools.ant.BuildException;
@@ -128,7 +127,7 @@

/**
* Build a value datastructure.
- * 2param classloader the working classloader
+ * @param classloader the working classloader
* @return the serializable value descriptor
*/
public Value buildValue( ClassLoader classloader )

Modified:
trunk/main/planet/http/impl/src/main/net/dpml/http/BoundedThreadPool.java
===================================================================
--- trunk/main/planet/http/impl/src/main/net/dpml/http/BoundedThreadPool.java
2006-02-14 06:22:39 UTC (rev 1091)
+++ trunk/main/planet/http/impl/src/main/net/dpml/http/BoundedThreadPool.java
2006-02-14 09:36:29 UTC (rev 1092)
@@ -28,6 +28,7 @@
/**
* Get the minimum thread level.
*
+ * @param min the default minimum value
* @return the minimum thread level
*/
int getMin( int min );
@@ -35,6 +36,7 @@
/**
* Return maximum thread level.
*
+ * @param max the default maximum value
* @return the maximum thread level
*/
int getMax( int max );

Modified:
trunk/main/planet/http/impl/src/main/net/dpml/http/ContextHelper.java
===================================================================
--- trunk/main/planet/http/impl/src/main/net/dpml/http/ContextHelper.java
2006-02-14 06:22:39 UTC (rev 1091)
+++ trunk/main/planet/http/impl/src/main/net/dpml/http/ContextHelper.java
2006-02-14 09:36:29 UTC (rev 1092)
@@ -15,17 +15,10 @@
*/
package net.dpml.http;

-import java.util.ArrayList;
import java.util.Map;

-import net.dpml.transit.util.PropertyResolver;
-
import net.dpml.logging.Logger;

-import net.dpml.configuration.Configuration;
-import net.dpml.configuration.ConfigurationException;
-
-import org.mortbay.jetty.Handler;
import org.mortbay.jetty.MimeTypes;
import org.mortbay.jetty.handler.ContextHandler;
import org.mortbay.jetty.handler.ErrorHandler;

Modified:
trunk/main/planet/http/impl/src/main/net/dpml/http/HashUserRealm.java
===================================================================
--- trunk/main/planet/http/impl/src/main/net/dpml/http/HashUserRealm.java
2006-02-14 06:22:39 UTC (rev 1091)
+++ trunk/main/planet/http/impl/src/main/net/dpml/http/HashUserRealm.java
2006-02-14 09:36:29 UTC (rev 1092)
@@ -15,8 +15,6 @@
*/
package net.dpml.http;

-import java.io.File;
-import java.io.IOException;
import java.net.URI;

/**
@@ -42,9 +40,13 @@
* @return the realm configuration uri
*/
URI getURI();
-
}

+ /**
+ * Creation of a new hash user realm.
+ * @param context the deployment context
+ * @exception Exception if an instantiation error occurs
+ */
public HashUserRealm( Context context ) throws Exception
{
String name = context.getName();

Modified:
trunk/main/planet/http/impl/src/main/net/dpml/http/ResourceContextHandler.java
===================================================================
---
trunk/main/planet/http/impl/src/main/net/dpml/http/ResourceContextHandler.java
2006-02-14 06:22:39 UTC (rev 1091)
+++
trunk/main/planet/http/impl/src/main/net/dpml/http/ResourceContextHandler.java
2006-02-14 09:36:29 UTC (rev 1092)
@@ -15,12 +15,8 @@
*/
package net.dpml.http;

-import net.dpml.transit.util.PropertyResolver;
-
import net.dpml.logging.Logger;

-import org.mortbay.jetty.Handler;
-
/**
* Context handler with enhanced support for symbolic property
dereferencing.
*/
@@ -42,6 +38,12 @@

private int m_priority = 0;

+ /**
+ * Creation of a new resource context handler.
+ * @param logger the assigned logging channel
+ * @param context the deployment context
+ * @exception Exception if an instantiation error occurs
+ */
public ResourceContextHandler( Logger logger, Context context ) throws
Exception
{
ContextHelper helper = new ContextHelper( logger );

Modified:
trunk/main/planet/http/impl/src/main/net/dpml/http/ResourceHandler.java
===================================================================
--- trunk/main/planet/http/impl/src/main/net/dpml/http/ResourceHandler.java
2006-02-14 06:22:39 UTC (rev 1091)
+++ trunk/main/planet/http/impl/src/main/net/dpml/http/ResourceHandler.java
2006-02-14 09:36:29 UTC (rev 1092)
@@ -15,10 +15,6 @@
*/
package net.dpml.http;

-import java.io.File;
-import java.io.IOException;
-import java.net.URI;
-
import org.mortbay.jetty.servlet.ServletHolder;
import org.mortbay.jetty.servlet.ServletMapping;

@@ -27,6 +23,11 @@
*/
public class ResourceHandler extends org.mortbay.jetty.servlet.ServletHandler
{
+ /**
+ * Creation of a new resource handler.
+ * @param name the resource handler name
+ * @param path the resourdce path
+ */
public ResourceHandler( String name, String path )
{
super();

Modified: trunk/main/planet/http/impl/src/main/net/dpml/http/Server.java
===================================================================
--- trunk/main/planet/http/impl/src/main/net/dpml/http/Server.java
2006-02-14 06:22:39 UTC (rev 1091)
+++ trunk/main/planet/http/impl/src/main/net/dpml/http/Server.java
2006-02-14 09:36:29 UTC (rev 1092)
@@ -17,7 +17,6 @@

import java.net.URI;
import java.net.URL;
-import java.util.Arrays;
import java.util.ArrayList;

import net.dpml.logging.Logger;
@@ -28,10 +27,7 @@

import org.mortbay.thread.ThreadPool;
import org.mortbay.jetty.RequestLog;
-import org.mortbay.jetty.Handler;
-import org.mortbay.jetty.RequestLog;
import org.mortbay.xml.XmlConfiguration;
-import org.mortbay.util.LazyList;
import org.mortbay.jetty.security.UserRealm;
import org.mortbay.jetty.Connector;

@@ -77,6 +73,9 @@
ThreadPool getThreadPool( ThreadPool pool );
}

+ /**
+ * Internal parts managemwent interface.
+ */
public interface Parts extends PartsManager
{
/**
@@ -99,6 +98,8 @@
* Creation of a new HTTP server implementation.
* @param logger the assigned logging channel
* @param context the assigned deployment context
+ * @param parts the parts manager
+ * @exception Exception if an instantiation error occurs
*/
public Server( Logger logger, Context context, Parts parts ) throws
Exception
{

Modified:
trunk/main/planet/http/impl/src/main/net/dpml/http/ServletContextHandler.java
===================================================================
---
trunk/main/planet/http/impl/src/main/net/dpml/http/ServletContextHandler.java
2006-02-14 06:22:39 UTC (rev 1091)
+++
trunk/main/planet/http/impl/src/main/net/dpml/http/ServletContextHandler.java
2006-02-14 09:36:29 UTC (rev 1092)
@@ -17,8 +17,6 @@

import java.util.ArrayList;

-import net.dpml.transit.util.PropertyResolver;
-
import net.dpml.logging.Logger;

import net.dpml.configuration.Configuration;
@@ -47,7 +45,15 @@

private int m_priority = 0;

- public ServletContextHandler( Logger logger, Context context,
Configuration config ) throws Exception
+ /**
+ * Creation of a new servlet context handler.
+ * @param logger the assigned logging channel
+ * @param context the deployment context
+ * @param config the deployment configuration
+ * @exception Exception if an instantiation error occurs
+ */
+ public ServletContextHandler(
+ Logger logger, Context context, Configuration config ) throws Exception
{
super();

@@ -61,7 +67,8 @@
super.setHandler( handler );
}

- private Handler buildHandler( Logger logger, Configuration config )
throws ConfigurationException
+ private Handler buildHandler(
+ Logger logger, Configuration config ) throws ConfigurationException
{
logger.debug( "configuration " + config );
Configuration servlets = config.getChild( "servlets" );
@@ -88,8 +95,10 @@
ServletMapping mapping = new ServletMapping( name, path );
mappingList.add( mapping );
}
- ServletHolder[] servletArray = (ServletHolder[])
servletList.toArray( new ServletHolder[0] );
- ServletMapping[] mappingArray = (ServletMapping[])
mappingList.toArray( new ServletMapping[0] );
+ ServletHolder[] servletArray =
+ (ServletHolder[]) servletList.toArray( new ServletHolder[0] );
+ ServletMapping[] mappingArray =
+ (ServletMapping[]) mappingList.toArray( new ServletMapping[0] );
return new ServletHandler( servletArray, mappingArray );
}
}

Modified:
trunk/main/planet/http/impl/src/main/net/dpml/http/ServletHandler.java
===================================================================
--- trunk/main/planet/http/impl/src/main/net/dpml/http/ServletHandler.java
2006-02-14 06:22:39 UTC (rev 1091)
+++ trunk/main/planet/http/impl/src/main/net/dpml/http/ServletHandler.java
2006-02-14 09:36:29 UTC (rev 1092)
@@ -24,6 +24,11 @@
*/
public class ServletHandler extends org.mortbay.jetty.servlet.ServletHandler
{
+ /**
+ * Creation of a new servlet handler.
+ * @param servlets the servlet holder array
+ * @param maps the servlet mappings
+ */
public ServletHandler( ServletHolder[] servlets, ServletMapping[] maps )
{
super();

Modified:
trunk/main/planet/http/impl/src/main/net/dpml/http/ServletHolder.java
===================================================================
--- trunk/main/planet/http/impl/src/main/net/dpml/http/ServletHolder.java
2006-02-14 06:22:39 UTC (rev 1091)
+++ trunk/main/planet/http/impl/src/main/net/dpml/http/ServletHolder.java
2006-02-14 09:36:29 UTC (rev 1092)
@@ -20,6 +20,11 @@
*/
public class ServletHolder extends org.mortbay.jetty.servlet.ServletHolder
{
+ /**
+ * Creation of a new servlet holder.
+ * @param name the servlet name
+ * @param classname the servlet classname
+ */
public ServletHolder( String name, String classname )
{
super();

Modified:
trunk/main/planet/http/impl/src/main/net/dpml/http/ServletMapping.java
===================================================================
--- trunk/main/planet/http/impl/src/main/net/dpml/http/ServletMapping.java
2006-02-14 06:22:39 UTC (rev 1091)
+++ trunk/main/planet/http/impl/src/main/net/dpml/http/ServletMapping.java
2006-02-14 09:36:29 UTC (rev 1092)
@@ -20,6 +20,11 @@
*/
public class ServletMapping extends org.mortbay.jetty.servlet.ServletMapping
{
+ /**
+ * Creation of a new servlet mapping.
+ * @param name the servlet name
+ * @param path the path
+ */
public ServletMapping( String name, String path )
{
super();

Modified:
trunk/main/planet/http/impl/src/main/net/dpml/http/SslSocketConnector.java
===================================================================
---
trunk/main/planet/http/impl/src/main/net/dpml/http/SslSocketConnector.java
2006-02-14 06:22:39 UTC (rev 1091)
+++
trunk/main/planet/http/impl/src/main/net/dpml/http/SslSocketConnector.java
2006-02-14 09:36:29 UTC (rev 1092)
@@ -15,15 +15,8 @@
*/
package net.dpml.http;

-import java.io.File;
-import java.io.IOException;
import java.net.URI;

-import net.dpml.transit.util.PropertyResolver;
-
-import org.mortbay.log.Log;
-import org.mortbay.resource.Resource;
-
/**
* SSL socket connector.
*/
@@ -104,6 +97,11 @@
boolean getNeedClientAuth( boolean flag );
}

+ /**
+ * Creation of a new ssl connector.
+ * @param context the deployment context
+ * @exception Exception if an instantiation error occurs
+ */
public SslSocketConnector( Context context ) throws Exception
{
super();

Modified:
trunk/main/planet/http/impl/src/main/net/dpml/http/WebAppContextHandler.java
===================================================================
---
trunk/main/planet/http/impl/src/main/net/dpml/http/WebAppContextHandler.java
2006-02-14 06:22:39 UTC (rev 1091)
+++
trunk/main/planet/http/impl/src/main/net/dpml/http/WebAppContextHandler.java
2006-02-14 09:36:29 UTC (rev 1092)
@@ -16,16 +16,12 @@
package net.dpml.http;

import java.net.URI;
-import java.util.ArrayList;
import java.util.Map;
import java.security.PermissionCollection;
import java.io.File;

-import net.dpml.transit.util.PropertyResolver;
-
import net.dpml.logging.Logger;

-import org.mortbay.jetty.Handler;
import org.mortbay.jetty.security.SecurityHandler;
import org.mortbay.jetty.servlet.SessionHandler;
import org.mortbay.jetty.servlet.ServletHandler;
@@ -98,20 +94,29 @@

private int m_priority = 0;

+ /**
+ * Creation of a new web-application context handler.
+ * @param logger the assigned logging channel
+ * @param context the deployment context
+ * @exception Exception if an instantiation error occurs
+ */
public WebAppContextHandler( Logger logger, Context context ) throws
Exception
{
ContextHelper helper = new ContextHelper( logger );
helper.contextualize( this, context );

- SecurityHandler securityHandler = context.getSecurityHandler( new
SecurityHandler() );
+ SecurityHandler securityHandler =
+ context.getSecurityHandler( new SecurityHandler() );
setSecurityHandler( securityHandler );
setHandler( securityHandler );

- SessionHandler sessionHandler = context.getSessionHandler( new
SessionHandler() );
+ SessionHandler sessionHandler =
+ context.getSessionHandler( new SessionHandler() );
securityHandler.setHandler( sessionHandler );
setSessionHandler( sessionHandler );

- ServletHandler servletHandler = context.getServletHandler( new
ServletHandler() );
+ ServletHandler servletHandler =
+ context.getServletHandler( new ServletHandler() );
sessionHandler.setHandler( servletHandler );
setServletHandler( servletHandler );


Modified:
trunk/main/planet/http/test/src/test/net/dpml/http/test/ServerTestCase.java
===================================================================
---
trunk/main/planet/http/test/src/test/net/dpml/http/test/ServerTestCase.java
2006-02-14 06:22:39 UTC (rev 1091)
+++
trunk/main/planet/http/test/src/test/net/dpml/http/test/ServerTestCase.java
2006-02-14 09:36:29 UTC (rev 1092)
@@ -25,11 +25,9 @@
import junit.framework.TestCase;

import net.dpml.part.Controller;
-import net.dpml.part.Component;
import net.dpml.part.ControlException;

import net.dpml.metro.PartsManager;
-import net.dpml.metro.ComponentManager;
import net.dpml.metro.ComponentHandler;



Modified: trunk/main/planet/http/war/src/main/org/acme/DispatchServlet.java
===================================================================
--- trunk/main/planet/http/war/src/main/org/acme/DispatchServlet.java
2006-02-14 06:22:39 UTC (rev 1091)
+++ trunk/main/planet/http/war/src/main/org/acme/DispatchServlet.java
2006-02-14 09:36:29 UTC (rev 1092)
@@ -29,8 +29,6 @@
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponseWrapper;

-
-/* ------------------------------------------------------------ */
/** Test Servlet RequestDispatcher.
*
* @author Greg Wilkins (gregw)
@@ -38,248 +36,347 @@
public class DispatchServlet extends HttpServlet
{

- /* ------------------------------------------------------------ */
String pageType;

- /* ------------------------------------------------------------ */
- public void init(ServletConfig config) throws ServletException
+ /**
+ * Servlet initialization.
+ * @param config the servlet config
+ * @exception ServletException in an initialization error occurs
+ */
+ public void init( ServletConfig config ) throws ServletException
{
- super.init(config);
+ super.init( config );
}

- /* ------------------------------------------------------------ */
- public void doPost(HttpServletRequest sreq, HttpServletResponse sres)
throws ServletException, IOException
+ /**
+ * Process a post request.
+ * @param sreq the servlet http request
+ * @param sres the servlet http response
+ * @exception ServletException in a processing error occurs
+ * @exception IOException in an I/O error occurs
+ */
+ public void doPost( HttpServletRequest sreq, HttpServletResponse sres )
+ throws ServletException, IOException
{
- doGet(sreq, sres);
+ doGet( sreq, sres );
}

- /* ------------------------------------------------------------ */
- public void doGet(HttpServletRequest sreq, HttpServletResponse sres)
throws ServletException, IOException
+ /**
+ * Process a get request.
+ * @param sreq the servlet http request
+ * @param sres the servlet http response
+ * @exception ServletException in a processing error occurs
+ * @exception IOException in an I/O error occurs
+ */
+ public void doGet( HttpServletRequest sreq, HttpServletResponse sres )
+ throws ServletException, IOException
{
- if (sreq.getParameter("wrap") != null)
+ if( sreq.getParameter( "wrap" ) != null )
{
- sreq= new HttpServletRequestWrapper(sreq);
- sres= new HttpServletResponseWrapper(sres);
+ sreq = new HttpServletRequestWrapper( sreq );
+ sres = new HttpServletResponseWrapper( sres );
}

- String prefix=
- sreq.getContextPath() != null ? sreq.getContextPath() +
sreq.getServletPath() : sreq.getServletPath();
-
+ String prefix;
+ if( sreq.getContextPath() != null )
+ {
+ prefix = sreq.getContextPath() + sreq.getServletPath();
+ }
+ else
+ {
+ prefix = sreq.getServletPath();
+ }
+
String info;
-
- if (sreq.getAttribute("javax.servlet.include.servlet_path") != null)
- info=
(String)sreq.getAttribute("javax.servlet.include.path_info");
+ if( sreq.getAttribute( "javax.servlet.include.servlet_path" ) !=
null )
+ {
+ info = (String) sreq.getAttribute(
"javax.servlet.include.path_info" );
+ }
else
- info= sreq.getPathInfo();
+ {
+ info = sreq.getPathInfo();
+ }

- if (info == null)
+ if( info == null )
+ {
info= "NULL";
-
- if (info.startsWith("/includeW/"))
+ }
+
+ if( info.startsWith( "/includeW/" ) )
{
- sres.setContentType("text/html");
- info= info.substring(9);
- if (info.indexOf('?') < 0)
+ sres.setContentType( "text/html" );
+ info = info.substring( 9 );
+ if( info.indexOf( '?' ) < 0 )
+ {
info += "?Dispatch=include";
+ }
else
+ {
info += "&Dispatch=include";
+ }

- PrintWriter pout= null;
- pout= sres.getWriter();
- pout.write("<H1>Include (writer): " + info + "</H1><HR>");
+ PrintWriter pout = null;
+ pout = sres.getWriter();
+ pout.write(
+ "<H1>Include (writer): "
+ + info
+ + "</H1><HR>" );

- RequestDispatcher dispatch=
getServletContext().getRequestDispatcher(info);
- if (dispatch == null)
+ RequestDispatcher dispatch =
+ getServletContext().getRequestDispatcher(info);
+ if( dispatch == null )
{
- pout= sres.getWriter();
- pout.write("<H1>Null dispatcher</H1>");
+ pout = sres.getWriter();
+ pout.write( "<H1>Null dispatcher</H1>" );
}
else
- dispatch.include(sreq, sres);
-
- pout.write("<HR><H1>-- Included (writer)</H1>");
+ {
+ dispatch.include( sreq, sres );
+ }
+ pout.write( "<HR><H1>-- Included (writer)</H1>" );
}
- else if (info.startsWith("/includeS/"))
+ else if( info.startsWith("/includeS/" ) )
{
- sres.setContentType("text/html");
- info= info.substring(9);
- if (info.indexOf('?') < 0)
+ sres.setContentType( "text/html" );
+ info = info.substring( 9 );
+ if( info.indexOf( '?' ) < 0 )
+ {
info += "?Dispatch=include";
+ }
else
+ {
info += "&Dispatch=include";
+ }

- OutputStream out= null;
- out= sres.getOutputStream();
- out.write(("<H1>Include (outputstream): " + info +
"</H1><HR>").getBytes());
+ OutputStream out = null;
+ out = sres.getOutputStream();
+ out.write(
+ (
+ "<H1>Include (outputstream): "
+ + info
+ + "</H1><HR>"
+ ).getBytes()
+ );

- RequestDispatcher dispatch=
getServletContext().getRequestDispatcher(info);
- if (dispatch == null)
+ RequestDispatcher dispatch =
+ getServletContext().getRequestDispatcher( info );
+ if( dispatch == null )
{
- out= sres.getOutputStream();
- out.write("<H1>Null dispatcher</H1>".getBytes());
+ out = sres.getOutputStream();
+ out.write( "<H1>Null dispatcher</H1>".getBytes() );
}
else
- dispatch.include(sreq, sres);
+ {
+ dispatch.include( sreq, sres );
+ }
+ out.write( "<HR><H1>-- Included (outputstream)</H1>".getBytes()
);

- out.write("<HR><H1>-- Included (outputstream)</H1>".getBytes());
-
}
- else if (info.startsWith("/forward/"))
+ else if( info.startsWith("/forward/" ) )
{
info= info.substring(8);
- if (info.indexOf('?') < 0)
+ if( info.indexOf('?') < 0 )
+ {
info += "?Dispatch=forward";
+ }
else
+ {
info += "&Dispatch=forward";
- RequestDispatcher dispatch=
getServletContext().getRequestDispatcher(info);
- if (dispatch != null)
+ }
+
+ RequestDispatcher dispatch =
+ getServletContext().getRequestDispatcher( info );
+
+ if( dispatch != null )
{
- ServletOutputStream out =sres.getOutputStream();
- out.print("Can't see this");
- dispatch.forward(sreq, sres);
+ ServletOutputStream out = sres.getOutputStream();
+ out.print( "Can't see this" );
+ dispatch.forward( sreq, sres );
try
{
- out.println("IOException");
+ out.println( "IOException" );
throw new IllegalStateException();
}
- catch(IOException e)
- {}
+ catch( IOException e )
+ {
+ }
}
else
{
- sres.setContentType("text/html");
+ sres.setContentType( "text/html" );
PrintWriter pout= sres.getWriter();
- pout.write("<H1>No dispatcher for: " + info + "</H1><HR>");
+ pout.write( "<H1>No dispatcher for: " + info + "</H1><HR>" );
pout.flush();
}
}
- else if (info.startsWith("/forwardC/"))
+ else if( info.startsWith( "/forwardC/" ) )
{
- info= info.substring(9);
- if (info.indexOf('?') < 0)
+ info = info.substring( 9 );
+ if( info.indexOf( '?' ) < 0 )
+ {
info += "?Dispatch=forward";
+ }
else
+ {
info += "&Dispatch=forward";
+ }

- String cpath= info.substring(0, info.indexOf('/', 1));
- info= info.substring(cpath.length());
+ String cpath = info.substring( 0, info.indexOf( '/', 1 ) );
+ info = info.substring( cpath.length() );
+ ServletContext context= getServletContext().getContext( cpath );
+ RequestDispatcher dispatch = context.getRequestDispatcher( info
);

- ServletContext context= getServletContext().getContext(cpath);
- RequestDispatcher dispatch= context.getRequestDispatcher(info);
-
- if (dispatch != null)
+ if( dispatch != null )
{
- dispatch.forward(sreq, sres);
+ dispatch.forward( sreq, sres );
}
else
{
- sres.setContentType("text/html");
- PrintWriter pout= sres.getWriter();
- pout.write("<H1>No dispatcher for: " + cpath + "/" + info +
"</H1><HR>");
+ sres.setContentType( "text/html" );
+ PrintWriter pout = sres.getWriter();
+ pout.write(
+ "<H1>No dispatcher for: "
+ + cpath
+ + "/"
+ + info
+ + "</H1><HR>" );
pout.flush();
}
}
- else if (info.startsWith("/forwardSC/"))
+ else if( info.startsWith( "/forwardSC/" ) )
{
- sreq.getSession(true);
- info= info.substring(10);
- if (info.indexOf('?') < 0)
+ sreq.getSession( true );
+ info = info.substring( 10 );
+ if( info.indexOf( '?' ) < 0 )
+ {
info += "?Dispatch=forward";
+ }
else
+ {
info += "&Dispatch=forward";
+ }
+ String cpath = info.substring( 0, info.indexOf( '/', 1 ) );
+ info = info.substring( cpath.length() );

- String cpath= info.substring(0, info.indexOf('/', 1));
- info= info.substring(cpath.length());
+ ServletContext context = getServletContext().getContext( cpath );
+ RequestDispatcher dispatch = context.getRequestDispatcher( info
);

- ServletContext context= getServletContext().getContext(cpath);
- RequestDispatcher dispatch= context.getRequestDispatcher(info);
-
- if (dispatch != null)
+ if( dispatch != null )
{
- dispatch.forward(sreq, sres);
+ dispatch.forward( sreq, sres );
}
else
{
- sres.setContentType("text/html");
+ sres.setContentType( "text/html" );
PrintWriter pout= sres.getWriter();
- pout.write("<H1>No dispatcher for: " + cpath + "/" + info +
"</H1><HR>");
+ pout.write(
+ "<H1>No dispatcher for: "
+ + cpath
+ + "/"
+ + info
+ + "</H1><HR>" );
pout.flush();
}
}
- else if (info.startsWith("/includeN/"))
+ else if( info.startsWith( "/includeN/" ) )
{
- sres.setContentType("text/html");
- info= info.substring(10);
- if (info.indexOf("/") >= 0)
+ sres.setContentType( "text/html" );
+ info = info.substring( 10 );
+ if( info.indexOf( "/" ) >= 0 )
+ {
info= info.substring(0, info.indexOf("/"));
-
+ }
PrintWriter pout;
- if (info.startsWith("/null"))
+ if( info.startsWith( "/null" ) )
+ {
info= info.substring(5);
+ }
else
{
- pout= sres.getWriter();
- pout.write("<H1>Include named: " + info + "</H1><HR>");
+ pout = sres.getWriter();
+ pout.write(
+ "<H1>Include named: "
+ + info
+ + "</H1><HR>" );
}

- RequestDispatcher dispatch=
getServletContext().getNamedDispatcher(info);
- if (dispatch != null)
- dispatch.include(sreq, sres);
+ RequestDispatcher dispatch =
+ getServletContext().getNamedDispatcher( info );
+ if( dispatch != null )
+ {
+ dispatch.include( sreq, sres );
+ }
else
{
- pout= sres.getWriter();
- pout.write("<H1>No servlet named: " + info + "</H1>");
+ pout = sres.getWriter();
+ pout.write(
+ "<H1>No servlet named: "
+ + info
+ + "</H1>" );
}

- pout= sres.getWriter();
- pout.write("<HR><H1>Included ");
+ pout = sres.getWriter();
+ pout.write( "<HR><H1>Included " );
}
- else if (info.startsWith("/forwardN/"))
+ else if( info.startsWith( "/forwardN/" ) )
{
- info= info.substring(10);
- if (info.indexOf("/") >= 0)
- info= info.substring(0, info.indexOf("/"));
- RequestDispatcher dispatch=
getServletContext().getNamedDispatcher(info);
- if (dispatch != null)
- dispatch.forward(sreq, sres);
+ info = info.substring( 10 );
+ if( info.indexOf("/") >= 0 )
+ {
+ info= info.substring( 0, info.indexOf( "/" ) );
+ }
+ RequestDispatcher dispatch =
+ getServletContext().getNamedDispatcher( info );
+ if( dispatch != null )
+ {
+ dispatch.forward( sreq, sres );
+ }
else
{
- sres.setContentType("text/html");
- PrintWriter pout= sres.getWriter();
- pout.write("<H1>No servlet named: " + info + "</H1>");
+ sres.setContentType( "text/html" );
+ PrintWriter pout = sres.getWriter();
+ pout.write(
+ "<H1>No servlet named: "
+ + info
+ + "</H1>" );
pout.flush();
}
}
else
{
- sres.setContentType("text/html");
+ sres.setContentType( "text/html" );
PrintWriter pout= sres.getWriter();
pout.write(
- "<H1>Dispatch URL must be of the form: </H1>"
- + "<PRE>"
- + prefix
- + "/includeW/path\n"
- + prefix
- + "/includeS/path\n"
- + prefix
- + "/forward/path\n"
- + prefix
- + "/includeN/name\n"
- + prefix
- + "/forwardC/_context/path\n"
- + prefix
- + "/forwardSC/_context/path</PRE>");
+ "<H1>Dispatch URL must be of the form: </H1>"
+ + "<PRE>"
+ + prefix
+ + "/includeW/path\n"
+ + prefix
+ + "/includeS/path\n"
+ + prefix
+ + "/forward/path\n"
+ + prefix
+ + "/includeN/name\n"
+ + prefix
+ + "/forwardC/_context/path\n"
+ + prefix
+ + "/forwardSC/_context/path</PRE>" );
pout.flush();
}
}

- /* ------------------------------------------------------------ */
+ /**
+ * Return thr servlet info.
+ * @return the info
+ */
public String getServletInfo()
{
return "Include Servlet";
}

- /* ------------------------------------------------------------ */
+ /**
+ * Destroy the servlet.
+ */
public synchronized void destroy()
{
}




  • r1092 - in trunk/main: metro/exec/src/main/net/dpml/metro/exec metro/model/src/main/net/dpml/metro metro/runtime/src/main/net/dpml/metro/runtime metro/test/src/main/net/dpml/test/composite metro/test/src/test/net/dpml/metro/runtime/test metro/tools/src/main/net/dpml/metro/tools planet/http/impl/src/main/net/dpml/http planet/http/test/src/test/net/dpml/http/test planet/http/war/src/main/org/acme, mcconnell at BerliOS, 02/14/2006

Archive powered by MHonArc 2.6.24.

Top of Page