001 /**
002 * Copyright 2007 Mike Kroutikov.
003 *
004 * This program is free software; you can redistribute it and/or modify
005 * it under the terms of the Lesser GNU General Public License as
006 * published by the Free Software Foundation; either version 3 of
007 * the License, or (at your option) any later version.
008 *
009 * This program is distributed in the hope that it will be useful,
010 * but WITHOUT ANY WARRANTY; without even the implied warranty of
011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
012 * Lesser GNU General Public License for more details.
013 *
014 * You should have received a copy of the Lesser GNU General Public License
015 * along with this program. If not, see <http://www.gnu.org/licenses/>.
016 */
017
018 package org.otfeed.protocol.request;
019
020 import org.otfeed.command.VolumeStyleEnum;
021 import org.otfeed.event.ICompletionDelegate;
022 import org.otfeed.event.IDataDelegate;
023 import org.otfeed.event.OTBBO;
024 import org.otfeed.event.OTMMQuote;
025 import org.otfeed.event.OTQuote;
026 import org.otfeed.event.OTTrade;
027 import org.otfeed.protocol.CommandEnum;
028
029 /**
030 * Request to receive real-time quotes (ticks).
031 */
032 public class TickStreamExRequest extends AbstractTickStreamRequest {
033
034 public TickStreamExRequest(int requestId,
035 String exchangeCode,
036 String symbolCode,
037 VolumeStyleEnum volumeStyle,
038 IDataDelegate<OTQuote> quoteDelegate,
039 IDataDelegate<OTTrade> tradeDelegate,
040 IDataDelegate<OTMMQuote> mmQuoteDelegate,
041 IDataDelegate<OTBBO> bboDelegate,
042 ICompletionDelegate completionDelegate) {
043
044 super(CommandEnum.REQUEST_TICK_STREAM_EX,
045 requestId,
046 exchangeCode,
047 symbolCode,
048 volumeStyle,
049 quoteDelegate,
050 tradeDelegate,
051 mmQuoteDelegate,
052 bboDelegate,
053 completionDelegate
054 );
055 }
056
057 @Override
058 public final CommandEnum getCancelCommand() {
059 return CommandEnum.CANCEL_TICK_STREAM;
060 }
061 }