68 assert(state() == NetFeedState::Disconnected);
71 link_->release(*
this);
131 return expirationTime_;
143 expirationTime_ =
TimeSpan(0, 0, expirationTime, 0);
149 return receiveTimeout_;
155 receiveTimeout_ =
TimeSpan(0, 0, timeInterval, 0);
161 return AtomicState::read(state_);
167 assert(state() == NetFeedState::Disconnected);
169 listener_ = &listener;
182 assert(state() == NetFeedState::Disconnected);
186 consumer_ = &consumer;
192 assert(state() == NetFeedState::Disconnected);
232 link_->send(*
this, message, length, timeout);
236 typedef Atomic<NetFeedState::Enum> AtomicState;
virtual void release(const NetFeed &)=0
Releases the link used by the given feed.
void link(NetFeedLink &link)
Associates the given link with the feed.
NetFeedType::Enum type() const
Type of service (incremental, instrument, etc).
std::string NetFeedId
The feed identifier.
Enum
Defines possible states for the feeds.
NetFeedState::Enum state() const
Indicates current state.
Network feed connection attributes.
#define ONIXS_CMEMDH_NULLPTR
Enum
Feed types based on type of market data service.
void role(NetFeedRole::Enum role)
Assigns feed service role.
#define ONIXS_CMEMDH_EXPORTED_CLASS_DECL(typeName)
#define ONIXS_CMEMDH_LTWT
const TimeSpan & expirationTime() const
Life time for the feed.
const NetFeedId & id() const
Identifier associated with feed.
NetFeedConsumer * consumer() const
An instance of data consumer associated with the given feed if available.
NetFeed()
Initializes the instance.
NetFeedRole::Enum role() const
Role in a service (primary, secondary).
Base attributes of market data feed.
Represents time interval.
Collection of the events raised by the NetFeed at various stages of its lifetime. ...
Defines possible states for the feeds.
void sendMessage(const void *message, size_t length, UInt32 timeout)
Send the given message to the source from which the feed receives data and delivers to the associated...
#define ONIXS_CMEMDH_NAMESPACE_BEGIN
Enum
List of known feed roles.
NetFeedConnection & connection()
Connection attributes (overload for modifications).
#define ONIXS_CMEMDH_EXPORTED_STRUCT_DECL(typeName)
void receiveTimeout(UInt32 timeInterval)
Updates time interval between two packets transmitted.
#define ONIXS_CMEMDH_LTWT_EXPORTED
Abstraction of a link used by the NetFeed instances to cover transportation layer.
Represents an interface through which the Feed Engine pushes market data received for the feeds...
void id(const NetFeedId &id)
Assigns identifier.
const TimeSpan & receiveTimeout() const
Maximal time interval between two packets transmitted.
void consumer(NetFeedConsumer &consumer)
Binds the given consumer to the feed.
void expirationTime(UInt32 expirationTime)
Defines life time for the feed in seconds.
void listener(NetFeedListener &listener)
Binds the given listener to the feed.
const NetFeedConnection & connection() const
Connection attributes (read-only access).
void type(NetFeedType::Enum type)
Assigns feed service type.
#define ONIXS_CMEMDH_NAMESPACE_END