Skip to Content.
Sympa Menu

notify-dpml - svn commit: r1353 - in development/main/transit: handler/src/main/net/dpml/transit/adapter handler/src/main/net/dpml/transit/artifact handler/src/main/net/dpml/transit/repository handler/src/main/net/dpml/transit/util plugin/src/main/net/dpml/transit/control

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: r1353 - in development/main/transit: handler/src/main/net/dpml/transit/adapter handler/src/main/net/dpml/transit/artifact handler/src/main/net/dpml/transit/repository handler/src/main/net/dpml/transit/util plugin/src/main/net/dpml/transit/control
  • Date: Mon, 03 Jan 2005 11:26:13 +0100

Author: mcconnell
Date: Mon Jan 3 11:26:13 2005
New Revision: 1353

Modified:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

development/main/transit/handler/src/main/net/dpml/transit/repository/StandardLoader.java

development/main/transit/handler/src/main/net/dpml/transit/util/ElementHelper.java

development/main/transit/handler/src/main/net/dpml/transit/util/PropertyResolver.java

development/main/transit/plugin/src/main/net/dpml/transit/control/TracePolicy.java
Log:
housekeeping

Modified:
development/main/transit/handler/src/main/net/dpml/transit/adapter/AbstractAdapter.java
==============================================================================
---
development/main/transit/handler/src/main/net/dpml/transit/adapter/AbstractAdapter.java
(original)
+++
development/main/transit/handler/src/main/net/dpml/transit/adapter/AbstractAdapter.java
Mon Jan 3 11:26:13 2005
@@ -25,11 +25,19 @@
*/
abstract class AbstractAdapter implements Monitor
{
+ //
------------------------------------------------------------------------
+ // state
+ //
------------------------------------------------------------------------
+
/**
* The assigned adapter.
*/
private Adapter m_adapter;

+ //
------------------------------------------------------------------------
+ // constructor
+ //
------------------------------------------------------------------------
+
/**
* Creation of a new adaptive monitor.
* @param adapter the adapter to which monitor events will be redirected.
@@ -39,14 +47,9 @@
m_adapter = adapter;
}

- /**
- * Returns the adapter assigned to this adaptive monitor.
- * @return the assigned adapter
- */
- protected Adapter getAdapter()
- {
- return m_adapter;
- }
+ //
------------------------------------------------------------------------
+ // Monitor
+ //
------------------------------------------------------------------------

/**
* Test is debug trace monitoring is enabled.
@@ -71,4 +74,17 @@
getAdapter().debug( message );
}
}
+
+ //
------------------------------------------------------------------------
+ // implementation
+ //
------------------------------------------------------------------------
+
+ /**
+ * Returns the adapter assigned to this adaptive monitor.
+ * @return the assigned adapter
+ */
+ protected Adapter getAdapter()
+ {
+ return m_adapter;
+ }
}

