org.ow2.jonas.lib.naming
Class URLFactory

java.lang.Object
  extended by org.ow2.jonas.lib.naming.URLFactory
All Implemented Interfaces:
ObjectFactory

public class URLFactory
extends Object
implements ObjectFactory

This class provides an implementation of a mail session factory for sending mail.

Author:
Florent Benoit

Field Summary
protected static String FACTORY_TYPE
          The Java type for which this factory knows how to create objects.
 
Constructor Summary
URLFactory()
           
 
Method Summary
 Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable<?,?> environment)
          Creates a java.net.URL object using the location or reference information specified.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FACTORY_TYPE

protected static final String FACTORY_TYPE
The Java type for which this factory knows how to create objects.

See Also:
Constant Field Values
Constructor Detail

URLFactory

public URLFactory()
Method Detail

getObjectInstance

public Object getObjectInstance(Object obj,
                                Name name,
                                Context nameCtx,
                                Hashtable<?,?> environment)
                         throws Exception
Creates a java.net.URL object using the location or reference information specified.

Specified by:
getObjectInstance in interface ObjectFactory
Parameters:
obj - the possibly null object containing location or reference information that can be used in creating an object.
name - the name of this object relative to nameCtx, or null if no name is specified.
nameCtx - the context relative to which the name parameter is specified, or null if name is relative to the default initial context.
environment - the possibly null environment that is used in creating the object.
Returns:
a newly created java.net.URL object with the specific configuration; null if an object cannot be created.
Throws:
Exception - if this object factory encountered an exception while attempting to create an object, and no other object factories are to be tried.


Copyright © 2010 OW2 Consortium. All Rights Reserved.