OpenMAMA
MamdaOptionChainListener.h
Go to the documentation of this file.
1 /* $Id$
2  *
3  * OpenMAMA: The open middleware agnostic messaging API
4  * Copyright (C) 2011 NYSE Technologies, Inc.
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19  * 02110-1301 USA
20  */
21 
22 #ifndef MamdaOptionChainListenerH
23 #define MamdaOptionChainListenerH
24 
26 #include <mamda/MamdaMsgListener.h>
28 #include <mamda/MamdaFieldState.h>
29 
30 namespace Wombat
31 {
32 
33 class MamdaOptionChain;
34 class MamdaOptionChainHandler;
35 
42 class MAMDAOPTExpDLL MamdaOptionChainListener
43  : public MamdaMsgListener
45 {
46 public:
47 
54  MamdaOptionChainListener (const char* underlyingSymbol);
55 
63 
67  virtual ~MamdaOptionChainListener();
68 
83  void setManditoryFields (bool expireDate,
84  bool strikePrice,
85  bool putCall);
86 
94  void addHandler (MamdaOptionChainHandler* handler);
95 
101  MamdaOptionChain& getOptionChain ();
102 
103  const char* getSymbol () const;
104  const char* getPartId () const;
105 
109  void onMsg (MamdaSubscription* subscription,
110  const MamaMsg& msg,
111  short msgType);
112 
113  // Inherited from MamdaBasicRecap and MamdaBasicEvent
114  const MamaDateTime& getSrcTime () const;
115  const MamaDateTime& getActivityTime () const;
116  const MamaDateTime& getLineTime () const;
117  const MamaDateTime& getSendTime () const;
118  const MamaMsgQual& getMsgQual () const;
119  const MamaDateTime& getEventTime () const;
120  mama_seqnum_t getEventSeqNum () const;
121  MamdaOptionContract* getOptionContract () const;
122  char getOptionAction () const;
123 
124  MamdaFieldState getSymbolFieldState() const;
125  MamdaFieldState getPartIdFieldState() const;
126  MamdaFieldState getEventSeqNumFieldState() const;
127  MamdaFieldState getEventTimeFieldState() const;
128  MamdaFieldState getSrcTimeFieldState() const;
129  MamdaFieldState getActivityTimeFieldState() const;
130  MamdaFieldState getLineTimeFieldState() const;
131  MamdaFieldState getSendTimeFieldState() const;
132  MamdaFieldState getMsgQualFieldState() const;
133 
134 private:
135  struct MamdaOptionChainListenerImpl;
136  MamdaOptionChainListenerImpl& mImpl;
137 };
138 
139 
140 } // namespace
141 
142 #endif // MamdaOptionChainListenerH
Subclasses of this interface can be registered with the MamdaOptionChainListener in order to receive ...
Definition: MamdaOptionChainHandler.h:39
MamdaOptionSeriesUpdate is an interface that provides access to fields related to option series updat...
Definition: MamdaOptionSeriesUpdate.h:38
MamdaOrderImbalanceUpdate is an interface that provides access to order imbalance related fields...
Definition: MamdaAuctionFields.h:29
MamdaOptionChainListener is a class that specializes in handling and managing option chain updates...
Definition: MamdaOptionChainListener.h:42
MamdaOptionChain is a specialized class to represent market data option chains.
Definition: MamdaOptionChain.h:47
A MamdaSubscription is used to register interest in a particular symbol and source.
Definition: MamdaSubscription.h:54
MamdaFieldState
An enumeration representing field state.
Definition: MamdaFieldState.h:37
A class that represents a single option contract.
Definition: MamdaOptionContract.h:60
MamdaMsgListener defines an interface for handling MAMA messages for a MamdaSubscription.
Definition: MamdaMsgListener.h:38


© 2012 Linux Foundation