org.marketcetera.ors.history
Class AsyncSaveReportHistoryServices

java.lang.Object
  extended by org.marketcetera.ors.history.BasicReportHistoryServices
      extended by org.marketcetera.ors.history.AsyncSaveReportHistoryServices
All Implemented Interfaces:
ReportHistoryServices

public class AsyncSaveReportHistoryServices
extends BasicReportHistoryServices

Provides services to save and query reports with asynchronous saving.

Since:
2.1.0
Version:
$Id: AsyncSaveReportHistoryServices.java 16154 2012-07-14 16:34:05Z colin $
Author:
tlerios@marketcetera.com

Nested Class Summary
 class AsyncSaveReportHistoryServices.QueueHandler
           
 
Constructor Summary
AsyncSaveReportHistoryServices()
           
 
Method Summary
 void init(IDFactory idFactory, JmsManager jmsManager, ReportSavedListener reportSavedListener)
          Initializes the receiver with the given system resources.
 void save(ReportBase report)
          Saves the supplied report to the database.
 
Methods inherited from class org.marketcetera.ors.history.BasicReportHistoryServices
assignID, getAllEquityPositionsAsOf, getAllFuturePositionsAsOf, getAllOptionPositionsAsOf, getEquityPositionAsOf, getFuturePositionAsOf, getJmsManager, getOptionPositionAsOf, getOptionPositionsAsOf, getPrincipals, getReportIDFactory, getReportSavedListener, getReportsSince, invokeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AsyncSaveReportHistoryServices

public AsyncSaveReportHistoryServices()
Method Detail

init

public void init(IDFactory idFactory,
                 JmsManager jmsManager,
                 ReportSavedListener reportSavedListener)
          throws ReportPersistenceException
Description copied from interface: ReportHistoryServices
Initializes the receiver with the given system resources.

Specified by:
init in interface ReportHistoryServices
Overrides:
init in class BasicReportHistoryServices
Parameters:
idFactory - The ID factory to be used for report ID generation.
jmsManager - The JMS manager used for asychronous persistence of reports. Null may be acceptable to certain implementations.
reportSavedListener - The listener notified after a report has been saved (successfully or not). It may be null if no notifications are needed.
Throws:
ReportPersistenceException - Thrown if initialization cannot complete.

save

public void save(ReportBase report)
          throws PersistenceException
Description copied from interface: ReportHistoryServices
Saves the supplied report to the database. Saving may be immediate or delayed; in either case the report ID is set before this method returns.

Specified by:
save in interface ReportHistoryServices
Overrides:
save in class BasicReportHistoryServices
Parameters:
report - the report to be saved. Cannot be null.
Throws:
PersistenceException - if there were errors saving the report.


Copyright © 2012. All Rights Reserved.