org.jacorb.naming

Class NamingContextImpl

Implemented Interfaces:
Configurable, java.io.Serializable, InvokeHandler, NamingContextExtOperations, NamingContextOperations

public class NamingContextImpl
extends NamingContextExtPOA
implements java.io.Serializable, Configurable

The implementation for the CORBAService Naming

Version:
$Id: NamingContextImpl.java,v 1.25 2004/05/06 12:39:59 nicolas Exp $

Author:
Gerald Brose

See Also:
Serialized Form

Method Summary

void
bind(NameComponent nc, Object obj)
bind a name (an array of name components) to an object
void
bind_context(NameComponent nc, NamingContext obj)
Bind a context to a name
NamingContext
bind_new_context(NameComponent nc)
void
configure(Configuration myConfiguration)
POA
default_POA()
POA-related,
void
destroy()
int
how_many()
static void
init(ORB orb, POA rootPoa)
This method needs to be called once to initialize the static fields orb and rootPoa.
void
list(int how_many, BindingListHolder bl, BindingIteratorHolder bi)
list all bindings
NamingContext
new_context()
void
rebind(NameComponent nc, Object obj)
Bind an object to a name that's already in use, i.e. rebind the name
void
rebind_context(NameComponent nc, NamingContext obj)
Bind an context to a name that's already in use, i.e. rebind the name
Object
resolve(NameComponent nc)
resolve a name
Object
resolve_str(String n)
NameComponent[]
to_name(String sn)
convert a string into name
String
to_string(NameComponent n)
convert a name into its string representation
String
to_url(String addr, String sn)
void
unbind(NameComponent nc)
unbind a name

Methods inherited from class org.omg.CosNaming.NamingContextExtPOA

_all_interfaces, _invoke, _this, _this

Methods inherited from class org.omg.PortableServer.Servant

_all_interfaces, _default_POA, _get_delegate, _get_interface, _get_interface_def, _is_a, _non_existent, _object_id, _orb, _poa, _set_delegate, _this_object, _this_object

Method Details

bind

public void bind(NameComponent nc,
                 Object obj)
            throws NotFound,
                   CannotProceed,
                   InvalidName,
                   AlreadyBound
bind a name (an array of name components) to an object


bind_context

public void bind_context(NameComponent nc,
                         NamingContext obj)
            throws NotFound,
                   CannotProceed,
                   InvalidName,
                   AlreadyBound
Bind a context to a name


bind_new_context

public NamingContext bind_new_context(NameComponent nc)
            throws NotFound,
                   CannotProceed,
                   InvalidName,
                   AlreadyBound


configure

public void configure(Configuration myConfiguration)
            throws ConfigurationException


default_POA

public POA default_POA()
POA-related,


destroy

public void destroy()
            throws NotEmpty
Specified by:
destroy in interface NamingContextOperations


how_many

public int how_many()

Returns:
numer of bindings in this context


init

public static void init(ORB orb,
                        POA rootPoa)
This method needs to be called once to initialize the static fields orb and rootPoa.


list

public void list(int how_many,
                 BindingListHolder bl,
                 BindingIteratorHolder bi)
list all bindings
Specified by:
list in interface NamingContextOperations


new_context

public NamingContext new_context()
Specified by:
new_context in interface NamingContextOperations


rebind

public void rebind(NameComponent nc,
                   Object obj)
            throws NotFound,
                   CannotProceed,
                   InvalidName
Bind an object to a name that's already in use, i.e. rebind the name


rebind_context

public void rebind_context(NameComponent nc,
                           NamingContext obj)
            throws NotFound,
                   CannotProceed,
                   InvalidName
Bind an context to a name that's already in use, i.e. rebind the name


resolve

public Object resolve(NameComponent nc)
            throws NotFound,
                   CannotProceed,
                   InvalidName
resolve a name


resolve_str

public Object resolve_str(String n)
            throws NotFound,
                   CannotProceed,
                   InvalidName


to_name

public NameComponent[] to_name(String sn)
            throws InvalidName
convert a string into name

Throws:
InvalidName -


to_string

public String to_string(NameComponent n)
            throws InvalidName
convert a name into its string representation


to_url

public String to_url(String addr,
                     String sn)
            throws InvalidAddress,
                   InvalidName


unbind

public void unbind(NameComponent nc)
            throws NotFound,
                   CannotProceed,
                   InvalidName
unbind a name