Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 1 (11.1.1.7.0)

E10653-08

oracle.adf.model.connection.url
Class URLConnectionFactory

java.lang.Object
  extended by oracle.adf.model.connection.url.URLConnectionFactory
All Implemented Interfaces:
javax.naming.spi.ObjectFactory

public class URLConnectionFactory
extends java.lang.Object
implements javax.naming.spi.ObjectFactory

The URLConnectionFactory manufactures URLConnection for a client.

The Connection Architecture instantiates this factory when a connection lookup is made. The Connection Architecture stores the Reference instances which represent details for a connection such as the connection class, the factory that can create the connection, metadata information etc. When a look up is made the Connection Architecture instantiates this factory and calls the getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable environment) to create an instance of the URLConnection.

Every connection type has a ConnectionPool of active connections at point of time in the system. The URLConnectionFactory is pool aware, when a request to create a new instance of the connection is received, the URLConnectionFactory contacts the pool to see if a URLConnection instance corresponding to the Reference instance is already available. If the connection is available, then the recycled instance of the connection is returned, else the factory proceeds to create a new URLConnection instance and that is registered with the pool.

Since:
10.1.3
See Also:
ConnectionPool., ObjectFactory

Constructor Summary
URLConnectionFactory()
          Instantiate this URLConnection factory
 
Method Summary
 java.lang.Object getObjectInstance(java.lang.Object obj, javax.naming.Name name, javax.naming.Context nameCtx, java.util.Hashtable environment)
          Creates an instance of URLConnection 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
 

Constructor Detail

URLConnectionFactory

public URLConnectionFactory()
Instantiate this URLConnection factory

Method Detail

getObjectInstance

public java.lang.Object getObjectInstance(java.lang.Object obj,
                                          javax.naming.Name name,
                                          javax.naming.Context nameCtx,
                                          java.util.Hashtable environment)
                                   throws java.lang.Exception
Creates an instance of URLConnection using the location or reference information specified. Special requirements of this URLConnection are supplied using environment. An example of such an environment property is user identity information.

Specified by:
getObjectInstance in interface javax.naming.spi.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:
The URLConnection created; null if an object cannot be created.
Throws:
{@link - Exception} if an error was encountered while attempting to create the URLConnection
java.lang.Exception

Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 1 (11.1.1.7.0)

E10653-08

Copyright © 1997, 2013, Oracle. All rights reserved.