KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > corba > se > spi > ior > IdentifiableFactoryFinder


1 /*
2  * @(#)IdentifiableFactoryFinder.java 1.9 03/12/19
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package com.sun.corba.se.spi.ior;
9
10 import org.omg.CORBA_2_3.portable.InputStream JavaDoc ;
11
12 /** Interface used to manage a group of related IdentifiableFactory instances.
13  * Factories can be registered, and invoked through a create method, which
14  * must be implemented to handle the case of no registered factory
15  * appropriately.
16  * @author Ken Cavanaugh
17  */

18 public interface IdentifiableFactoryFinder
19 {
20     /** If there is a registered factory for id, use it to
21      * read an Identifiable from is. Otherwise create an
22      * appropriate generic container, or throw an error.
23      * The type of generic container, or error behavior is
24      * a property of the implementation.
25      */

26     Identifiable create(int id, InputStream JavaDoc is);
27
28     /** Register a factory for the given id.
29      */

30     void registerFactory( IdentifiableFactory factory ) ;
31 }
32
Popular Tags