API Overview API Index Package Overview Direct link to this page
JDK 1.6
  javax.naming.spi. ObjectFactoryBuilder View Javadoc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58

/*
 * @(#)ObjectFactoryBuilder.java	1.11 05/11/17
 *
 * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
 * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 */

package javax.naming.spi;

import java.util.Hashtable;
import javax.naming.NamingException;

 /**
  * This interface represents a builder that creates object factories.
  *<p>
  * The JNDI framework allows for object implementations to
  * be loaded in dynamically via <em>object factories</em>.
  * For example, when looking up a printer bound in the name space,
  * if the print service binds printer names to References, the printer
  * Reference could be used to create a printer object, so that
  * the caller of lookup can directly operate on the printer object
  * after the lookup.  An ObjectFactory is responsible for creating
  * objects of a specific type.  JNDI uses a default policy for using
  * and loading object factories.  You can override this default policy
  * by calling <tt>NamingManager.setObjectFactoryBuilder()</tt> with an ObjectFactoryBuilder,
  * which contains the program-defined way of creating/loading
  * object factories.
  * Any <tt>ObjectFactoryBuilder</tt> implementation must implement this
  * interface that for creating object factories.
  *
  * @author Rosanna Lee
  * @author Scott Seligman
  * @version 1.11 05/11/17
  *
  * @see ObjectFactory
  * @see NamingManager#getObjectInstance
  * @see NamingManager#setObjectFactoryBuilder
  * @since 1.3
  */
public interface ObjectFactoryBuilder {
    /**
      * Creates a new object factory using the environment supplied.
      *<p>
      * The environment parameter is owned by the caller.
      * The implementation will not modify the object or keep a reference
      * to it, although it may keep a reference to a clone or copy.
      *
      * @param obj The possibly null object for which to create a factory.
      * @param environment Environment to use when creating the factory.
      *			Can be null.
      * @return A non-null new instance of an ObjectFactory.
      *	@exception NamingException If an object factory cannot be created.
      *
      */
    public ObjectFactory createObjectFactory(Object obj,
					     Hashtable<?,?> environment)
	throws NamingException;
}

Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar