Author: richard.opalka(a)jboss.com
Date: 2010-10-18 08:32:46 -0400 (Mon, 18 Oct 2010)
New Revision: 13146
Modified:
spi/trunk/src/main/java/org/jboss/wsf/spi/serviceref/ServiceRefBinder.java
spi/trunk/src/main/java/org/jboss/wsf/spi/serviceref/ServiceRefHandler.java
Log:
refactoring - adding new SPI methods
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/serviceref/ServiceRefBinder.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/serviceref/ServiceRefBinder.java 2010-10-18
10:07:13 UTC (rev 13145)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/serviceref/ServiceRefBinder.java 2010-10-18
12:32:46 UTC (rev 13146)
@@ -25,6 +25,7 @@
import javax.naming.Context;
import javax.naming.NamingException;
+import javax.naming.Referenceable;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
@@ -32,9 +33,15 @@
* Creates a ServiceReferenceable and binds it to JNDI.
*
* @author Heiko.Braun(a)jboss.com
- * Created: Jul 11, 2007
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
*/
public interface ServiceRefBinder
{
+ /**
+ * @deprecated use {@link #createReferenceable(UnifiedServiceRefMetaData,
ClassLoader)} instead
+ */
+ @Deprecated
void setupServiceRef(Context encCtx, String encName, AnnotatedElement anElement,
UnifiedServiceRefMetaData serviceRef, ClassLoader loader) throws NamingException;
+ Referenceable createReferenceable(final UnifiedServiceRefMetaData serviceRef,
+ final ClassLoader loader);
}
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/serviceref/ServiceRefHandler.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/serviceref/ServiceRefHandler.java 2010-10-18
10:07:13 UTC (rev 13145)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/serviceref/ServiceRefHandler.java 2010-10-18
12:32:46 UTC (rev 13146)
@@ -23,17 +23,36 @@
import javax.naming.Context;
import javax.naming.NamingException;
+import javax.naming.Referenceable;
import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
/**
- * An implementation of this interface handles all service-ref binding concerns
+ * An implementation of this interface handles all service-ref binding concerns.
*
* @author Thomas.Diesler(a)jboss.org
- * @since 05-May-2004
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
*/
public interface ServiceRefHandler
{
- enum Type {JAXRPC, JAXWS};
- void bindServiceRef(Context encCtx, String encName, UnifiedVirtualFile vfsRoot,
ClassLoader loader, ServiceRefMetaData sref) throws NamingException;
+ enum Type {
+ JAXRPC, JAXWS
+ };
+
+ /**
+ * @deprecated use {@link
#createReferenceable(org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData,
ClassLoader)} instead
+ */
+ @Deprecated
+ void bindServiceRef(Context encCtx, String encName, UnifiedVirtualFile vfsRoot,
ClassLoader loader,
+ ServiceRefMetaData sref) throws NamingException;
+
+ /**
+ * Creates JNDI referenceable representing this <b>serviceRef</b>.
+ *
+ * @param serviceRefUMDM service reference UMDM
+ * @param loader class loader
+ * @return JNDI referenceable
+ */
+ Referenceable createReferenceable(UnifiedServiceRefMetaData serviceRefUMDM,
ClassLoader loader);
}
Show replies by date