org.objectweb.jeremie.services.registry.jndi.jrmi
Class jrmiURLContextFactory

java.lang.Object
  extended by org.objectweb.jeremie.services.registry.jndi.jrmi.jrmiURLContextFactory
All Implemented Interfaces:
ObjectFactory

public class jrmiURLContextFactory
extends Object
implements ObjectFactory

Provides an implementation of a JNDI object factory for constructing Jeremie registry URL contexts.


Constructor Summary
jrmiURLContextFactory()
          Constructs a new jrmiURLContextFactory
 
Method Summary
 Object getObjectInstance(Object obj, Name name, Context ctx, Hashtable env)
          Creates a Jeremie registry URL context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

jrmiURLContextFactory

public jrmiURLContextFactory()
Constructs a new jrmiURLContextFactory

Method Detail

getObjectInstance

public Object getObjectInstance(Object obj,
                                Name name,
                                Context ctx,
                                Hashtable env)
                         throws Exception
Creates a Jeremie registry URL context.

It first creates a Jeremie registry URL context from the environment, which is returned if the object is null. If the object is a string, it looks up the string in the context. If the object is an array of strings, then it returns the first successful look?p of one of these strings in the context.

The input object must be either null, a string, or an array of strings.

Specified by:
getObjectInstance in interface ObjectFactory
Parameters:
obj - the URL object to be looked up;
name - ignored;
ctx - ignored;
env - a hashtable representing the environment.
Returns:
an object representing a Jeremie registry URL context.
Throws:
Exception