00001 // <copyright> 00002 // $Revision: 1.13 $ 00003 // 00004 // (c) B2BITS 2006. B2BITS is an abbreviation of 00005 // Business to Business Information Technology Services corporation. 00006 // "Licensor" shall mean B2BITS. 00007 // 00008 // This software is for the use of the paying client of B2BITS (which may be 00009 // a corporation, business area, business unit or single use subject to 00010 // licence terms) to whom it was delivered (the "Licensee")and no other party, 00011 // and any use beyond this business area is contrary to the terms of the licence grant. 00012 // 00013 // The Licensee acknowledges and agrees that the Software and Documentation 00014 // (the "Confidential Information") is confidential and proprietary to 00015 // the Licensor and the Licensee hereby agrees to use the Confidential 00016 // Information only as permitted by the full licence agreement betweeen 00017 // the two parties, to maintain the confidentiality of the Confidential 00018 // Information and not to disclose the confidential information, or any part 00019 // thereof, to any other person, firm or corporation. The Licensee 00020 // acknowledges that disclosure of the Confidential Information may give rise 00021 // to an irreparable injury to the Licensor in-adequately compensable in 00022 // damages. Accordingly the Licensor may seek (without the posting of any 00023 // bond or other security) injunctive relief against the breach of the forgoing 00024 // undertaking of confidentiality and non-disclosure, in addition to any other 00025 // legal remedies which may be available, and the licensee consents to the 00026 // obtaining of such injunctive relief. All of the undertakings and 00027 // obligations relating to confidentiality and non-disclosure, whether 00028 // contained in this section or elsewhere in this agreement, shall survive 00029 // the termination or expiration of this agreement for a period of five (5) 00030 // years. 00031 // 00032 // The Licensor agrees that any information or data received from the Licensee 00033 // in connection with the performance of the support agreement relating to this 00034 // software shall be confidential, will be used only in connection with the 00035 // performance of the Licensor's obligations hereunder, and will not be 00036 // disclosed to third parties, including contractors, without the Licensor's 00037 // express permission in writing. 00038 // 00039 // Information regarding the software may be provided to the Licensee's outside 00040 // auditors and attorneys only to the extent required by their respective 00041 // functions. 00042 // </copyright> 00043 00044 #ifndef B2BITS_GLOBEX_Application_h__ 00045 #define B2BITS_GLOBEX_Application_h__ 00046 00047 #include <vector> 00048 00049 #include <B2BITS_FIXMessage.h> 00050 #include <B2BITS_MDTypes.h> 00051 #include <B2BITS_V12_Defines.h> 00052 00053 namespace Globex { 00054 00055 class MDApplication; 00056 00058 class MDApplicationListener 00059 { 00060 public: 00062 virtual void onSubscribed( Symbol const& /*symbol*/ ) {} 00063 00065 virtual void onUnsubscribed( Symbol const& /*symbol*/ ) {} 00066 00068 virtual void process( Engine::FIXMessage const& /*msg*/ ) {} 00069 00071 virtual void onIncrement( Symbol const& symbol, Engine::TagValue const& entry ) = 0; 00072 00074 virtual void onSnapshot( Symbol const& symbol, Engine::FIXMessage const& msg ) = 0; 00075 00077 virtual void onSecurityDefinition( Symbol const& symbol, Engine::FIXMessage const& msg ) = 0; 00078 00079 virtual ~MDApplicationListener() {} 00080 }; 00081 00083 struct ChannelConnection 00084 { 00086 std::string channelID_; 00087 std::string connectionID_; 00088 }; 00089 00091 struct MDApplicationParams 00092 { 00093 MDApplicationParams() 00094 : numberOfWorkers_( 4 ) 00095 , incrementQueueSize_( 50 ) 00096 , checkUDPSender_( true ) 00097 , incomingUdpBufferSize_( 0 ) 00098 , applicationMessageQueueSize_( 65536 ) 00099 { 00100 } 00101 00104 std::string templatesFn_; 00105 00108 std::string configXml_; 00109 00112 size_t numberOfWorkers_; 00113 00116 size_t incrementQueueSize_; 00117 00120 bool checkUDPSender_; 00121 00124 std::string listenInterfaceIP_; 00125 00128 std::vector<ChannelConnection> activeConnections_; 00129 00132 size_t incomingUdpBufferSize_; 00133 00135 size_t applicationMessageQueueSize_; 00136 }; 00137 00139 class V12_API MDApplication 00140 { 00141 public: 00142 00143 public: 00144 virtual ~MDApplication(void) {} 00145 00148 virtual void stop() = 0; 00149 00151 virtual void join() = 0; 00152 00154 virtual void subscribe( Symbol const& symbol ) = 0; 00155 00157 virtual void unsubscribe( Symbol const& symbol ) = 0; 00158 00160 virtual void subscribeAll() = 0; 00161 00163 virtual void unsubscribeAll() = 0; 00164 00166 virtual void release() = 0; 00167 }; 00168 } 00169 00170 #endif // B2BITS_GLOBEX_Application_h__
1.5.6