Revision: 7777
Author: victormote
Date: 2006-07-08 12:46:39 -0700 (Sat, 08 Jul 2006)
ViewCVS: http://svn.sourceforge.net/foray/?rev=7777&view=rev
Log Message:
-----------
Add some more doc.
Modified Paths:
--------------
trunk/foray/foray-common/src/java/org/foray/common/url/ProtocolRegistrationBroker.java
Modified: trunk/foray/foray-common/src/java/org/foray/common/url/ProtocolRegistrationBroker.java
===================================================================
--- trunk/foray/foray-common/src/java/org/foray/common/url/ProtocolRegistrationBroker.java 2006-07-08 19:24:24 UTC (rev 7776)
+++ trunk/foray/foray-common/src/java/org/foray/common/url/ProtocolRegistrationBroker.java 2006-07-08 19:46:39 UTC (rev 7777)
@@ -26,9 +26,35 @@
package org.foray.common.url;
+import java.net.URLStreamHandlerFactory;
+
/**
- * Manages which {@link ProtocolRegistrationStrategy} is used to register new
+ * <p>Manages which {@link ProtocolRegistrationStrategy} is used to register new
* custom URL protocol handlers.
+ * Only one strategy can be used within a session.
+ * Java provides two methods for registering these protocol handlers, one found
+ * in {@link URLStreamHandlerFactory} (the Factory scheme), and the other
+ * using the "java.protocol.handler.pkgs" Java property (the Property scheme).
+ * Each of these schemes has drawbacks.</p>
+ *
+ * <p>This class can register the following implementations using its
+ * {@link #setStandardRegistrationStrategy(int)} method:</p>
+ * <ul>
+ * <li>Factory. Uses the Factory scheme exclusively.</li>
+ * <li>Property. Uses the Property scheme exclusively.</li>
+ * <li>Universal. Uses the best scheme that it can find. Tries the Factory
+ * scheme first, then uses the Property scheme as a fallback.</li>
+ * </ul>
+ *
+ * <p>In addition to the standard strategies described above, custom strategies
+ * can be registered using
+ * {@link #setRegistrationStrategy(ProtocolRegistrationStrategy)}.
+ * This may be useful in cases where a {@link URLStreamHandlerFactory} has been
+ * registered by some third-party and the developer wishes to use it to get
+ * URL handlers registered.
+ * {@link AbstractProtocolRegistration} is an abstract implementation of
+ * {@link ProtocolRegistrationStrategy} which may be a useful starting place for
+ * custom implementations.</p>
*/
public class ProtocolRegistrationBroker {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|