MFClient  1.3.0
 All Classes Functions Variables Enumerations
MFMarketDataHandler.h
1 /*
2  * Copyright (C) 2015 MarketFactory, Inc. All rights reserved.
3  * Use in source and binary forms, with or without modification, is permitted
4  * provided that the following conditions are met:
5  * 1. You may only use this software for internal evaluation and testing
6  * purposes and may not use the software for engaging
7  * in live trades, unless and until you have entered into a separate agreement
8  * with MarketFactory governing the use of
9  * MarketFactory software in a production environment.
10  * 2. You may not distribute the software (in either source or binary forms) to
11  * third parties.
12  * 3. All copies of source code must retain the above copyright notice, this
13  * list of conditions and the following disclaimer.
14  * THIS SOFTWARE IS PROVIDED BY MARKETFACTORY AND ITS LICENSORS "AS IS" AND
15  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
16  * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
17  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
18  * NO EVENT SHALL MARKETFACTORY OR ITS LICENSORS BE LIABLE FOR ANY DIRECT,
19  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
22  * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
23  * LIABILITY, WHETHER IN CONTRACT, STRICT
24  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF
26  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27  */
28 #ifndef _MF_MFMARKETDATAHANDLER_H_
29 #define _MF_MFMARKETDATAHANDLER_H_
30 
31 #include <MFMarketDataSession.h>
32 
33 #include <mfmarketdata/LogonResponse.hpp>
34 #include <mfmarketdata/Logout.hpp>
35 #include <mfmarketdata/LogoutResponse.hpp>
36 #include <mfmarketdata/Heartbeat.hpp>
37 #include <mfmarketdata/SecurityDefinition.hpp>
38 #include <mfmarketdata/SecurityDefinition.hpp>
39 #include <mfmarketdata/SecurityStatus.hpp>
40 #include <mfmarketdata/MarketDataRequestReject.hpp>
41 #include <mfmarketdata/MarketDataIncrementalRefresh.hpp>
42 #include <mfmarketdata/MDEntry.hpp>
43 #include <mfmarketdata/BatchesCompleted.hpp>
44 
50  public:
55  virtual void onStart(MFMarketDataSession& session) = 0;
56 
61  virtual void onStop(MFMarketDataSession& session) = 0;
62 
66  virtual void onConnect(MFMarketDataSession& session) = 0;
67 
71  virtual void onDisconnect(const std::string& msg,
72  MFMarketDataSession& session) = 0;
73 
77  virtual void on(const mfmarketdata::LogonResponse& logonResponse,
78  MFMarketDataSession& session) = 0;
79 
84  virtual void on(const mfmarketdata::Logout& logout,
85  MFMarketDataSession& session) = 0;
86 
90  virtual void on(const mfmarketdata::LogoutResponse& logoutResponse,
91  MFMarketDataSession& session) = 0;
92 
96  virtual void on(const mfmarketdata::Heartbeat& heartbeat,
97  MFMarketDataSession& session) = 0;
98 
104  virtual void on(const mfmarketdata::SecurityDefinition& securityDefinition,
105  MFMarketDataSession& session) = 0;
106 
113  virtual void on(const mfmarketdata::SecurityStatus& securitySession,
114  MFMarketDataSession& session) = 0;
115 
122  virtual void on(
123  const mfmarketdata::MarketDataRequestReject& marketDataRequestReject,
124  MFMarketDataSession& session) = 0;
125 
129  virtual void on(
130  mfmarketdata::MarketDataIncrementalRefresh& marketDataIncrementalRefresh,
131  MFMarketDataSession& session) = 0;
132 
137  virtual void on(mfmarketdata::MDEntry& mdEntry,
138  MFMarketDataSession& session) = 0;
139 
143  virtual void on(mfmarketdata::BatchesCompleted& batchesComplete,
144  MFMarketDataSession& session) = 0;
145 };
146 
147 #endif
virtual void onDisconnect(const std::string &msg, MFMarketDataSession &session)=0
Called when the session socket disconnects.
Applications implement this interface in order to process marketdata messages from a MFMarketDataSess...
Definition: MFMarketDataHandler.h:49
virtual void onStop(MFMarketDataSession &session)=0
Called when the session is being removed from processing in the event loop.
virtual void onStart(MFMarketDataSession &session)=0
Called right before the handler becomes active in the MFClient::run() event loop. ...
virtual void on(const mfmarketdata::LogonResponse &logonResponse, MFMarketDataSession &session)=0
Called when a logon is successful.
A session used to interact with a single venue for market data.
Definition: MFMarketDataSession.h:60
virtual void onConnect(MFMarketDataSession &session)=0
Called when the session establishes a socket connection.