The BTT ElementFactory organizes the dependency between different
layers of the component according to the configuration. To instantiate the
ForeignExchangeImpl, the client application is required to maintain a reference
to the ElementFactory. To decouple with the implementation, the ForeignExchange
interface has to be used to keep the reference of the ForeignExchangeImpl
instance.
Following is an example:
ElementFactory factory = new UniversalElementFactory("jar:///foreignExchange.xml");
ForeignExchange fx = (ForeignExchange) factory.getElement("ForeignExchange");