notify-dpml AT lists.ibiblio.org
Subject: DPML Notify
List archive
r983 - in trunk/main/planet/http/demo/src: main/net/dpml/http/demo test/net/dpml/http
- From: mcconnell at BerliOS <mcconnell AT mail.berlios.de>
- To: notify-dpml AT lists.ibiblio.org
- Subject: r983 - in trunk/main/planet/http/demo/src: main/net/dpml/http/demo test/net/dpml/http
- Date: Fri, 27 Jan 2006 14:19:07 +0100
Author: mcconnell
Date: 2006-01-27 14:19:05 +0100 (Fri, 27 Jan 2006)
New Revision: 983
Modified:
trunk/main/planet/http/demo/src/main/net/dpml/http/demo/Demo.java
trunk/main/planet/http/demo/src/main/net/dpml/http/demo/ManagementOperations.java
trunk/main/planet/http/demo/src/test/net/dpml/http/HttpTestCase.java
Log:
Put in stubs of management operations concerning http context creation,
removal and listing (next step is console based activation of these methods
which will require some tweaking in the StateMachine followed by
implementation of methods in the demo class).
Modified: trunk/main/planet/http/demo/src/main/net/dpml/http/demo/Demo.java
===================================================================
--- trunk/main/planet/http/demo/src/main/net/dpml/http/demo/Demo.java
2006-01-27 12:58:18 UTC (rev 982)
+++ trunk/main/planet/http/demo/src/main/net/dpml/http/demo/Demo.java
2006-01-27 13:19:05 UTC (rev 983)
@@ -30,6 +30,10 @@
*/
public class Demo implements ManagementOperations
{
+ //---------------------------------------------------------
+ // criteria
+ //---------------------------------------------------------
+
/**
* HTTP Demo component context.
*/
@@ -61,9 +65,17 @@
SocketListenerService getSocketListener();
}
+ //---------------------------------------------------------
+ // immutable state
+ //---------------------------------------------------------
+
private final Logger m_logger;
private final Parts m_parts;
+ //---------------------------------------------------------
+ // constructor
+ //---------------------------------------------------------
+
/**
* Creation of the HTTP Demo Component.
* @param logger the assigned logging channel
@@ -79,6 +91,10 @@
m_parts.getSocketListener();
}
+ //---------------------------------------------------------
+ // ManagementOperations
+ //---------------------------------------------------------
+
/**
* Testing management interface declarations.
*/
@@ -88,15 +104,37 @@
}
/**
- * Return the logging channel.
- * @return the logger
+ * Add a new http context to the application.
+ * @param path the context path
*/
- private Logger getLogger()
+ public void addContext( String path )
{
- return m_logger;
+ getLogger().info( "# ADD: " + path );
}
+ /**
+ * Remove an http context from the application.
+ * @param path the context path
+ */
+ public void removeContext( String path )
+ {
+ getLogger().info( "# REMOVE: " + path );
+ }
+
+ /**
+ * Strurn the array of context paths.
+ * @return the context path array
+ */
+ public String[] getContextPaths()
+ {
+ getLogger().info( "# LIST" );
+ return new String[0];
+ }
+ //---------------------------------------------------------
+ // declared operations
+ //---------------------------------------------------------
+
/**
* Return some stats infomation using a supplied argument.
* @param arg a value such as 'memory'
@@ -125,7 +163,24 @@
return new MemoryStats();
}
+ //---------------------------------------------------------
+ // implementation
+ //---------------------------------------------------------
+
/**
+ * Return the logging channel.
+ * @return the logger
+ */
+ private Logger getLogger()
+ {
+ return m_logger;
+ }
+
+ //---------------------------------------------------------
+ // utilities
+ //---------------------------------------------------------
+
+ /**
* Utility stats class.
*/
public abstract static class Stats implements Serializable
Modified:
trunk/main/planet/http/demo/src/main/net/dpml/http/demo/ManagementOperations.java
===================================================================
---
trunk/main/planet/http/demo/src/main/net/dpml/http/demo/ManagementOperations.java
2006-01-27 12:58:18 UTC (rev 982)
+++
trunk/main/planet/http/demo/src/main/net/dpml/http/demo/ManagementOperations.java
2006-01-27 13:19:05 UTC (rev 983)
@@ -24,5 +24,24 @@
* Do something.
*/
void doSomething();
+
+ /**
+ * Add a new http context to the application.
+ * @param path the context path
+ */
+ void addContext( String path );
+
+ /**
+ * Remove an http context from the application.
+ * @param path the context path
+ */
+ void removeContext( String path );
+
+ /**
+ * Strurn the array of context paths.
+ * @return the context path array
+ */
+ String[] getContextPaths();
+
}
Modified: trunk/main/planet/http/demo/src/test/net/dpml/http/HttpTestCase.java
===================================================================
--- trunk/main/planet/http/demo/src/test/net/dpml/http/HttpTestCase.java
2006-01-27 12:58:18 UTC (rev 982)
+++ trunk/main/planet/http/demo/src/test/net/dpml/http/HttpTestCase.java
2006-01-27 13:19:05 UTC (rev 983)
@@ -54,6 +54,7 @@
try
{
Demo demo = (Demo) component.getProvider().getValue( false );
+ demo.doSomething();
}
catch( ControlException e )
{
- r983 - in trunk/main/planet/http/demo/src: main/net/dpml/http/demo test/net/dpml/http, mcconnell at BerliOS, 01/27/2006
Archive powered by MHonArc 2.6.24.