com.epam.cmemdp.adaptor
Class CMEChannel

java.lang.Object
  extended by com.epam.cmemdp.adaptor.CMEChannel
All Implemented Interfaces:
Channel

public class CMEChannel
extends java.lang.Object
implements Channel

CME implementation of FAST Channel API


Constructor Summary
CMEChannel(CMEApplicationParam applicationParams)
           
CMEChannel(CMEApplicationParam applicationParams, FastChannelReader reader)
           
 
Method Summary
protected  boolean doNaturalRefresh(java.lang.String secDesc, long secID, java.util.List<FIXFieldList> groupEntries)
           
 void findInstrumentBySecID(java.lang.String secId, SecurityDefinitionListener securityListener)
          Finds instrument in channel.
 void findInstrumentBySymbol(java.lang.String symbol, SecurityDefinitionListener securityListener)
          Finds instrument in channel.
 void findInstruments(SecurityDefinitionListener securityListener)
          Finds all instrument in channel.
 void setErrorListener(ErrorListener errorListener)
          Sets error listener.
 void setInstrumentListener(InstrumentListener instrumentListener)
          Sets instrument listener.
 void setMessageListener(MessageListener messageListener)
          Sets message listener.
 void stop()
          Stop channel and close opened connections.
 void stopFindInstrumentBySecID(java.lang.String secId, SecurityDefinitionListener securityListener)
           
 void stopFindInstrumentBySymbol(java.lang.String symbol, SecurityDefinitionListener securityListener)
           
 void stopFindInstruments(SecurityDefinitionListener securityListener)
           
 void subscribeAll()
          Subscribe for all instruments.
 boolean subscribeChannel(java.lang.String channelID)
          Subscribe to instruments on channel.
 void subscribeSecGroup(java.lang.String secGroup)
          Subscribe to instrument.
 void subscribeSecId(java.lang.String secId)
          Subscribe to instrument.
 void subscribeSymbol(java.lang.String symbol)
          Subscribe to instrument.
 void unSubscribeAll()
          UnSubscribe from instruments.
 void unSubscribeChannel(java.lang.String channelID)
          Unsubscribe from instruments on channel.
 void unSubscribeSecGroup(java.lang.String secGroup)
          UnSubscribe to instrument.
 void unSubscribeSecId(java.lang.String secId)
          UnSubscribe to instrument.
 void unSubscribeSymbol(java.lang.String symbol)
          UnSubscribe from instrument.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CMEChannel

public CMEChannel(CMEApplicationParam applicationParams)

CMEChannel

public CMEChannel(CMEApplicationParam applicationParams,
                  FastChannelReader reader)
Method Detail

setInstrumentListener

public void setInstrumentListener(InstrumentListener instrumentListener)
Description copied from interface: Channel
Sets instrument listener.

Specified by:
setInstrumentListener in interface Channel
Parameters:
instrumentListener - the instrument listener

setMessageListener

public void setMessageListener(MessageListener messageListener)
Description copied from interface: Channel
Sets message listener.

Specified by:
setMessageListener in interface Channel
Parameters:
messageListener - the message listener

setErrorListener

public void setErrorListener(ErrorListener errorListener)
Description copied from interface: Channel
Sets error listener.

Specified by:
setErrorListener in interface Channel
Parameters:
errorListener - the error listener

findInstruments

public void findInstruments(SecurityDefinitionListener securityListener)
                     throws java.io.IOException
Description copied from interface: Channel
Finds all instrument in channel.

Specified by:
findInstruments in interface Channel
Parameters:
securityListener - the callback listener.
Throws:
java.io.IOException - - if error occurred

stopFindInstruments

public void stopFindInstruments(SecurityDefinitionListener securityListener)
                         throws java.io.IOException
Throws:
java.io.IOException

findInstrumentBySymbol

public void findInstrumentBySymbol(java.lang.String symbol,
                                   SecurityDefinitionListener securityListener)
                            throws java.io.IOException
Description copied from interface: Channel
Finds instrument in channel.

