org.apache.qpid.proton
Class ProtonFactoryLoader<C>

java.lang.Object
  extended by org.apache.qpid.proton.ProtonFactoryLoader<C>

public class ProtonFactoryLoader<C>
extends Object

A thin wrapper around ServiceLoader intended for loading Proton object factories.


Constructor Summary
ProtonFactoryLoader()
          Use this constructor if you intend to explicitly provide factory interface later, i.e.
ProtonFactoryLoader(Class<C> factoryInterface)
           
 
Method Summary
 C loadFactory()
          Returns the Proton factory that implements the stored _factoryInterface class.
 C loadFactory(Class<C> factoryInterface)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProtonFactoryLoader

public ProtonFactoryLoader()
Use this constructor if you intend to explicitly provide factory interface later, i.e. by calling loadFactory(Class). This is useful if you want to use the same ProtonFactoryLoader instance for loading multiple factory types.


ProtonFactoryLoader

public ProtonFactoryLoader(Class<C> factoryInterface)
Parameters:
factoryInterface - will be used as the factory interface class in calls to loadFactory().
Method Detail

loadFactory

public C loadFactory()
Returns the Proton factory that implements the stored _factoryInterface class.


loadFactory

public C loadFactory(Class<C> factoryInterface)


Copyright © 2013 The Apache Software Foundation. All Rights Reserved.