public class ProtonFactoryLoader<C extends ProtonFactory> extends Object
ServiceLoader
intended for loading Proton object factories.
If system property "qpid.proton.implementationtype" if set, loads a factory
whose ProtonFactory.ImplementationType
matches its value.Modifier and Type | Field and Description |
---|---|
static String |
IMPLEMENTATION_TYPE_PROPERTY |
Constructor and Description |
---|
ProtonFactoryLoader()
Use this constructor if you intend to explicitly provide factory interface later,
i.e.
|
ProtonFactoryLoader(Class<C> factoryInterface) |
ProtonFactoryLoader(Class<C> factoryInterface,
ProtonFactory.ImplementationType implementationType) |
Modifier and Type | Method and Description |
---|---|
C |
loadFactory()
Returns the Proton factory that implements the stored
_factoryInterface class. |
C |
loadFactory(Class<C> factoryInterface) |
public static final String IMPLEMENTATION_TYPE_PROPERTY
public ProtonFactoryLoader()
loadFactory(Class)
. This is useful if you want to use the same
ProtonFactoryLoader instance for loading multiple factory types.public ProtonFactoryLoader(Class<C> factoryInterface, ProtonFactory.ImplementationType implementationType)
factoryInterface
- will be used as the factory interface class in calls to loadFactory()
.public C loadFactory()
_factoryInterface
class.Copyright © 2014 The Apache Software Foundation. All rights reserved.