in mbp-only/src/main/java/com/epam/cme/mdp3/core/control/InstrumentMdHandler.java [54:103]
public void setSubscriptionFlags(final int subscriptionFlags) {
this.enabled = false;
this.subscriptionFlags = subscriptionFlags;
if (MdEventFlags.hasImpliedBook(subscriptionFlags) || MdEventFlags.hasImpliedTop(subscriptionFlags)/* ||
SubscriptionFlags.hasConsolidatedBook(subscriptionFlags) || SubscriptionFlags.hasConsolidatedTop(subscriptionFlags)*/) {
if (this.impliedBookHandler == null) {
this.impliedBookHandler = new ImpliedBookHandler(this.channelContext, securityId, subscriptionFlags);
} else {
this.impliedBookHandler.clear();
this.impliedBookHandler.setSubscriptionFlags(subscriptionFlags);
}
this.enabled = true;
} else {
this.impliedBookHandler = null;
}
if (MdEventFlags.hasBook(subscriptionFlags) || MdEventFlags.hasTop(subscriptionFlags) /*||
SubscriptionFlags.hasConsolidatedBook(subscriptionFlags) || SubscriptionFlags.hasConsolidatedTop(subscriptionFlags)*/) {
if (this.multipleDepthBookHandler == null) {
this.multipleDepthBookHandler = new MultipleDepthBookHandler(this.channelContext, securityId, subscriptionFlags, maxDepth);
} else {
this.multipleDepthBookHandler.clear();
this.multipleDepthBookHandler.setSubscriptionFlags(subscriptionFlags);
}
this.enabled = true;
} else {
this.multipleDepthBookHandler = null;
}
if (MdEventFlags.hasTradeSummary(subscriptionFlags)) {
if (this.tradeHandler == null) {
this.tradeHandler = new TradeHandler(this.channelContext, securityId, subscriptionFlags);
} else {
this.tradeHandler.clear();
this.tradeHandler.setSubscriptionFlags(subscriptionFlags);
}
this.enabled = true;
} else {
this.tradeHandler = null;
}
if (MdEventFlags.hasStatistics(subscriptionFlags)) {
if (this.statisticsHandler == null) {
this.statisticsHandler = new StatisticsHandler(this.channelContext, securityId, this.subscriptionFlags);
} else {
this.statisticsHandler.clear();
this.statisticsHandler.setSubscriptionFlags(subscriptionFlags);
}
this.enabled = true;
} else {
this.statisticsHandler = null;
}
}