public abstract class AbstractChannel extends Object implements Channel
Modifier and Type | Class and Description |
---|---|
protected class |
AbstractChannel.AbstractInstrumentResolverAdaptor |
protected class |
AbstractChannel.InstrumentResolverAdaptor |
protected class |
AbstractChannel.MDSubscriptionInstrumentResolverAdaptor |
Modifier and Type | Field and Description |
---|---|
protected ChannelContext |
context |
protected MarketDataSyncManager |
dataSyncManager |
protected com.epam.bovespafast.impl.AbstractChannel.ErrorListenerWrapper |
errorListener |
protected com.epam.bovespafast.impl.AbstractChannel.InstrumentListenerWrapper |
instrumentListener |
protected InstrumentResolver |
instrumentResolver |
protected Log |
log |
protected MarketMessageSubscriber |
marketMessageSubscriber |
protected com.epam.bovespafast.impl.AbstractChannel.MessageListenerWrapper |
messageListener |
protected RecoveryManager |
recoveryManager |
protected StateProcessor |
stateProcessor |
protected TransportMessageSubscriber |
transportMessageSubscriber |
Modifier | Constructor and Description |
---|---|
protected |
AbstractChannel(MDChannel mdChannel,
RecoveryOptions recoveryOptions,
FASTChannelFactory channelFactory,
InstrumentStorageFactory instrumentStorageFactory) |
|
AbstractChannel(MDChannel mdChannel,
RecoveryOptions recoveryOptions,
FASTChannelFactory channelFactory,
InstrumentStorageFactory instrumentStorageFactory,
String interfaceName) |
protected |
AbstractChannel(MDChannel mdChannel,
RecoveryOptions recoveryOptions,
InputStream templateStream) |
|
AbstractChannel(MDChannel mdChannel,
RecoveryOptions recoveryOptions,
InputStream templateInputStream,
String interfaceName) |
Modifier and Type | Method and Description |
---|---|
void |
findInstrumentBySecID(String secId,
SecurityDefinitionListener securityDefinitionListener)
Finds instrument in channel.
|
void |
findInstrumentBySymbol(String symbol,
SecurityDefinitionListener securityListener)
Finds instrument in channel.
|
void |
findInstruments(SecurityDefinitionListener securityDefinitionListener)
Finds all instrument in channel.
|
MarketDataSyncManager |
getDataSyncManager() |
ErrorListener |
getErrorListener() |
InstrumentListener |
getInstrumentListener() |
int |
getMaxCircleCount() |
MessageListener |
getMessageListener() |
RecoveryManager |
getRecoveryManager() |
com.epam.fast.full.coders.stream.SeqNumHelper |
getSecNumHelper() |
StateProcessor |
getStateProcessor() |
TemplateContainer |
getTemplateContainer() |
protected TransportFactory |
getTransportFactory(MDChannel mdChannel,
FASTChannelFactory channelFactory,
String interfaceName) |
TransportMessageSubscriber |
getTransportMessageSubscriber() |
protected void |
resetInstruments()
Clear all known instruments
|
void |
setErrorListener(ErrorListener errorListener)
Sets error listener.
|
void |
setInstrumentListener(InstrumentListener instrumentListener)
Sets instrument listener.
|
void |
setMessageListener(MessageListener messageListener)
Sets message listener.
|
void |
stop()
Remove all subscription and close all opened connections.
|
void |
subscribeAll()
Subscribe for all instruments.
|
boolean |
subscribeChannel(String channelID)
Subscribe to instruments on channel.
|
void |
subscribeSecGroup(String secGroup)
Subscribe to instrument.
|
void |
subscribeSecId(String secId)
Subscribe to instrument.
|
void |
subscribeSymbol(String symbol)
Subscribe to instrument.
|
void |
unSubscribeAll()
UnSubscribe from instruments.
|
void |
unSubscribeChannel(String channelID)
Unsubscribe from instruments on channel.
|
void |
unSubscribeSecGroup(String secGroup)
UnSubscribe to instrument.
|
void |
unSubscribeSecId(String secId)
UnSubscribe to instrument.
|
void |
unSubscribeSymbol(String symbol)
UnSubscribe from instrument.
|
protected final Log log
protected ChannelContext context
protected RecoveryManager recoveryManager
protected InstrumentResolver instrumentResolver
protected StateProcessor stateProcessor
protected MarketDataSyncManager dataSyncManager
protected MarketMessageSubscriber marketMessageSubscriber
protected TransportMessageSubscriber transportMessageSubscriber
protected com.epam.bovespafast.impl.AbstractChannel.InstrumentListenerWrapper instrumentListener
protected com.epam.bovespafast.impl.AbstractChannel.MessageListenerWrapper messageListener
protected com.epam.bovespafast.impl.AbstractChannel.ErrorListenerWrapper errorListener
protected AbstractChannel(MDChannel mdChannel, RecoveryOptions recoveryOptions, InputStream templateStream)
protected AbstractChannel(MDChannel mdChannel, RecoveryOptions recoveryOptions, FASTChannelFactory channelFactory, InstrumentStorageFactory instrumentStorageFactory)
public AbstractChannel(MDChannel mdChannel, RecoveryOptions recoveryOptions, InputStream templateInputStream, String interfaceName)
public AbstractChannel(MDChannel mdChannel, RecoveryOptions recoveryOptions, FASTChannelFactory channelFactory, InstrumentStorageFactory instrumentStorageFactory, String interfaceName)
protected TransportFactory getTransportFactory(MDChannel mdChannel, FASTChannelFactory channelFactory, String interfaceName)
public StateProcessor getStateProcessor()
public TransportMessageSubscriber getTransportMessageSubscriber()
public void setInstrumentListener(InstrumentListener instrumentListener)
Channel
setInstrumentListener
in interface Channel
instrumentListener
- the instrument listenerpublic InstrumentListener getInstrumentListener()
public MessageListener getMessageListener()
public ErrorListener getErrorListener()
public void setMessageListener(MessageListener messageListener)
Channel
setMessageListener
in interface Channel
messageListener
- the message listenerpublic void setErrorListener(ErrorListener errorListener)
Channel
setErrorListener
in interface Channel
errorListener
- the error listenerpublic RecoveryManager getRecoveryManager()
public MarketDataSyncManager getDataSyncManager()
public void subscribeAll() throws IOException
Channel
subscribeAll
in interface Channel
IOException
- - if error occurredpublic void unSubscribeAll() throws IOException
Channel
unSubscribeAll
in interface Channel
IOException
- - if error occurredpublic void subscribeSymbol(String symbol) throws IOException
Channel
subscribeSymbol
in interface Channel
symbol
- the symbolIOException
- - if error occurredpublic void unSubscribeSymbol(String symbol)
Channel
unSubscribeSymbol
in interface Channel
symbol
- the symbolpublic void subscribeSecId(String secId) throws IOException
Channel
subscribeSecId
in interface Channel
secId
- the security IDIOException
- - if error occurredpublic void unSubscribeSecId(String secId)
Channel
unSubscribeSecId
in interface Channel
secId
- the security IDpublic void subscribeSecGroup(String secGroup) throws IOException
Channel
subscribeSecGroup
in interface Channel
secGroup
- the security groupIOException
- - if error occurredpublic void unSubscribeSecGroup(String secGroup)
Channel
unSubscribeSecGroup
in interface Channel
secGroup
- the security grouppublic void findInstruments(SecurityDefinitionListener securityDefinitionListener) throws IOException
Channel
findInstruments
in interface Channel
securityDefinitionListener
- the callback listener.IOException
- - if error occurredpublic void findInstrumentBySymbol(String symbol, SecurityDefinitionListener securityListener) throws IOException
Channel
findInstrumentBySymbol
in interface Channel
symbol
- the symbolsecurityListener
- the listenerIOException
- - if error occurredpublic void findInstrumentBySecID(String secId, SecurityDefinitionListener securityDefinitionListener) throws IOException
Channel
findInstrumentBySecID
in interface Channel
secId
- the security IdsecurityDefinitionListener
- the listenerIOException
- - if error occurredpublic boolean subscribeChannel(String channelID)
Channel
subscribeChannel
in interface Channel
channelID
- unique id of channelpublic void unSubscribeChannel(String channelID)
Channel
unSubscribeChannel
in interface Channel
channelID
- unique id of channelpublic void stop() throws IOException
stop
in interface Channel
IOException
- - if error occurredprotected void resetInstruments()
public TemplateContainer getTemplateContainer()
public com.epam.fast.full.coders.stream.SeqNumHelper getSecNumHelper()
public int getMaxCircleCount()
Copyright © 2000-2017 EPAM Systems. All Rights Reserved.