MFClient  1.3.0
 All Classes Functions Variables Enumerations
MFTradeDateRollOverHandler.h
1 /*
2  * Copyright (C) 2017 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_TRADEDATEROLLOVEHANDLER_H_
29 #define _MF_TRADEDATEROLLOVERHANDLER_H_
30 
31 #include <MFTradeDateRollOverSession.h>
32 
33 #include <mftradedaterollover/Logon.hpp>
34 #include <mftradedaterollover/LogonResponse.hpp>
35 #include <mftradedaterollover/Logout.hpp>
36 #include <mftradedaterollover/LogoutResponse.hpp>
37 #include <mftradedaterollover/Heartbeat.hpp>
38 #include <mftradedaterollover/TradeDateRequest.hpp>
39 #include <mftradedaterollover/TradeDateReport.hpp>
40 #include <mftradedaterollover/TradeDateType.hpp>
41 #include <mftradedaterollover/GroupSizeEncoding.hpp>
42 #include <mftradedaterollover/MessageHeader.hpp>
43 
49  public:
54  virtual void onStart(MFTradeDateRollOverSession& session) = 0;
55 
60  virtual void onStop(MFTradeDateRollOverSession& session) = 0;
61 
65  virtual void onConnect(MFTradeDateRollOverSession& session) = 0;
66 
70  virtual void onDisconnect(const std::string& msg,
71  MFTradeDateRollOverSession& session) = 0;
72 
76  virtual void on(const mftradedaterollover::LogonResponse& logonResponse,
77  MFTradeDateRollOverSession& session) = 0;
78 
83  virtual void on(const mftradedaterollover::Logout& logout,
84  MFTradeDateRollOverSession& session) = 0;
85 
89  virtual void on(const mftradedaterollover::LogoutResponse& logoutResponse,
90  MFTradeDateRollOverSession& session) = 0;
91 
95  virtual void on(const mftradedaterollover::Heartbeat& heartbeat,
96  MFTradeDateRollOverSession& session) = 0;
97 
101  virtual void on(mftradedaterollover::TradeDateReport& c,
102  MFTradeDateRollOverSession& session) = 0;
103 
104  };
105 
106 #endif
virtual void on(const mftradedaterollover::LogonResponse &logonResponse, MFTradeDateRollOverSession &session)=0
Called when a logon is successful.
virtual void onStart(MFTradeDateRollOverSession &session)=0
Called right before the handler becomes active in the MFClient::run() event loop. ...
virtual void onStop(MFTradeDateRollOverSession &session)=0
Called when the session is being removed from processing in the event loop.
Applications implement this interface in order to process events from a MFTradeRollOverDateSession ...
Definition: MFTradeDateRollOverHandler.h:48
virtual void onDisconnect(const std::string &msg, MFTradeDateRollOverSession &session)=0
Called when the session socket disconnects.
virtual void onConnect(MFTradeDateRollOverSession &session)=0
Called when the session establishes a socket connection.
A session with MarketFactory for trading with all the venues for which a user has access...
Definition: MFTradeDateRollOverSession.h:65