Skip to Content.
Sympa Menu

notify-dpml - svn commit: r2914 - in development/planet/http/demo/src: main/net/dpml/http test/net/dpml/http

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: mcconnell AT dpml.net
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: svn commit: r2914 - in development/planet/http/demo/src: main/net/dpml/http test/net/dpml/http
  • Date: Fri, 24 Jun 2005 12:12:03 -0400

Author: mcconnell AT dpml.net
Date: Fri Jun 24 12:12:02 2005
New Revision: 2914

Modified:
development/planet/http/demo/src/main/net/dpml/http/Demo.java
development/planet/http/demo/src/test/net/dpml/http/HttpTestCase.java
Log:
Updates to sync. with changes to the Part api.

Modified: development/planet/http/demo/src/main/net/dpml/http/Demo.java
==============================================================================
--- development/planet/http/demo/src/main/net/dpml/http/Demo.java
(original)
+++ development/planet/http/demo/src/main/net/dpml/http/Demo.java Fri
Jun 24 12:12:02 2005
@@ -24,8 +24,7 @@
import net.dpml.http.HttpContextService;

import net.dpml.part.model.Model;
-import net.dpml.part.model.Component;
-import net.dpml.part.model.Provider;
+import net.dpml.part.manager.Component;

import org.mortbay.http.HttpHandler;

@@ -33,11 +32,11 @@
{
public interface Parts
{
- Model getServerModel();
- Model getSocketListenerModel();
- Model getContextModel();
- Model getNotFoundHandlerModel();
- Model getResourceHandlerModel();
+ Component getServerComponent();
+ Component getSocketListenerComponent();
+ Component getContextComponent();
+ Component getNotFoundHandlerComponent();
+ Component getResourceHandlerComponent();
}

private final Logger m_logger;
@@ -58,18 +57,18 @@
public void start() throws Exception
{
m_logger.info( "Starting" );
- m_server = m_parts.getServerModel().getProvider().resolve( false );
- m_context = m_parts.getContextModel().getProvider().resolve( false );
- m_listener = m_parts.getSocketListenerModel().getProvider().resolve(
false );
- m_handler = m_parts.getResourceHandlerModel().getProvider().resolve(
false );
- m_nf = m_parts.getNotFoundHandlerModel().getProvider().resolve(
false );
+ m_server = m_parts.getServerComponent().resolve( false );
+ m_context = m_parts.getContextComponent().resolve( false );
+ m_listener = m_parts.getSocketListenerComponent().resolve( false );
+ m_handler = m_parts.getResourceHandlerComponent().resolve( false );
+ m_nf = m_parts.getNotFoundHandlerComponent().resolve( false );
m_logger.info( "Started" );
}

public void stop() throws Exception
{
m_logger.info( "Stopping" );
- //m_parts.getServerModel().getComponent().terminate();
+ m_parts.getServerComponent().terminate();
m_logger.info( "Stopped" );
}
}

Modified:
development/planet/http/demo/src/test/net/dpml/http/HttpTestCase.java
==============================================================================
--- development/planet/http/demo/src/test/net/dpml/http/HttpTestCase.java
(original)
+++ development/planet/http/demo/src/test/net/dpml/http/HttpTestCase.java
Fri Jun 24 12:12:02 2005
@@ -25,7 +25,7 @@

import net.dpml.part.model.Model;
import net.dpml.part.control.Controller;
-import net.dpml.part.control.Manager;
+import net.dpml.part.manager.Component;

import net.dpml.metro.central.MetroHelper;

@@ -47,8 +47,10 @@
{
String id = "steve";
MetroHelper helper = new MetroHelper();
+ Controller controller = helper.getController();
URI uri = helper.toURI( PATH );
- Model model = helper.getCompositionManager().getModel( uri, "demo" );
- Demo demo = (Demo) model.getProvider().resolve( false );
+ Model model = controller.getModel( uri, "demo" );
+ Component component = controller.getComponent( model );
+ Demo demo = (Demo) component.resolve( false );
}
}



  • svn commit: r2914 - in development/planet/http/demo/src: main/net/dpml/http test/net/dpml/http, mcconnell, 06/24/2005

Archive powered by MHonArc 2.6.24.

Top of Page