Skip to Content.
Sympa Menu

notify-dpml - svn commit: r1184 - in development/main/transit/handler/src/main/net/dpml/transit: . adapter artifact monitors

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: mcconnell AT netcompartner.com
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: svn commit: r1184 - in development/main/transit/handler/src/main/net/dpml/transit: . adapter artifact monitors
  • Date: Wed, 15 Dec 2004 15:23:37 +0100

Author: mcconnell
Date: Wed Dec 15 15:23:37 2004
New Revision: 1184

Modified:
development/main/transit/handler/src/main/net/dpml/transit/Main.java
development/main/transit/handler/src/main/net/dpml/transit/Transit.java

development/main/transit/handler/src/main/net/dpml/transit/adapter/ConsoleAdapter.java

development/main/transit/handler/src/main/net/dpml/transit/artifact/SecuredTransitContext.java

development/main/transit/handler/src/main/net/dpml/transit/monitors/AbstractMonitorRouter.java

development/main/transit/handler/src/main/net/dpml/transit/monitors/CacheMonitorRouter.java

development/main/transit/handler/src/main/net/dpml/transit/monitors/ConnectionMonitorRouter.java

development/main/transit/handler/src/main/net/dpml/transit/monitors/NetworkMonitorRouter.java

development/main/transit/handler/src/main/net/dpml/transit/monitors/RepositoryMonitorRouter.java
Log:
checkstyle cleanup

Modified: development/main/transit/handler/src/main/net/dpml/transit/Main.java
==============================================================================
--- development/main/transit/handler/src/main/net/dpml/transit/Main.java
(original)
+++ development/main/transit/handler/src/main/net/dpml/transit/Main.java
Wed Dec 15 15:23:37 2004
@@ -194,11 +194,26 @@
// disabled
}

+ /**
+ * Internal monitor used to handle debug level trace messages
+ * produced by transit during initialization.
+ */
private static class BootstrapMonitor implements Monitor
{
+ /**
+ * The transit lead tag.
+ */
private static final String TAG = "[transit] ";
+
+ /**
+ * The trace enabled state.
+ */
private final boolean m_trace;

+ /**
+ * Creation of a new bootstrap monitor.
+ * @param trace the trace enable flag
+ */
BootstrapMonitor( boolean trace )
{
m_trace = trace;

Modified:
development/main/transit/handler/src/main/net/dpml/transit/Transit.java
==============================================================================
--- development/main/transit/handler/src/main/net/dpml/transit/Transit.java
(original)
+++ development/main/transit/handler/src/main/net/dpml/transit/Transit.java
Wed Dec 15 15:23:37 2004
@@ -139,7 +139,7 @@
monitor.trace( "creating transit instance" );
}
SecuredTransitContext.create( monitor ); // Ensure secured
environment.
- m_repositoryMonitor = new RepositoryMonitorRouter( monitor);
+ m_repositoryMonitor = new RepositoryMonitorRouter( monitor );
m_cacheMonitor = new CacheMonitorRouter( monitor );
m_networkMonitor = new NetworkMonitorRouter( monitor );
}

Modified:
development/main/transit/handler/src/main/net/dpml/transit/adapter/ConsoleAdapter.java
==============================================================================
---
development/main/transit/handler/src/main/net/dpml/transit/adapter/ConsoleAdapter.java
(original)
+++
development/main/transit/handler/src/main/net/dpml/transit/adapter/ConsoleAdapter.java
Wed Dec 15 15:23:37 2004
@@ -33,6 +33,9 @@
*/
private static final int KBYTE = 1024;

+ /**
+ * Tag identifying console log entries.
+ */
private static final String TAG = "[transit] ";

/**
@@ -174,6 +177,10 @@
}
}

+ /**
+ * Test is the runtime environment is ant.
+ * @return true if ant is visible
+ */
private boolean isAnt()
{
try
@@ -222,6 +229,10 @@
}
}

+ /**
+ * Internal utility to log a message to system.out.
+ * @param message the message to log
+ */
private void log( String message )
{
System.out.print( TAG );

Modified:
development/main/transit/handler/src/main/net/dpml/transit/artifact/SecuredTransitContext.java
==============================================================================
---
development/main/transit/handler/src/main/net/dpml/transit/artifact/SecuredTransitContext.java
(original)
+++
development/main/transit/handler/src/main/net/dpml/transit/artifact/SecuredTransitContext.java
Wed Dec 15 15:23:37 2004
@@ -232,6 +232,7 @@
* the implementation will assume ${dpml.home}/transit as the authorative
* root directory.
*
+ * @param monitor the bootstrap monitor
* @return the authorative url
* @exception TransitException if an error occurs during authority url
creation
*/

Modified:
development/main/transit/handler/src/main/net/dpml/transit/monitors/AbstractMonitorRouter.java
==============================================================================
---
development/main/transit/handler/src/main/net/dpml/transit/monitors/AbstractMonitorRouter.java
(original)
+++
development/main/transit/handler/src/main/net/dpml/transit/monitors/AbstractMonitorRouter.java
Wed Dec 15 15:23:37 2004
@@ -17,12 +17,8 @@
*/

package net.dpml.transit.monitors;
-
-import java.net.URI;
-import java.lang.reflect.Constructor;

import java.util.ArrayList;
-import java.util.Iterator;

/**
* A repository monitor router handles mutlicast distribution of monitor
events to
@@ -34,6 +30,9 @@
// static
//--------------------------------------------------------------------

+ /**
+ * An empty set of monitors.
+ */
private static final Monitor[] EMPTY_MONITORS = new Monitor[0];

//--------------------------------------------------------------------
@@ -46,17 +45,21 @@
private ArrayList m_monitors;

/**
- * The trace policy.
+ * The trace monitor.
*/
- private final Monitor m_trace;
+ private final Monitor m_monitor;

//--------------------------------------------------------------------
// constructors
//--------------------------------------------------------------------

- public AbstractMonitorRouter( Monitor trace )
+ /**
+ * Creation of a new abstract router.
+ * @param monitor the trace monitor
+ */
+ public AbstractMonitorRouter( Monitor monitor )
{
- m_trace = trace;
+ m_monitor = monitor;
}

//--------------------------------------------------------------------
@@ -136,7 +139,7 @@
*/
public boolean isTraceEnabled()
{
- return m_trace.isTraceEnabled();
+ return m_monitor.isTraceEnabled();
}

/**
@@ -148,7 +151,7 @@
*/
public void trace( String message )
{
- m_trace.trace( message );
+ m_monitor.trace( message );
}
}


