org.apache.aries.samples.ariestrader.core
Class TradeServicesManagerImpl

java.lang.Object
  extended by org.apache.aries.samples.ariestrader.core.TradeServicesManagerImpl
All Implemented Interfaces:
TradeServicesManager

public class TradeServicesManagerImpl
extends Object
implements TradeServicesManager

TradeServicesManagerImpl coordinates access to the currently selected TradeServices implementation and manages the list of currently available TradeServices implementations.

See Also:
org.apache.geronimo.samples.daytrader.api.TradeServicesManager

Constructor Summary
TradeServicesManagerImpl()
          TradeServicesManagerImpl null constructor
 
Method Summary
 void bindService(TradeServices tradeServices, Map props)
          Bind a new TradeServices implementation
 ArrayList<Integer> getCurrentModes()
          Get CurrentModes that are registered
 MarketSummaryDataBean getMarketSummary()
          Market Summary is inherently a heavy database operation.
 TradeServices getTradeServices()
          Get TradeServices reference
 void init()
          init
 void unbindService(TradeServices tradeServices, Map props)
          Unbind a TradeServices implementation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TradeServicesManagerImpl

public TradeServicesManagerImpl()
TradeServicesManagerImpl null constructor

Method Detail

init

public void init()
init


getCurrentModes

public ArrayList<Integer> getCurrentModes()
Get CurrentModes that are registered

Specified by:
getCurrentModes in interface TradeServicesManager

getTradeServices

public TradeServices getTradeServices()
Get TradeServices reference

Specified by:
getTradeServices in interface TradeServicesManager

bindService

public void bindService(TradeServices tradeServices,
                        Map props)
Bind a new TradeServices implementation


unbindService

public void unbindService(TradeServices tradeServices,
                          Map props)
Unbind a TradeServices implementation


getMarketSummary

public MarketSummaryDataBean getMarketSummary()
                                       throws Exception
Market Summary is inherently a heavy database operation. For servers that have a caching story this is a great place to cache data that is good for a period of time. In order to provide a flexible framework for this we allow the market summary operation to be invoked on every transaction, time delayed or never. This is configurable in the configuration panel.

Specified by:
getMarketSummary in interface TradeServicesManager
Returns:
An instance of the market summary
Throws:
Exception


Copyright © 2009-2012 The Apache Software Foundation. All Rights Reserved.