org.jnp.server
Class NamingServerWrapper

java.lang.Object
  extended by org.jnp.server.NamingServerWrapper
All Implemented Interfaces:
Remote, Naming, NamingEvents

public class NamingServerWrapper
extends Object
implements Naming, NamingEvents

A delegating wrapper that can be used to create a unique rmi server endpoint that shares the an underlying Naming server implementation.

Version:
$Revision:$
Author:
Scott.Stark@jboss.org

Method Summary
 void addNamingListener(EventContext context, Name target, int scope, NamingListener l)
          Adds a listener for receiving naming events fired when the object(s) identified by a target and scope changes.
 void bind(Name name, Object obj, String className)
           
 Context createSubcontext(Name name)
           
 Collection list(Name name)
           
 Collection listBindings(Name name)
           
 Object lookup(Name name)
           
 void rebind(Name name, Object obj, String className)
           
 void removeNamingListener(NamingListener l)
          Removes a listener from receiving naming events
 boolean targetMustExist()
          Determines whether a listener can register interest in a target that does not exist.
 void unbind(Name name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

bind

public void bind(Name name,
                 Object obj,
                 String className)
          throws NamingException,
                 RemoteException
Specified by:
bind in interface Naming
Throws:
NamingException
RemoteException

createSubcontext

public Context createSubcontext(Name name)
                         throws NamingException,
                                RemoteException
Specified by:
createSubcontext in interface Naming
Throws:
NamingException
RemoteException

list

public Collection list(Name name)
                throws NamingException,
                       RemoteException
Specified by:
list in interface Naming
Throws:
NamingException
RemoteException

listBindings

public Collection listBindings(Name name)
                        throws NamingException,
                               RemoteException
Specified by:
listBindings in interface Naming
Throws:
NamingException
RemoteException

lookup

public Object lookup(Name name)
              throws NamingException,
                     RemoteException
Specified by:
lookup in interface Naming
Throws:
NamingException
RemoteException

rebind

public void rebind(Name name,
                   Object obj,
                   String className)
            throws NamingException,
                   RemoteException
Specified by:
rebind in interface Naming
Throws:
NamingException
RemoteException

unbind

public void unbind(Name name)
            throws NamingException,
                   RemoteException
Specified by:
unbind in interface Naming
Throws:
NamingException
RemoteException

addNamingListener

public void addNamingListener(EventContext context,
                              Name target,
                              int scope,
                              NamingListener l)
                       throws NamingException,
                              RemoteException
Description copied from interface: NamingEvents
Adds a listener for receiving naming events fired when the object(s) identified by a target and scope changes.

Specified by:
addNamingListener in interface NamingEvents
Parameters:
context - - the non-null EventContext the listener is registering with
target - A non-null name to be resolved relative to this context.
scope - One of OBJECT_SCOPE, ONELEVEL_SCOPE, or SUBTREE_SCOPE.
l - The non-null listener.
Throws:
NamingException - If a problem was encountered while adding the listener.
RemoteException
See Also:
NamingEvents.removeNamingListener(javax.naming.event.NamingListener)

removeNamingListener

public void removeNamingListener(NamingListener l)
                          throws NamingException,
                                 RemoteException
Description copied from interface: NamingEvents
Removes a listener from receiving naming events

Specified by:
removeNamingListener in interface NamingEvents
Parameters:
l - non-null listener.
Throws:
NamingException - If a problem was encountered while removing the listener.
RemoteException
See Also:
NamingEvents.addNamingListener(javax.naming.event.EventContext, javax.naming.Name, int, javax.naming.event.NamingListener)

targetMustExist

public boolean targetMustExist()
                        throws NamingException,
                               RemoteException
Description copied from interface: NamingEvents
Determines whether a listener can register interest in a target that does not exist.

Specified by:
targetMustExist in interface NamingEvents
Returns:
true if the target must exist; false if the target need not exist.
Throws:
NamingException - If the context's behavior in this regard cannot be determined.
RemoteException


Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.