[jboss-cvs] JBossAS SVN: r57122 - branches/JBoss_4_0_3_SP1_JBAS-3689/naming/src/main/org/jnp/server

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sun Sep 24 22:27:44 EDT 2006


Author: scott.stark at jboss.org
Date: 2006-09-24 22:27:43 -0400 (Sun, 24 Sep 2006)
New Revision: 57122

Added:
   branches/JBoss_4_0_3_SP1_JBAS-3689/naming/src/main/org/jnp/server/NamingServerWrapper.java
Log:
JBAS3689, A delegating wrapper that can be used to create a unique rmi server endpoint that shares the an underlying Naming server implementation.

Added: branches/JBoss_4_0_3_SP1_JBAS-3689/naming/src/main/org/jnp/server/NamingServerWrapper.java
===================================================================
--- branches/JBoss_4_0_3_SP1_JBAS-3689/naming/src/main/org/jnp/server/NamingServerWrapper.java	2006-09-24 20:45:33 UTC (rev 57121)
+++ branches/JBoss_4_0_3_SP1_JBAS-3689/naming/src/main/org/jnp/server/NamingServerWrapper.java	2006-09-25 02:27:43 UTC (rev 57122)
@@ -0,0 +1,63 @@
+package org.jnp.server;
+
+import java.rmi.RemoteException;
+import java.util.Collection;
+
+import javax.naming.Context;
+import javax.naming.Name;
+import javax.naming.NamingException;
+
+import org.jnp.interfaces.Naming;
+
+/**
+ * A delegating wrapper that can be used to create a unique rmi server endpoint that shares
+ * the an underlying Naming server implementation.
+ * 
+ * @author Scott.Stark at jboss.org
+ * @version $Revision:$
+ */
+public class NamingServerWrapper
+   implements Naming
+{
+   Naming delegate;
+   NamingServerWrapper(Naming delegate)
+   {
+      this.delegate = delegate;
+   }
+
+   public void bind(Name name, Object obj, String className)
+      throws NamingException, RemoteException
+   {
+      delegate.bind(name, obj, className);
+   }
+   public Context createSubcontext(Name name)
+      throws NamingException, RemoteException
+   {
+      return delegate.createSubcontext(name);
+   }
+   public Collection list(Name name)
+      throws NamingException, RemoteException
+   {
+      return delegate.list(name);
+   }
+   public Collection listBindings(Name name)
+      throws NamingException, RemoteException
+   {
+      return delegate.listBindings(name);
+   }
+   public Object lookup(Name name)
+      throws NamingException, RemoteException
+   {
+      return delegate.lookup(name);
+   }
+   public void rebind(Name name, Object obj, String className)
+      throws NamingException, RemoteException
+   {
+      delegate.rebind(name, obj, className);
+   }
+   public void unbind(Name name)
+      throws NamingException, RemoteException
+   {
+      delegate.unbind(name);
+   }
+}




More information about the jboss-cvs-commits mailing list