Modified:
development/main/transit/handler/src/main/net/dpml/transit/monitors/CacheMonitorRouter.java
==============================================================================
---
development/main/transit/handler/src/main/net/dpml/transit/monitors/CacheMonitorRouter.java
(original)
+++
development/main/transit/handler/src/main/net/dpml/transit/monitors/CacheMonitorRouter.java
Wed Dec 15 15:23:37 2004
@@ -22,9 +22,6 @@

import java.net.URL;

-import java.util.ArrayList;
-import java.util.Iterator;
-
import net.dpml.transit.artifact.Artifact;

/**
@@ -38,9 +35,13 @@
// constructors
//--------------------------------------------------------------------

- public CacheMonitorRouter( Monitor trace )
+ /**
+ * Creation of a new cache monitor router.
+ * @param monitor the bootstrap trace monitor
+ */
+ public CacheMonitorRouter( Monitor monitor )
{
- super( trace );
+ super( monitor );
}

//--------------------------------------------------------------------
@@ -143,7 +144,7 @@
*/
public void addMonitor( Monitor monitor ) throws IllegalArgumentException
{
- if( !( monitor instanceof CacheMonitor) )
+ if( !( monitor instanceof CacheMonitor ) )
{
throw new IllegalArgumentException( "monitor must be
CacheMonitor type." );
}

Modified:
development/main/transit/handler/src/main/net/dpml/transit/monitors/ConnectionMonitorRouter.java
==============================================================================
---
development/main/transit/handler/src/main/net/dpml/transit/monitors/ConnectionMonitorRouter.java
(original)
+++
development/main/transit/handler/src/main/net/dpml/transit/monitors/ConnectionMonitorRouter.java
Wed Dec 15 15:23:37 2004
@@ -20,9 +20,6 @@

import java.net.URL;

-import java.util.ArrayList;
-import java.util.Iterator;
-
/**
* A commection monitor implemetation that routes connection notification
requests
* to registered listeners.
@@ -34,9 +31,13 @@
// constructors
//--------------------------------------------------------------------

- public ConnectionMonitorRouter( Monitor trace )
+ /**
+ * Creation of a new connection monitor router.
+ * @param monitor the bootstrap trace monitor
+ */
+ public ConnectionMonitorRouter( Monitor monitor )
{
- super( trace );
+ super( monitor );
}

//--------------------------------------------------------------------

Modified:
development/main/transit/handler/src/main/net/dpml/transit/monitors/NetworkMonitorRouter.java
==============================================================================
---
development/main/transit/handler/src/main/net/dpml/transit/monitors/NetworkMonitorRouter.java
(original)
+++
development/main/transit/handler/src/main/net/dpml/transit/monitors/NetworkMonitorRouter.java
Wed Dec 15 15:23:37 2004
@@ -20,9 +20,6 @@

import java.net.URL;

-import java.util.ArrayList;
-import java.util.Iterator;
-
/**
* A router that handles multicasr distribution of monitor events to
registered monitors.
*/
@@ -33,9 +30,13 @@
// constructors
//--------------------------------------------------------------------

- public NetworkMonitorRouter( Monitor trace )
+ /**
+ * Creation of a new network monitor router.
+ * @param monitor the bootstrap trace monitor
+ */
+ public NetworkMonitorRouter( Monitor monitor )
{
- super( trace );
+ super( monitor );
}

//--------------------------------------------------------------------

Modified:
development/main/transit/handler/src/main/net/dpml/transit/monitors/RepositoryMonitorRouter.java
==============================================================================
---
development/main/transit/handler/src/main/net/dpml/transit/monitors/RepositoryMonitorRouter.java
(original)
+++
development/main/transit/handler/src/main/net/dpml/transit/monitors/RepositoryMonitorRouter.java
Wed Dec 15 15:23:37 2004
@@ -21,9 +21,6 @@
import java.net.URI;
import java.lang.reflect.Constructor;

-import java.util.ArrayList;
-import java.util.Iterator;
-
/**
* A repository monitor router handles mutlicast distribution of monitor
events to
* a set of subscribed monitors.
@@ -35,9 +32,13 @@
// constructors
//--------------------------------------------------------------------

- public RepositoryMonitorRouter( Monitor trace )
+ /**
+ * Creation of a new repository monitor router.
+ * @param monitor the bootstrap trace monitor
+ */
+ public RepositoryMonitorRouter( Monitor monitor )
{
- super( trace );
+ super( monitor );
}

//--------------------------------------------------------------------



  • svn commit: r1184 - in development/main/transit/handler/src/main/net/dpml/transit: . adapter artifact monitors, mcconnell, 12/15/2004

Archive powered by MHonArc 2.6.24.

Top of Page