Modified:
development/main/transit/handler/src/main/net/dpml/transit/adapter/CacheMonitorAdapter.java
==============================================================================
---
development/main/transit/handler/src/main/net/dpml/transit/adapter/CacheMonitorAdapter.java
(original)
+++
development/main/transit/handler/src/main/net/dpml/transit/adapter/CacheMonitorAdapter.java
Mon Jan 3 11:26:13 2005
@@ -35,6 +35,10 @@
public class CacheMonitorAdapter extends AbstractAdapter
implements CacheMonitor
{
+ //
------------------------------------------------------------------------
+ // constructor
+ //
------------------------------------------------------------------------
+
/**
* Creation of a new adaptive cache monitor.
* @param adapter the adapter to assign to the monitor
@@ -44,6 +48,10 @@
super( adapter );
}

+ //
------------------------------------------------------------------------
+ // CacheMonitor
+ //
------------------------------------------------------------------------
+
/**
* Notify the monitor that an artifact has been requested.
* @param artifact the requested artifact

Modified:
development/main/transit/handler/src/main/net/dpml/transit/adapter/ConnectionMonitorAdapter.java
==============================================================================
---
development/main/transit/handler/src/main/net/dpml/transit/adapter/ConnectionMonitorAdapter.java
(original)
+++
development/main/transit/handler/src/main/net/dpml/transit/adapter/ConnectionMonitorAdapter.java
Mon Jan 3 11:26:13 2005
@@ -35,6 +35,10 @@
public class ConnectionMonitorAdapter extends AbstractAdapter
implements ConnectionMonitor
{
+ //
------------------------------------------------------------------------
+ // constructor
+ //
------------------------------------------------------------------------
+
/**
* Creation of a new adaptive connection monitor.
* @param adapter the adapter to assign to the monitor
@@ -44,6 +48,10 @@
super( adapter );
}

+ //
------------------------------------------------------------------------
+ // ConnectionMonitor
+ //
------------------------------------------------------------------------
+
/**
* Notify the monitor that a connection was opened.
* @param url the url on which the open connection was issued
@@ -75,5 +83,4 @@
getAdapter().debug( "closed connection: " + url );
}
}
-
}

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
Mon Jan 3 11:26:13 2005
@@ -28,6 +28,10 @@
*/
public class ConsoleAdapter implements Adapter
{
+ //
------------------------------------------------------------------------
+ // static
+ //
------------------------------------------------------------------------
+
/**
* Constant kb value.
*/
@@ -38,11 +42,19 @@
*/
private static final String TAG = "[transit] ";

+ //
------------------------------------------------------------------------
+ // state
+ //
------------------------------------------------------------------------
+
/**
* The debug mode.
*/
private boolean m_debug;

+ //
------------------------------------------------------------------------
+ // constructor
+ //
------------------------------------------------------------------------
+
/**
* Creation of a new console adapter that is used to redirect transit
events
* the system output stream.
@@ -53,6 +65,10 @@
m_debug = debug;
}

+ //
------------------------------------------------------------------------
+ // Adapter
+ //
------------------------------------------------------------------------
+
/**
* Return TRUE is debug level logging is enabled.
* @return the enabled state of debug logging
@@ -177,6 +193,10 @@
}
}

+ //
------------------------------------------------------------------------
+ // implementation
+ //
------------------------------------------------------------------------
+
/**
* Test is the runtime environment is ant.
* @return true if ant is visible

Modified:
development/main/transit/handler/src/main/net/dpml/transit/adapter/ExceptionHelper.java
==============================================================================
---
development/main/transit/handler/src/main/net/dpml/transit/adapter/ExceptionHelper.java
(original)
+++
development/main/transit/handler/src/main/net/dpml/transit/adapter/ExceptionHelper.java
Mon Jan 3 11:26:13 2005
@@ -29,56 +29,9 @@
*/
public final class ExceptionHelper
{
- /**
- * Line separator character.
- */
- private static final String LINE_SEPARATOR =
- System.getProperty( "line.separator" );
-
- /**
- * Header token.
- */
- private static final String HEADER = "----";
-
- /**
- * Exception token.
- */
- private static final String EXCEPTION = HEADER + " exception report ";
-
- /**
- * Composite token.
- */
- private static final String COMPOSITE = HEADER + " composite report ";
-
- /**
- * Runtime token.
- */
- private static final String RUNTIME = HEADER + " runtime exception
report ";
-
- /**
- * Error token.
- */
- private static final String ERROR = HEADER + " error report ";
-
- /**
- * Cause token.
- */
- private static final String CAUSE = HEADER + " cause ";
-
- /**
- * Trace token.
- */
- private static final String TRACE = HEADER + " stack trace ";
-
- /**
- * End token.
- */
- private static final String END = "";
-
- /**
- * Nominal width of character display.
- */
- private static final int WIDTH = 80;
+ //
------------------------------------------------------------------------
+ // static
+ //
------------------------------------------------------------------------

/**
* Returns the exception and causal exceptions as a formatted string.
@@ -155,6 +108,61 @@
return buffer.toString();
}

+ //
------------------------------------------------------------------------
+ // static implementation
+ //
------------------------------------------------------------------------
+
+ /**
+ * Line separator character.
+ */
+ private static final String LINE_SEPARATOR =
+ System.getProperty( "line.separator" );
+
+ /**
+ * Header token.
+ */
+ private static final String HEADER = "----";
+
+ /**
+ * Exception token.
+ */
+ private static final String EXCEPTION = HEADER + " exception report ";
+
+ /**
+ * Composite token.
+ */
+ private static final String COMPOSITE = HEADER + " composite report ";
+
+ /**
+ * Runtime token.
+ */
+ private static final String RUNTIME = HEADER + " runtime exception
report ";
+
+ /**
+ * Error token.
+ */
+ private static final String ERROR = HEADER + " error report ";
+
+ /**
+ * Cause token.
+ */
+ private static final String CAUSE = HEADER + " cause ";
+
+ /**
+ * Trace token.
+ */
+ private static final String TRACE = HEADER + " stack trace ";
+
+ /**
+ * End token.
+ */
+ private static final String END = "";
+
+ /**
+ * Nominal width of character display.
+ */
+ private static final int WIDTH = 80;
+
/**
* Returns the exception and causal exceptions as a formatted string.
* @param buffer the string buffer

Modified:
development/main/transit/handler/src/main/net/dpml/transit/adapter/NetworkMonitorAdapter.java
==============================================================================
---
development/main/transit/handler/src/main/net/dpml/transit/adapter/NetworkMonitorAdapter.java
(original)
+++
development/main/transit/handler/src/main/net/dpml/transit/adapter/NetworkMonitorAdapter.java
Mon Jan 3 11:26:13 2005
@@ -30,6 +30,10 @@
public class NetworkMonitorAdapter extends AbstractAdapter
implements NetworkMonitor
{
+ //
------------------------------------------------------------------------
+ // constructor
+ //
------------------------------------------------------------------------
+
/**
* Creation of a new network monitor adapter.
* @param adapter the logging adapter
@@ -39,6 +43,10 @@
super( adapter );
}

+ //
------------------------------------------------------------------------
+ // NetworkMonitor
+ //
------------------------------------------------------------------------
+
/**
* Handle the notification of an update in the download status.
*

Modified:
development/main/transit/handler/src/main/net/dpml/transit/adapter/RepositoryMonitorAdapter.java
==============================================================================
---
development/main/transit/handler/src/main/net/dpml/transit/adapter/RepositoryMonitorAdapter.java
(original)
+++
development/main/transit/handler/src/main/net/dpml/transit/adapter/RepositoryMonitorAdapter.java
Mon Jan 3 11:26:13 2005
@@ -33,6 +33,10 @@
public class RepositoryMonitorAdapter extends AbstractAdapter
implements RepositoryMonitor
{
+ //
------------------------------------------------------------------------
+ // constructor
+ //
------------------------------------------------------------------------
+
/**
* Creation of a new repository monito to logging adapter.
* @param adapter the logging adapter
@@ -42,6 +46,10 @@
super( adapter );
}

+ //
------------------------------------------------------------------------
+ // RepositoryMonitor
+ //
------------------------------------------------------------------------
+
/**
* Handle notification of an information message.
* @param info the message

Modified:
development/main/transit/handler/src/main/net/dpml/transit/artifact/Artifact.java
==============================================================================
---
development/main/transit/handler/src/main/net/dpml/transit/artifact/Artifact.java
(original)
+++
development/main/transit/handler/src/main/net/dpml/transit/artifact/Artifact.java
Mon Jan 3 11:26:13 2005
@@ -37,30 +37,9 @@
public final class Artifact
implements Serializable, Comparable
{
- /**
- * The artifact uri.
- */
- private final URI m_uri;
-
- // ---------------------
- // Scheme Specific Part
- // ---------------------
-
- /**
- * The artifact group.
- */
- private final String m_group;
-
- /**
- * The artifact name.
- */
- private final String m_name;
-
- /**
- * The artifact type.
- */
- private final String m_type;
-
+ //
------------------------------------------------------------------------
+ // static
+ //
------------------------------------------------------------------------

/**
* Creation of a new artifact instance using a supplied uri
specification. An
@@ -160,6 +139,30 @@
}

//
------------------------------------------------------------------------
+ // state
+ //
------------------------------------------------------------------------
+
+ /**
+ * The artifact uri.
+ */
+ private final URI m_uri;
+
+ /**
+ * The artifact group.
+ */
+ private final String m_group;
+
+ /**
+ * The artifact name.
+ */
+ private final String m_name;
+
+ /**
+ * The artifact type.
+ */
+ private final String m_type;
+
+ //
------------------------------------------------------------------------
// constructor
//
------------------------------------------------------------------------

@@ -251,7 +254,7 @@
}

//
------------------------------------------------------------------------
- // Public Interface
+ // public
//
------------------------------------------------------------------------

/**

Modified:
development/main/transit/handler/src/main/net/dpml/transit/artifact/ArtifactException.java
==============================================================================
---
development/main/transit/handler/src/main/net/dpml/transit/artifact/ArtifactException.java
(original)
+++
development/main/transit/handler/src/main/net/dpml/transit/artifact/ArtifactException.java
Mon Jan 3 11:26:13 2005
@@ -29,7 +29,10 @@
*/
public class ArtifactException extends TransitException
{
-
+ //
------------------------------------------------------------------------
+ // constructor
+ //
------------------------------------------------------------------------
+
/**
* Construct a new <code>ArtifactException</code> instance.
*

Modified:
development/main/transit/handler/src/main/net/dpml/transit/artifact/ArtifactNotFoundException.java
==============================================================================
---
development/main/transit/handler/src/main/net/dpml/transit/artifact/ArtifactNotFoundException.java
(original)
+++
development/main/transit/handler/src/main/net/dpml/transit/artifact/ArtifactNotFoundException.java
Mon Jan 3 11:26:13 2005
@@ -1,5 +1,5 @@
/*
- * Copyright 2004 Stephen J. McConnell.
+ * Copyright 2004-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.
@@ -26,10 +26,18 @@
*/
public class ArtifactNotFoundException extends ArtifactException
{
+ //
------------------------------------------------------------------------
+ // state
+ //
------------------------------------------------------------------------
+
/**
* The artifact that we not found.
*/
- private Artifact m_artifact;
+ private final Artifact m_artifact;
+
+ //
------------------------------------------------------------------------
+ // constructor
+ //
------------------------------------------------------------------------

/**
* Construct a new <code>ArtifactException</code> instance.
@@ -37,7 +45,7 @@
* @param message The detail message for this exception.
* @param artifact the subject artifact
*/
- public ArtifactNotFoundException( final String message, Artifact
artifact )
+ public ArtifactNotFoundException( final String message, final Artifact
artifact )
{
super( message );
m_artifact = artifact;

Modified:
development/main/transit/handler/src/main/net/dpml/transit/artifact/ArtifactURLConnection.java
==============================================================================
---
development/main/transit/handler/src/main/net/dpml/transit/artifact/ArtifactURLConnection.java
(original)
+++
development/main/transit/handler/src/main/net/dpml/transit/artifact/ArtifactURLConnection.java
Mon Jan 3 11:26:13 2005
@@ -32,30 +32,38 @@
*/
public class ArtifactURLConnection extends URLConnection
{
- /**
- * The connected state.
- */
- private boolean m_connected;
+ //
------------------------------------------------------------------------
+ // state
+ //
------------------------------------------------------------------------

/**
* Transit context.
*/
- private SecuredTransitContext m_context;
+ private final SecuredTransitContext m_context;

/**
* Artifact.
*/
- private Artifact m_artifact;
+ private final Artifact m_artifact;
+
+ /**
+ * Reference fragment.
+ */
+ private final String m_reference;

/**
* Cached file.
*/
- private File m_local;
+ private File m_local;

/**
- * Reference fragment.
+ * The connected state.
*/
- private String m_reference;
+ private boolean m_connected;
+
+ //
------------------------------------------------------------------------
+ // constructor
+ //
------------------------------------------------------------------------

/**
* Creation of a new handler.
@@ -84,6 +92,10 @@
}
}

+ //
------------------------------------------------------------------------
+ // URLConnection
+ //
------------------------------------------------------------------------
+
/**
* Establish a connection. The implementation will attempt to
* resolve the resource relative to the cache and associated hosts.
@@ -183,6 +195,10 @@
return null;
}

+ //
------------------------------------------------------------------------
+ // implementation
+ //
------------------------------------------------------------------------
+
/**
* Return a fragment referencing content within the resource referenced by
* the artifact.
@@ -226,7 +242,6 @@
return s;
}
}
-
return url.toString();
}
}

Modified:
development/main/transit/handler/src/main/net/dpml/transit/artifact/CacheHandler.java
==============================================================================
---
development/main/transit/handler/src/main/net/dpml/transit/artifact/CacheHandler.java
(original)
+++
development/main/transit/handler/src/main/net/dpml/transit/artifact/CacheHandler.java
Mon Jan 3 11:26:13 2005
@@ -1,5 +1,5 @@
/*
- * Copyright 2004 Stephen J. McConnell.
+ * Copyright 2004-2005 Stephen J. McConnell.
* Copyright 2004 Niclas Hedhman.
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -37,17 +37,17 @@
/**
* The domain identifier.
*/
- static final String DOMAIN = SecuredTransitContext.DOMAIN;
+ static final String DOMAIN = SecuredTransitContext.DOMAIN;

/**
* Cache property key.
*/
- static final String CACHE_KEY = DOMAIN + ".cache.location";
+ static final String CACHE_KEY = DOMAIN + ".cache.location";

/**
* Cache handler classname key.
*/
- static final String CACHE_CLASS_KEY = DOMAIN + ".cache.class";
+ static final String CACHE_CLASS_KEY = DOMAIN + ".cache.class";

/**
* Attempts to download and cache a remote artifact using a set of remote

Modified:
development/main/transit/handler/src/main/net/dpml/transit/artifact/CacheHandlerFactory.java
==============================================================================
---
development/main/transit/handler/src/main/net/dpml/transit/artifact/CacheHandlerFactory.java
(original)
+++
development/main/transit/handler/src/main/net/dpml/transit/artifact/CacheHandlerFactory.java
Mon Jan 3 11:26:13 2005
@@ -1,5 +1,23 @@
-package net.dpml.transit.artifact;
+/*
+ * Copyright 2004-2005 Stephen J. McConnell.
+ * Copyright 2004 Niclas Hedhman.
+ *
+ * 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.transit.artifact;

import java.lang.reflect.Constructor;

@@ -14,6 +32,10 @@
*/
class CacheHandlerFactory
{
+ //
------------------------------------------------------------------------
+ // static
+ //
------------------------------------------------------------------------
+
/**
* The cache properties filename.
*/
@@ -25,11 +47,19 @@
static final String TRANSIT_CACHE_DEFAULT_HANDLER_CLASSNAME =
"net.dpml.transit.artifact.FileCacheHandler";

+ //
------------------------------------------------------------------------
+ // state
+ //
------------------------------------------------------------------------
+
/**
* The authorative base url.
*/
private URL m_authorative;

+ //
------------------------------------------------------------------------
+ // constructor
+ //
------------------------------------------------------------------------
+
/**
* Creation of a new cache handler factory.
* @param authorative the authorative base url
@@ -39,6 +69,10 @@
m_authorative = authorative;
}

+ //
------------------------------------------------------------------------
+ // implementation
+ //
------------------------------------------------------------------------
+
/** Creates a cache handler from the definition in the properties.
*
* The CacheHandler constructor MUST have the signature of;
@@ -79,5 +113,4 @@
throw new TransitException( "Unable to create CacheHandler: " +
classname, e );
}
}
-
}
\ No newline at end of file

Modified:
development/main/transit/handler/src/main/net/dpml/transit/artifact/DelegatingAuthenticator.java
==============================================================================
---
development/main/transit/handler/src/main/net/dpml/transit/artifact/DelegatingAuthenticator.java
(original)
+++
development/main/transit/handler/src/main/net/dpml/transit/artifact/DelegatingAuthenticator.java
Mon Jan 3 11:26:13 2005
@@ -33,12 +33,19 @@
*/
final class DelegatingAuthenticator extends Authenticator
{
+ //
------------------------------------------------------------------------
+ // static
+ //
------------------------------------------------------------------------

/**
* The singleton delegating authenticator instance.
*/
private static DelegatingAuthenticator m_INSTANCE;

+ //
------------------------------------------------------------------------
+ // state
+ //
------------------------------------------------------------------------
+
/**
* The set of registered authenticators keyed by id.
*/
@@ -61,6 +68,10 @@
}
}

+ //
------------------------------------------------------------------------
+ // constructor
+ //
------------------------------------------------------------------------
+
/**
* Creation of a new delegating authenticator.
*/
@@ -69,6 +80,10 @@
m_authenticators = new HashMap();
}

+ //
------------------------------------------------------------------------
+ // implementation
+ //
------------------------------------------------------------------------
+
/**
* Add an authenticator to the set of authenticators managed by the
* singleton delegating authenticator.

Modified:
development/main/transit/handler/src/main/net/dpml/transit/artifact/FileCacheHandler.java
==============================================================================
---
development/main/transit/handler/src/main/net/dpml/transit/artifact/FileCacheHandler.java
(original)
+++
development/main/transit/handler/src/main/net/dpml/transit/artifact/FileCacheHandler.java
Mon Jan 3 11:26:13 2005
@@ -37,6 +37,10 @@
class FileCacheHandler
implements CacheHandler
{
+ //
------------------------------------------------------------------------
+ // state
+ //
------------------------------------------------------------------------
+
/**
* The base directory of the cache.
*/
@@ -47,6 +51,10 @@
*/
private TreeMap m_resourceHosts;

+ //
------------------------------------------------------------------------
+ // constructor
+ //
------------------------------------------------------------------------
+
/**
* Creation of a new file based cache handler.
* @param hosts the assigned hosts
@@ -76,6 +84,10 @@
m_cacheDir = createCacheDirectory( props );
}

+ //
------------------------------------------------------------------------
+ // CacheHandler
+ //
------------------------------------------------------------------------
+
/**
* Attempts to download and cache a remote artifact using a set of remote
* repositories. The operation is not fail fast and so it keeps trying
if
@@ -150,6 +162,10 @@
throw new ArtifactNotFoundException( error, artifact );
}

+ //
------------------------------------------------------------------------
+ // implementation
+ //
------------------------------------------------------------------------
+
/**
* Return a resource host.
* @param artifact the artifact

Modified:
development/main/transit/handler/src/main/net/dpml/transit/artifact/Handler.java
==============================================================================
---
development/main/transit/handler/src/main/net/dpml/transit/artifact/Handler.java
(original)
+++
development/main/transit/handler/src/main/net/dpml/transit/artifact/Handler.java
Mon Jan 3 11:26:13 2005
@@ -30,16 +30,28 @@
*/
public final class Handler extends URLStreamHandler
{
+ //
------------------------------------------------------------------------
+ // static
+ //
------------------------------------------------------------------------
+
/**
* Default buffer size.
*/
private static final int BUFFER_SIZE = 100;

+ //
------------------------------------------------------------------------
+ // state
+ //
------------------------------------------------------------------------
+
/**
* The transit context.
*/
private SecuredTransitContext m_context;

+ //
------------------------------------------------------------------------
+ // constructor
+ //
------------------------------------------------------------------------
+
/**
* Creation of a new transit artifact protocol handler.
* @exception TransitException if a transit system error occurs
@@ -63,6 +75,10 @@
}
}

+ //
------------------------------------------------------------------------
+ // implementation
+ //
------------------------------------------------------------------------
+
/**
* Opens a connection to the specified URL.
*

Modified:
development/main/transit/handler/src/main/net/dpml/transit/artifact/MavenResourceHost.java
==============================================================================
---
development/main/transit/handler/src/main/net/dpml/transit/artifact/MavenResourceHost.java
(original)
+++
development/main/transit/handler/src/main/net/dpml/transit/artifact/MavenResourceHost.java
Mon Jan 3 11:26:13 2005
@@ -1,5 +1,6 @@
/*
* Copyright 2004 Niclas Hedhman.
+ * 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.
@@ -54,6 +55,9 @@
class MavenResourceHost
implements ResourceHost
{
+ //
------------------------------------------------------------------------
+ // static
+ //
------------------------------------------------------------------------

/**
* HTTP port number.
@@ -70,6 +74,10 @@
*/
private static final int HTTPS_PORT = 443;

+ //
------------------------------------------------------------------------
+ // state
+ //
------------------------------------------------------------------------
+
/**
* Host base url.
*/
@@ -110,6 +118,9 @@
*/
private WeakHashMap m_connections;

+ //
------------------------------------------------------------------------
+ // constructor
+ //
------------------------------------------------------------------------

/** Constructor for a resource host.
*
@@ -172,6 +183,10 @@
da.addTransitAuthenticator( ta, id );
}

+ //
------------------------------------------------------------------------
+ // ResourceHost
+ //
------------------------------------------------------------------------
+
/**
* Return the host name.
* @return the hostname
@@ -294,6 +309,10 @@
return m_trusted;
}

+ //
------------------------------------------------------------------------
+ // implementation
+ //
------------------------------------------------------------------------
+
/**
* Check if the supplied artifact group is known.
* @param artifact the subject artifact to check

Modified:
development/main/transit/handler/src/main/net/dpml/transit/artifact/MimeTypeHandler.java
==============================================================================
---
development/main/transit/handler/src/main/net/dpml/transit/artifact/MimeTypeHandler.java
(original)
+++
development/main/transit/handler/src/main/net/dpml/transit/artifact/MimeTypeHandler.java
Mon Jan 3 11:26:13 2005
@@ -25,6 +25,10 @@
*/
final class MimeTypeHandler
{
+ //
------------------------------------------------------------------------
+ // static
+ //
------------------------------------------------------------------------
+
/**
* Static mime type table of artifact types to mimetype strings.
*/
@@ -65,6 +69,10 @@
return MIME_TYPES.size();
}

+ //
------------------------------------------------------------------------
+ // constructor
+ //
------------------------------------------------------------------------
+
/**
* Disabled constructor.
*/

Modified:
development/main/transit/handler/src/main/net/dpml/transit/artifact/NetworkLoader.java
==============================================================================
---
development/main/transit/handler/src/main/net/dpml/transit/artifact/NetworkLoader.java
(original)
+++
development/main/transit/handler/src/main/net/dpml/transit/artifact/NetworkLoader.java
Mon Jan 3 11:26:13 2005
@@ -38,16 +38,28 @@
*/
class NetworkLoader
{
+ //
------------------------------------------------------------------------
+ // static
+ //
------------------------------------------------------------------------
+
/**
* Buffer size.
*/
private static final int BUFFER_SIZE = 102400;

+ //
------------------------------------------------------------------------
+ // state
+ //
------------------------------------------------------------------------
+
/**
* Network monitor router.
*/
private NetworkMonitorRouter m_monitor;

+ //
------------------------------------------------------------------------
+ // constructor
+ //
------------------------------------------------------------------------
+
/**
* Creation of a new network loader.
* @exception TransitException if an error in transit system
establishment occurs
@@ -58,6 +70,10 @@
m_monitor = Transit.getInstance().getNetworkMonitorRouter();
}

+ //
------------------------------------------------------------------------
+ // implementation
+ //
------------------------------------------------------------------------
+
/**
* Retrieve a remote resource.
*

Modified:
development/main/transit/handler/src/main/net/dpml/transit/artifact/RequestIdentifier.java
==============================================================================
---
development/main/transit/handler/src/main/net/dpml/transit/artifact/RequestIdentifier.java
(original)
+++
development/main/transit/handler/src/main/net/dpml/transit/artifact/RequestIdentifier.java
Mon Jan 3 11:26:13 2005
@@ -1,5 +1,6 @@
/*
* Copyright 2004 Niclas Hedhman, DPML
+ * Copyright 2005 Stephen McConnell, DPML
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -25,11 +26,19 @@
*/
final class RequestIdentifier
{
+ //
------------------------------------------------------------------------
+ // static
+ //
------------------------------------------------------------------------
+
/**
* Used in hashcode calculation.
*/
private static final int MAGIC_NUMBER = 72349724;

+ //
------------------------------------------------------------------------
+ // state
+ //
------------------------------------------------------------------------
+
/**
* The internet address.
*/
@@ -55,6 +64,10 @@
*/
private final String m_scheme;

+ //
------------------------------------------------------------------------
+ // constructor
+ //
------------------------------------------------------------------------
+
/**
* Creation of a new request identifier.
* @param address the address
@@ -92,6 +105,10 @@
m_scheme = scheme;
}

+ //
------------------------------------------------------------------------
+ // implementation
+ //
------------------------------------------------------------------------
+
/**
* Test for equality.
* @param obj the object to test against

Modified:
development/main/transit/handler/src/main/net/dpml/transit/artifact/ResourceHostFactory.java
==============================================================================
---
development/main/transit/handler/src/main/net/dpml/transit/artifact/ResourceHostFactory.java
(original)
+++
development/main/transit/handler/src/main/net/dpml/transit/artifact/ResourceHostFactory.java
Mon Jan 3 11:26:13 2005
@@ -42,6 +42,10 @@
*/
class ResourceHostFactory
{
+ //
------------------------------------------------------------------------
+ // static
+ //
------------------------------------------------------------------------
+
/**
* True.
*/
@@ -67,11 +71,19 @@
*/
private static final String DEFAULT_PRIORITY_STRING = "10";

+ //
------------------------------------------------------------------------
+ // state
+ //
------------------------------------------------------------------------
+
/**
* Authorative anchor url.
*/
private URL m_authorative;

+ //
------------------------------------------------------------------------
+ // constructor
+ //
------------------------------------------------------------------------
+
/**
* Creation of a new resource host factory using a supplied authoriative
* anchor url.
@@ -82,6 +94,10 @@
m_authorative = authorative;
}

+ //
------------------------------------------------------------------------
+ // implementation
+ //
------------------------------------------------------------------------
+
/**
* Create a set of resource hosts relative to the information optained at
the
* authorative anchor. The implementation will attempt to locate a
hosts.xml

Modified:
development/main/transit/handler/src/main/net/dpml/transit/artifact/TransitAuthenticatorImpl.java
==============================================================================
---
development/main/transit/handler/src/main/net/dpml/transit/artifact/TransitAuthenticatorImpl.java
(original)
+++
development/main/transit/handler/src/main/net/dpml/transit/artifact/TransitAuthenticatorImpl.java
Mon Jan 3 11:26:13 2005
@@ -33,10 +33,18 @@
final class TransitAuthenticatorImpl
implements TransitAuthenticator
{
+ //
------------------------------------------------------------------------
+ // state
+ //
------------------------------------------------------------------------
+
/**
* Proxy username.
*/
- private PasswordAuthentication m_authentication;
+ private final PasswordAuthentication m_authentication;
+
+ //
------------------------------------------------------------------------
+ // constructor
+ //
------------------------------------------------------------------------

/**
* Creation of a new simple authenticator.
@@ -58,6 +66,10 @@
m_authentication = new PasswordAuthentication( username,
password.toCharArray() );
}

+ //
------------------------------------------------------------------------
+ // implementation
+ //
------------------------------------------------------------------------
+
/**
* Returns the password authenticator.
* @param authenticator an default authenticator

Modified:
development/main/transit/handler/src/main/net/dpml/transit/artifact/Util.java
==============================================================================
---
development/main/transit/handler/src/main/net/dpml/transit/artifact/Util.java
(original)
+++
development/main/transit/handler/src/main/net/dpml/transit/artifact/Util.java
Mon Jan 3 11:26:13 2005
@@ -37,6 +37,10 @@
*/
final class Util
{
+ //
------------------------------------------------------------------------
+ // static
+ //
------------------------------------------------------------------------
+
/**
* Read a set of properties from a property file specificed by a url.
* Property files may reference symbolic properties in the form ${name}.
@@ -134,6 +138,10 @@
}
}

+ //
------------------------------------------------------------------------
+ // constructor
+ //
------------------------------------------------------------------------
+
/**
* Constructor.
*/

Modified:
development/main/transit/handler/src/main/net/dpml/transit/artifact/XMLHostsBuilder.java
==============================================================================
---
development/main/transit/handler/src/main/net/dpml/transit/artifact/XMLHostsBuilder.java
(original)
+++
development/main/transit/handler/src/main/net/dpml/transit/artifact/XMLHostsBuilder.java
Mon Jan 3 11:26:13 2005
@@ -42,12 +42,20 @@
*/
final class XMLHostsBuilder
{
+ //
------------------------------------------------------------------------
+ // state
+ //
------------------------------------------------------------------------
+
/**
* The factory used to create resource hosts based on the data collected
* from xml based specifications.
*/
- private ResourceHostFactory m_resourceHostFactory;
+ private final ResourceHostFactory m_resourceHostFactory;

+ //
------------------------------------------------------------------------
+ // constructor
+ //
------------------------------------------------------------------------
+
/**
* Constructor.
* @param factory the resource host factory
@@ -57,6 +65,10 @@
m_resourceHostFactory = factory;
}

+ //
------------------------------------------------------------------------
+ // implementation
+ //
------------------------------------------------------------------------
+
/**
* Build a set of resource hosts using a supplied input stream.
* @param result a list containing the acculated host definitions

Modified:
development/main/transit/handler/src/main/net/dpml/transit/repository/StandardLoader.java
==============================================================================
---
development/main/transit/handler/src/main/net/dpml/transit/repository/StandardLoader.java
(original)
+++
development/main/transit/handler/src/main/net/dpml/transit/repository/StandardLoader.java
Mon Jan 3 11:26:13 2005
@@ -52,11 +52,19 @@
public class StandardLoader
implements Repository
{
+ //
------------------------------------------------------------------------
+ // state
+ //
------------------------------------------------------------------------
+
/**
* The repository monitor.
*/
- private RepositoryMonitorRouter m_monitor;
+ private final RepositoryMonitorRouter m_monitor;

+ //
------------------------------------------------------------------------
+ // constructor
+ //
------------------------------------------------------------------------
+
/**
* Creation of a new loader using the supplied initial context.
* @exception TransitException if a bootstrapping error occurs
@@ -67,6 +75,10 @@
m_monitor = Transit.getInstance().getRepositoryMonitorRouter();
}

+ //
------------------------------------------------------------------------
+ // Repository
+ //
------------------------------------------------------------------------
+
/**
* Return the repository monitor router.
* @return the router

Modified:
development/main/transit/handler/src/main/net/dpml/transit/util/ElementHelper.java
==============================================================================
---
development/main/transit/handler/src/main/net/dpml/transit/util/ElementHelper.java
(original)
+++
development/main/transit/handler/src/main/net/dpml/transit/util/ElementHelper.java
Mon Jan 3 11:26:13 2005
@@ -40,6 +40,10 @@
*/
public final class ElementHelper
{
+ //
------------------------------------------------------------------------
+ // static
+ //
------------------------------------------------------------------------
+
/**
* Return the root element of the supplied input stream.
* @param input the input stream containing a XML definition
@@ -213,6 +217,10 @@
return PropertyResolver.resolve( props, value );
}

+ //
------------------------------------------------------------------------
+ // constructor
+ //
------------------------------------------------------------------------
+
/**
* Constructor (disabled)
*/

Modified:
development/main/transit/handler/src/main/net/dpml/transit/util/PropertyResolver.java
==============================================================================
---
development/main/transit/handler/src/main/net/dpml/transit/util/PropertyResolver.java
(original)
+++
development/main/transit/handler/src/main/net/dpml/transit/util/PropertyResolver.java
Mon Jan 3 11:26:13 2005
@@ -27,6 +27,10 @@
*/
public final class PropertyResolver
{
+ //
------------------------------------------------------------------------
+ // static
+ //
------------------------------------------------------------------------
+
/**
* Symbol substitution from properties.
* Replace any occurances of ${[key]} with the value of the property
@@ -130,6 +134,10 @@
}
}

+ //
------------------------------------------------------------------------
+ // constructor
+ //
------------------------------------------------------------------------
+
/**
* Null constructor.
*/

Modified:
development/main/transit/plugin/src/main/net/dpml/transit/control/TracePolicy.java
==============================================================================
---
development/main/transit/plugin/src/main/net/dpml/transit/control/TracePolicy.java
(original)
+++
development/main/transit/plugin/src/main/net/dpml/transit/control/TracePolicy.java
Mon Jan 3 11:26:13 2005
@@ -1,5 +1,5 @@
/*
- * Copyright 2004 Stephen J. McConnell.
+ * Copyright 2004-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.
@@ -20,10 +20,10 @@


/**
- * A trace policy object is used to declare the endabled or disabled state
of
- * trace logging.
+ * A trace policy object is used to declare an enabled or disabled
+ * trace logging state.
*
- * @author <a href="mailto:dev@dpmlnet";>Stephen J. McConnell</a>
+ * @author <a href="mailto:dev@dpmlnet";>Stephen McConnell</a>
* @version $Id: Metro.java 916 2004-11-25 12:15:17Z niclas AT apache.org $
*/
public class TracePolicy



  • svn commit: r1353 - in development/main/transit: handler/src/main/net/dpml/transit/adapter handler/src/main/net/dpml/transit/artifact handler/src/main/net/dpml/transit/repository handler/src/main/net/dpml/transit/util plugin/src/main/net/dpml/transit/control, mcconnell, 01/03/2005

Archive powered by MHonArc 2.6.24.

Top of Page