notify-dpml AT lists.ibiblio.org
Subject: DPML Notify
List archive
svn commit: r2167 - development/main/metro/composition/testing/acme/src/main/net/dpml/composition/testing
- From: mcconnell AT dpml.net
- To: notify-dpml AT lists.ibiblio.org
- Subject: svn commit: r2167 - development/main/metro/composition/testing/acme/src/main/net/dpml/composition/testing
- Date: Mon, 28 Mar 2005 14:22:12 -0500
Author: mcconnell AT dpml.net
Date: Mon Mar 28 14:22:12 2005
New Revision: 2167
Modified:
development/main/metro/composition/testing/acme/src/main/net/dpml/composition/testing/DefaultGizmo.java
development/main/metro/composition/testing/acme/src/main/net/dpml/composition/testing/DefaultWidget.java
development/main/metro/composition/testing/acme/src/main/net/dpml/composition/testing/Widget.java
Log:
Update example to validate actual service invocation (widget.toString() is
actually handled by the invocation handler).
Modified:
development/main/metro/composition/testing/acme/src/main/net/dpml/composition/testing/DefaultGizmo.java
==============================================================================
---
development/main/metro/composition/testing/acme/src/main/net/dpml/composition/testing/DefaultGizmo.java
(original)
+++
development/main/metro/composition/testing/acme/src/main/net/dpml/composition/testing/DefaultGizmo.java
Mon Mar 28 14:22:12 2005
@@ -47,7 +47,9 @@
{
logger.info( "initializing" );
Widget widget = dependencies.getWidget();
- logger.info( "widget established: " + widget );
+ logger.info( "widget established");
+
+ widget.doWidgetTypeStuff();
try
{
Modified:
development/main/metro/composition/testing/acme/src/main/net/dpml/composition/testing/DefaultWidget.java
==============================================================================
---
development/main/metro/composition/testing/acme/src/main/net/dpml/composition/testing/DefaultWidget.java
(original)
+++
development/main/metro/composition/testing/acme/src/main/net/dpml/composition/testing/DefaultWidget.java
Mon Mar 28 14:22:12 2005
@@ -35,6 +35,13 @@
public static final boolean TYPE_THREADSAFE_CAPABLE = true;
//------------------------------------------------------------------
+ // state
+ //------------------------------------------------------------------
+
+ private final Logger m_logger;
+ private final Context m_context;
+
+ //------------------------------------------------------------------
// constructor
//------------------------------------------------------------------
@@ -43,13 +50,23 @@
*
* @param logger the logging channel asign by the container
*/
- public DefaultWidget( Logger logger, Context context )
+ public DefaultWidget( final Logger logger, final Context context )
+ {
+ m_context = context;
+ m_logger = logger;
+ }
+
+ //------------------------------------------------------------------
+ // Widget
+ //------------------------------------------------------------------
+
+ public void doWidgetTypeStuff()
{
- String foo = context.getFoo();
- int width = context.getWidth();
- int height = context.getHeight( 5024 );
+ String foo = m_context.getFoo();
+ int width = m_context.getWidth();
+ int height = m_context.getHeight( 5024 );
- logger.info(
+ m_logger.info(
foo
+ " established with a width of "
+ width
Modified:
development/main/metro/composition/testing/acme/src/main/net/dpml/composition/testing/Widget.java
==============================================================================
---
development/main/metro/composition/testing/acme/src/main/net/dpml/composition/testing/Widget.java
(original)
+++
development/main/metro/composition/testing/acme/src/main/net/dpml/composition/testing/Widget.java
Mon Mar 28 14:22:12 2005
@@ -25,4 +25,5 @@
*/
public interface Widget
{
+ void doWidgetTypeStuff();
}
- svn commit: r2167 - development/main/metro/composition/testing/acme/src/main/net/dpml/composition/testing, mcconnell, 03/28/2005
Archive powered by MHonArc 2.6.24.