Specified by:
findInstrumentBySymbol in interface Channel
Parameters:
symbol - the symbol
securityListener - the listener
Throws:
java.io.IOException - - if error occurred

stopFindInstrumentBySymbol

public void stopFindInstrumentBySymbol(java.lang.String symbol,
                                       SecurityDefinitionListener securityListener)
                                throws java.io.IOException
Throws:
java.io.IOException

findInstrumentBySecID

public void findInstrumentBySecID(java.lang.String secId,
                                  SecurityDefinitionListener securityListener)
                           throws java.io.IOException
Description copied from interface: Channel
Finds instrument in channel.

Specified by:
findInstrumentBySecID in interface Channel
Parameters:
secId - the security Id
securityListener - the listener
Throws:
java.io.IOException - - if error occurred

stopFindInstrumentBySecID

public void stopFindInstrumentBySecID(java.lang.String secId,
                                      SecurityDefinitionListener securityListener)
                               throws java.io.IOException
Throws:
java.io.IOException

subscribeAll

public void subscribeAll()
                  throws java.io.IOException
Description copied from interface: Channel
Subscribe for all instruments.

Specified by:
subscribeAll in interface Channel
Throws:
java.io.IOException - - if error occurred

unSubscribeAll

public void unSubscribeAll()
                    throws java.io.IOException
Description copied from interface: Channel
UnSubscribe from instruments.

Specified by:
unSubscribeAll in interface Channel
Throws:
java.io.IOException - - if error occurred

subscribeSymbol

public void subscribeSymbol(java.lang.String symbol)
                     throws java.io.IOException
Description copied from interface: Channel
Subscribe to instrument.

Specified by:
subscribeSymbol in interface Channel
Parameters:
symbol - the symbol
Throws:
java.io.IOException - - if error occurred

unSubscribeSymbol

public void unSubscribeSymbol(java.lang.String symbol)
Description copied from interface: Channel
UnSubscribe from instrument.

Specified by:
unSubscribeSymbol in interface Channel
Parameters:
symbol - the symbol

subscribeSecId

public void subscribeSecId(java.lang.String secId)
                    throws java.io.IOException
Description copied from interface: Channel
Subscribe to instrument.

Specified by:
subscribeSecId in interface Channel
Parameters:
secId - the security ID
Throws:
java.io.IOException - - if error occurred

unSubscribeSecId

public void unSubscribeSecId(java.lang.String secId)
Description copied from interface: Channel
UnSubscribe to instrument.

Specified by:
unSubscribeSecId in interface Channel
Parameters:
secId - the security ID

subscribeChannel

public boolean subscribeChannel(java.lang.String channelID)
                         throws java.io.IOException
Description copied from interface: Channel
Subscribe to instruments on channel.

Specified by:
subscribeChannel in interface Channel
Parameters:
channelID - unique id of channel
Throws:
java.io.IOException - - if error occurred

unSubscribeChannel

public void unSubscribeChannel(java.lang.String channelID)
                        throws java.io.IOException
Description copied from interface: Channel
Unsubscribe from instruments on channel.

Specified by:
unSubscribeChannel in interface Channel
Parameters:
channelID - unique id of channel
Throws:
java.io.IOException - - if error occurred

subscribeSecGroup

public void subscribeSecGroup(java.lang.String secGroup)
                       throws java.io.IOException
Description copied from interface: Channel
Subscribe to instrument.

Specified by:
subscribeSecGroup in interface Channel
Parameters:
secGroup - the security group
Throws:
java.io.IOException - - if error occurred

unSubscribeSecGroup

public void unSubscribeSecGroup(java.lang.String secGroup)
Description copied from interface: Channel
UnSubscribe to instrument.

Specified by:
unSubscribeSecGroup in interface Channel
Parameters:
secGroup - the security group

doNaturalRefresh

protected boolean doNaturalRefresh(java.lang.String secDesc,
                                   long secID,
                                   java.util.List<FIXFieldList> groupEntries)

stop

public void stop()
Description copied from interface: Channel
Stop channel and close opened connections.

Specified by:
stop in interface Channel


Copyright © 2000-2014 EPAM Systems. All Rights Reserved.