public class ApplicationImpl extends Object implements Application, FastChannelReaderListener
Modifier and Type | Field and Description |
---|---|
protected ApplicationListener |
applicationListener |
protected Map<String,List<Instrument>> |
channelInstruments |
protected static String |
DOUBLESUBSCRIBE |
protected List<Instrument> |
instruments |
protected Map<String,Instrument> |
instrumentsBySecDesc |
protected Map<Long,Instrument> |
instrumentsBySecID |
static int |
MAX_REVISION_DELTA |
static int |
MAX_UDP_MIX_DELTA |
Constructor and Description |
---|
ApplicationImpl(ApplicationParams params,
ApplicationListener applicationListener) |
ApplicationImpl(ApplicationParams params,
ApplicationListener applicationListener,
FastChannelReader reader) |
Modifier and Type | Method and Description |
---|---|
MDChannel |
findChannelByID(String channelID) |
ChannelContext |
getChannelContext(String channelID) |
List<MDChannel> |
getChannels() |
void |
onMessage(FIXFieldList message,
String channelID,
long firstSeqNumOfQueue34)
Invoked when fast channel received message.
|
void |
onMessage(String securityDesc,
long securityID,
FIXFieldList message,
MDChannel channel) |
void |
resolveInstrumentBySecID(long securityID,
SecurityDefinitionListener listener)
Subscribes to instrument replay by security ID
|
void |
resolveInstrumentBySecurityDescription(String securityDescription,
SecurityDefinitionListener listener)
Subscribes to instrument replay by security description
|
void |
resolveInstrumentBySecurityGroup(String securityGroup,
SecurityDefinitionListener listener)
Subscribes to instrument replay by security group
|
void |
resolveInstrumentBySymbol(String symbol,
SecurityDefinitionListener listener)
Subscribes to instrument replay by symbol
|
boolean |
resolveInstrumentsByChannelID(String channelID,
SecurityDefinitionListener listener)
Subscribes to instrument replay by channel ID
|
void |
riseOnRecoveryStopped(Instrument instrument,
RecoveryReason recoveryReason) |
void |
start()
Starts application.
|
void |
stop()
Stops application.
|
void |
stopChannelListener(String channelID,
SecurityDefinitionListener listener)
Unsubscribe from instrument replay by channel
|
void |
stopSecGroupListener(String securityGroup,
SecurityDefinitionListener listener)
Unsubscribe from instrument replay by security group
|
void |
stopSecIDListener(long securityID,
SecurityDefinitionListener listener)
Unsubscribe from instrument replay by security ID
|
void |
stopSecurityDescriptionListener(String securityDesc,
SecurityDefinitionListener listener)
Unsubscribe from instrument replay by security description
|
void |
stopSymbolListener(String symbol,
SecurityDefinitionListener listener)
Unsubscribe from instrument replay by String
|
void |
subscribe(String symbol,
InstrumentListener listener,
RecoveryOptions recovery) |
boolean |
subscribeAll(InstrumentListener listener,
RecoveryOptions recoveryOptions)
Subscribes to the market data for all instruments on market
|
void |
subscribeAll(RecoveryOptions recoveryOptions)
Deprecated.
|
boolean |
subscribeByChannelID(MDChannel channel,
InstrumentListener listener,
RecoveryOptions recoveryOptions) |
boolean |
subscribeByChannelID(String channelID,
InstrumentListener listener,
RecoveryOptions recoveryOptions)
Subscribes to market data for instrument by security ID and channel info
|
void |
subscribeBySecurityDesc(String secDesc,
InstrumentListener instrumentListener,
RecoveryOptions recoveryOptions)
Subscribes to market data for instrument by security description
|
void |
subscribeBySecurityID(long secID,
InstrumentListener listener,
RecoveryOptions recovery) |
boolean |
subscribeBySecurityID(long secID,
String secDesc,
String channelID,
InstrumentListener listener,
RecoveryOptions recoveryOptions)
Subscribes to market data for instrument by security ID and channel info
|
void |
unsubscribe(String symbol) |
void |
unsubscribeAll()
Unsubscribe from all instruments
|
void |
unsubscribeByChannelID(String channelID,
InstrumentListener listener)
Unsubscribes from market data on channel.
|
void |
unsubscribeBySecDesc(String securityDesc)
Unsubscribes from instrument by security description
|
void |
unsubscribeBySecurityID(long securityID)
Unsubscribes from instrument by security ID
|
public static final int MAX_UDP_MIX_DELTA
public static final int MAX_REVISION_DELTA
protected static final String DOUBLESUBSCRIBE
protected final List<Instrument> instruments
protected final Map<String,List<Instrument>> channelInstruments
protected final Map<Long,Instrument> instrumentsBySecID
protected final Map<String,Instrument> instrumentsBySecDesc
protected ApplicationListener applicationListener
public ApplicationImpl(ApplicationParams params, ApplicationListener applicationListener)
public ApplicationImpl(ApplicationParams params, ApplicationListener applicationListener, FastChannelReader reader)
public ChannelContext getChannelContext(String channelID)
public void start()
Application
start
in interface Application
public void subscribe(String symbol, InstrumentListener listener, RecoveryOptions recovery)
subscribe
in interface Application
public void unsubscribe(String symbol)
unsubscribe
in interface Application
public void subscribeBySecurityDesc(String secDesc, InstrumentListener instrumentListener, RecoveryOptions recoveryOptions)
Application
subscribeBySecurityDesc
in interface Application
public void unsubscribeBySecDesc(String securityDesc)
Application
unsubscribeBySecDesc
in interface Application
public void unsubscribeBySecurityID(long securityID)
Application
unsubscribeBySecurityID
in interface Application
public void subscribeBySecurityID(long secID, InstrumentListener listener, RecoveryOptions recovery)
public boolean subscribeBySecurityID(long secID, String secDesc, String channelID, InstrumentListener listener, RecoveryOptions recoveryOptions)
Application
subscribeBySecurityID
in interface Application
public boolean subscribeByChannelID(String channelID, InstrumentListener listener, RecoveryOptions recoveryOptions)
Application
subscribeByChannelID
in interface Application
public boolean subscribeByChannelID(MDChannel channel, InstrumentListener listener, RecoveryOptions recoveryOptions)
public void unsubscribeByChannelID(String channelID, InstrumentListener listener)
Application
unsubscribeByChannelID
in interface Application
Application.subscribeByChannelID(String, InstrumentListener, RecoveryOptions)
public void resolveInstrumentBySymbol(String symbol, SecurityDefinitionListener listener)
Application
resolveInstrumentBySymbol
in interface Application
public void resolveInstrumentBySecurityDescription(String securityDescription, SecurityDefinitionListener listener)
Application
resolveInstrumentBySecurityDescription
in interface Application
public void resolveInstrumentBySecID(long securityID, SecurityDefinitionListener listener)
Application
resolveInstrumentBySecID
in interface Application
public void resolveInstrumentBySecurityGroup(String securityGroup, SecurityDefinitionListener listener)
Application
resolveInstrumentBySecurityGroup
in interface Application
public boolean resolveInstrumentsByChannelID(String channelID, SecurityDefinitionListener listener)
Application
resolveInstrumentsByChannelID
in interface Application
public void stopSymbolListener(String symbol, SecurityDefinitionListener listener)
Application
stopSymbolListener
in interface Application
public void stopSecurityDescriptionListener(String securityDesc, SecurityDefinitionListener listener)
Application
stopSecurityDescriptionListener
in interface Application
public void stopSecIDListener(long securityID, SecurityDefinitionListener listener)
Application
stopSecIDListener
in interface Application
public void stopSecGroupListener(String securityGroup, SecurityDefinitionListener listener)
Application
stopSecGroupListener
in interface Application
public void stopChannelListener(String channelID, SecurityDefinitionListener listener)
Application
stopChannelListener
in interface Application
public boolean subscribeAll(InstrumentListener listener, RecoveryOptions recoveryOptions)
Application
subscribeAll
in interface Application
@Deprecated public void subscribeAll(RecoveryOptions recoveryOptions)
subscribeAll
in interface Application
public void unsubscribeAll()
Application
unsubscribeAll
in interface Application
public void onMessage(String securityDesc, long securityID, FIXFieldList message, MDChannel channel)
public void onMessage(FIXFieldList message, String channelID, long firstSeqNumOfQueue34)
FastChannelReaderListener
onMessage
in interface FastChannelReaderListener
message
- the messagechannelID
- the channel id witch received messagefirstSeqNumOfQueue34
- the first sequence in queuepublic void stop()
Application
stop
in interface Application
public void riseOnRecoveryStopped(Instrument instrument, RecoveryReason recoveryReason)
Copyright © 2000-2017 EPAM Systems. All Rights Reserved.