Skip to content

Commit

Permalink
Update SPI
Browse files Browse the repository at this point in the history
git-svn-id: http://anonsvn.jboss.org/repos/weld/ri/trunk@314 1c488680-804c-0410-94cd-c6b725194a0e
  • Loading branch information
pmuir committed Nov 17, 2008
1 parent bd3112f commit 115c202
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 4 deletions.
Expand Up @@ -92,7 +92,7 @@ public void registerBeans(Class<?>...classes)
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);
Expand All @@ -108,7 +108,7 @@ public void registerBeans(Set<Class<?>> classes)
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)
Expand Down
@@ -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();

}
@@ -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();

}

0 comments on commit 115c202

Please sign in to comment.