[jboss-cvs] JBossAS SVN: r107803 - in projects/jboss-deployers/trunk: deployers-spi/src/main/java/org/jboss/deployers/spi/classloading and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Aug 26 06:15:04 EDT 2010
Author: alesj
Date: 2010-08-26 06:15:04 -0400 (Thu, 26 Aug 2010)
New Revision: 107803
Added:
projects/jboss-deployers/trunk/deployers-spi/src/main/java/org/jboss/deployers/spi/classloading/ResourceLookupProvider.java
Modified:
projects/jboss-deployers/trunk/deployers-impl/src/main/java/org/jboss/deployers/plugins/classloading/AbstractResourceLookupDeployer.java
Log:
Expose interface for matching modules.
Modified: projects/jboss-deployers/trunk/deployers-impl/src/main/java/org/jboss/deployers/plugins/classloading/AbstractResourceLookupDeployer.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-impl/src/main/java/org/jboss/deployers/plugins/classloading/AbstractResourceLookupDeployer.java 2010-08-26 06:17:36 UTC (rev 107802)
+++ projects/jboss-deployers/trunk/deployers-impl/src/main/java/org/jboss/deployers/plugins/classloading/AbstractResourceLookupDeployer.java 2010-08-26 10:15:04 UTC (rev 107803)
@@ -35,6 +35,7 @@
import org.jboss.classloading.spi.visitor.ResourceVisitor;
import org.jboss.classloading.spi.visitor.RootAwareResource;
import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.classloading.ResourceLookupProvider;
import org.jboss.deployers.spi.deployer.DeploymentStages;
import org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer;
import org.jboss.deployers.structure.spi.DeploymentUnit;
@@ -47,7 +48,7 @@
*
* @author <a href="ales.justin at jboss.org">Ales Justin</a>
*/
-public class AbstractResourceLookupDeployer extends AbstractSimpleRealDeployer<Module>
+public class AbstractResourceLookupDeployer extends AbstractSimpleRealDeployer<Module> implements ResourceLookupProvider<Module>
{
private String resourceName;
private String[] dir;
@@ -79,11 +80,11 @@
matchingModules = new ConcurrentHashMap<Module, Set<URL>>();
}
- /**
- * Get matching modules and urls which own matching resources.
- *
- * @return the matching modules and urls which own matching resources.
- */
+ public String getResourceName()
+ {
+ return resourceName;
+ }
+
public Map<Module, Set<URL>> getMatchingModules()
{
return Collections.unmodifiableMap(matchingModules);
Copied: projects/jboss-deployers/trunk/deployers-spi/src/main/java/org/jboss/deployers/spi/classloading/ResourceLookupProvider.java (from rev 104761, projects/jboss-deployers/trunk/deployers-spi/src/main/java/org/jboss/deployers/spi/classloading/DeploymentMetaData.java)
===================================================================
--- projects/jboss-deployers/trunk/deployers-spi/src/main/java/org/jboss/deployers/spi/classloading/ResourceLookupProvider.java (rev 0)
+++ projects/jboss-deployers/trunk/deployers-spi/src/main/java/org/jboss/deployers/spi/classloading/ResourceLookupProvider.java 2010-08-26 10:15:04 UTC (rev 107803)
@@ -0,0 +1,49 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.deployers.spi.classloading;
+
+import java.net.URL;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * Provide Module to owners mapping.
+ *
+ * @param <T> exact module type; e.g. ClassLoader or Module
+ * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
+ */
+public interface ResourceLookupProvider<T>
+{
+ /**
+ * The resource we're lookiong for.
+ *
+ * @return the resource name
+ */
+ String getResourceName();
+
+ /**
+ * Get matching modules and urls which own matching resources.
+ *
+ * @return the matching modules and urls which own matching resources.
+ */
+ Map<T, Set<URL>> getMatchingModules();
+}
\ No newline at end of file
More information about the jboss-cvs-commits
mailing list