[webbeans-commits] Webbeans SVN: r314 - in ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap: spi and 1 other directory.
webbeans-commits at lists.jboss.org
webbeans-commits at lists.jboss.org
Mon Nov 17 06:00:16 EST 2008
Author: pete.muir at jboss.org
Date: 2008-11-17 06:00:16 -0500 (Mon, 17 Nov 2008)
New Revision: 314
Added:
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/spi/EjbDescriptor.java
Modified:
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/Bootstrap.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/spi/WebBeanDiscovery.java
Log:
Update SPI
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/Bootstrap.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/Bootstrap.java 2008-11-17 06:55:01 UTC (rev 313)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/Bootstrap.java 2008-11-17 11:00:16 UTC (rev 314)
@@ -92,7 +92,7 @@
registerBeans(new HashSet<Class<?>>(Arrays.asList(classes)));
}
- public void registerBeans(Set<Class<?>> classes)
+ public void registerBeans(Iterable<Class<?>> classes)
{
Set<AbstractBean<?, ?>> beans = createBeans(classes);
manager.setBeans(beans);
@@ -108,7 +108,7 @@
return createBeans(new HashSet<Class<?>>(Arrays.asList(classes)));
}
- public Set<AbstractBean<?, ?>> createBeans(Set<Class<?>> classes)
+ public Set<AbstractBean<?, ?>> createBeans(Iterable<Class<?>> classes)
{
Set<AbstractBean<?, ?>> beans = new HashSet<AbstractBean<?, ?>>();
for (Class<?> clazz : classes)
Added: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/spi/EjbDescriptor.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/spi/EjbDescriptor.java (rev 0)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/spi/EjbDescriptor.java 2008-11-17 11:00:16 UTC (rev 314)
@@ -0,0 +1,28 @@
+package org.jboss.webbeans.bootstrap.spi;
+
+import java.lang.reflect.Method;
+import java.util.Iterator;
+
+public interface EjbDescriptor<T>
+{
+ /**
+ * @return The EJB Bean class
+ */
+ public Class<T> getType();
+
+ /**
+ * @return The JNDI name under which the EJB is registered
+ */
+ public String getJndiName();
+
+ /**
+ * @return The local interfaces of the EJB
+ */
+ public Iterator<Class<?>> getLocalInterfaces();
+
+ /**
+ * @return The remove methods of the EJB
+ */
+ public Iterator<Method> getRemoveMethods();
+
+}
Property changes on: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/spi/EjbDescriptor.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/spi/WebBeanDiscovery.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/spi/WebBeanDiscovery.java 2008-11-17 06:55:01 UTC (rev 313)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/spi/WebBeanDiscovery.java 2008-11-17 11:00:16 UTC (rev 314)
@@ -1,10 +1,30 @@
package org.jboss.webbeans.bootstrap.spi;
-import java.util.Set;
+import java.net.URL;
+import java.util.Map;
+/**
+ * A container should implement this interface to allow the Web Beans RI to
+ * discover the Web Beans to deploy
+ *
+ * @author Pete Muir
+ *
+ */
public interface WebBeanDiscovery
{
+ /**
+ * @return A list of all classes in classpath archives with web-beans.xml files
+ */
+ public Iterable<Class<?>> discoverWebBeanClasses();
- public Set<Class<?>> discoverWebBeanClasses();
+ /**
+ * @return A list of all web-beans.xml files in the app classpath
+ */
+ public Iterable<URL> discoverWebBeansXml();
+ /**
+ * @return A Map of EJB descriptors, keyed by the EJB bean class
+ */
+ public Map<Class<?>, EjbDescriptor<?>> discoverEjbs();
+
}
More information about the weld-commits
mailing list