Package com.sun.corba.ee.impl.ior
Class IdentifiableFactoryFinderBase<E extends Identifiable>
- java.lang.Object
-
- com.sun.corba.ee.impl.ior.IdentifiableFactoryFinderBase<E>
-
- All Implemented Interfaces:
IdentifiableFactoryFinder<E>
- Direct Known Subclasses:
TaggedComponentFactoryFinderImpl
,TaggedProfileFactoryFinderImpl
,TaggedProfileTemplateFactoryFinderImpl
public abstract class IdentifiableFactoryFinderBase<E extends Identifiable> extends java.lang.Object implements IdentifiableFactoryFinder<E>
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<java.lang.Integer,IdentifiableFactory<E>>
map
private ORB
orb
protected static IORSystemException
wrapper
-
Constructor Summary
Constructors Modifier Constructor Description protected
IdentifiableFactoryFinderBase(ORB orb)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description E
create(int id, InputStream is)
If there is a registered factory for id, use it to read an Identifiable from is.protected IdentifiableFactory<E>
getFactory(int id)
abstract E
handleMissingFactory(int id, InputStream is)
void
registerFactory(IdentifiableFactory<E> factory)
Register a factory for the given id.
-
-
-
Field Detail
-
wrapper
protected static final IORSystemException wrapper
-
orb
private ORB orb
-
map
private java.util.Map<java.lang.Integer,IdentifiableFactory<E extends Identifiable>> map
-
-
Constructor Detail
-
IdentifiableFactoryFinderBase
protected IdentifiableFactoryFinderBase(ORB orb)
-
-
Method Detail
-
getFactory
protected IdentifiableFactory<E> getFactory(int id)
-
handleMissingFactory
public abstract E handleMissingFactory(int id, InputStream is)
-
create
public E create(int id, InputStream is)
Description copied from interface:IdentifiableFactoryFinder
If there is a registered factory for id, use it to read an Identifiable from is. Otherwise create an appropriate generic container, or throw an error. The type of generic container, or error behavior is a property of the implementation.- Specified by:
create
in interfaceIdentifiableFactoryFinder<E extends Identifiable>
- Parameters:
id
- id of registered factoryis
- stream to read from- Returns:
Identifiable
found
-
registerFactory
public void registerFactory(IdentifiableFactory<E> factory)
Description copied from interface:IdentifiableFactoryFinder
Register a factory for the given id.- Specified by:
registerFactory
in interfaceIdentifiableFactoryFinder<E extends Identifiable>
- Parameters:
factory
- factory to register
-
-