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. package com.sun.corba.se.spi.ior;
  8. import org.omg.CORBA_2_3.portable.InputStream ;
  9. /** Interface used to manage a group of related IdentifiableFactory instances.
  10. * Factories can be registered, and invoked through a create method, which
  11. * must be implemented to handle the case of no registered factory
  12. * appropriately.
  13. * @author Ken Cavanaugh
  14. */
  15. public interface IdentifiableFactoryFinder
  16. {
  17. /** If there is a registered factory for id, use it to
  18. * read an Identifiable from is. Otherwise create an
  19. * appropriate generic container, or throw an error.
  20. * The type of generic container, or error behavior is
  21. * a property of the implementation.
  22. */
  23. Identifiable create(int id, InputStream is);
  24. /** Register a factory for the given id.
  25. */
  26. void registerFactory( IdentifiableFactory factory ) ;
  27. }