Package com.barchart.feed.base.instrument.values

Examples of com.barchart.feed.base.instrument.values.MarketInstrument


  }

  @Override
  public void setInstrument(final MarketInstrument newSymbol) {

    final MarketInstrument oldInst = get(INSTRUMENT);

    if (InstrumentConst.NULL_INSTRUMENT.equals(oldInst)) {
      set(INSTRUMENT, newSymbol);
    } else {
      throw new IllegalStateException("symbol can be set only once");
View Full Code Here


    case NORMAL:
      eventAdd(NEW_BOOK_UPDATE);
      break;
    default:
      eventAdd(NEW_BOOK_ERROR);
      final MarketInstrument inst = get(MarketField.INSTRUMENT);
      final TextValue id = inst.get(InstrumentField.ID);
      final TextValue comment = inst.get(InstrumentField.DESCRIPTION);
      log.error("instrument : {} : {}", id, comment);
      log.error("result : {} ; entry : {} ;", result, entry);
      return;
    }
View Full Code Here

    MarketBook book = get(BOOK);

    if (book.isFrozen()) {

      final MarketInstrument inst = get(INSTRUMENT);

      final MarketBookType type = inst.get(BOOK_TYPE);
      final SizeValue size = LIMIT;
      final PriceValue step = inst.get(PRICE_STEP);

      final VarBookDDF varBook = new VarBookDDF(type, size, step);
      final VarBookTopDDF varBookTop = new VarBookTopDDF(varBook);

      set(BOOK, varBook);
View Full Code Here

  }

  @Override
  public void setInstrument(final MarketInstrument newSymbol) {

    final MarketInstrument oldInst = get(INSTRUMENT);

    if (InstrumentConst.NULL_INSTRUMENT.equals(oldInst)) {
      set(INSTRUMENT, newSymbol);
    } else {
      throw new IllegalStateException("symbol can be set only once");
View Full Code Here

    case NORMAL:
      eventAdd(NEW_BOOK_UPDATE);
      break;
    default:
      eventAdd(NEW_BOOK_ERROR);
      final MarketInstrument inst = get(MarketField.INSTRUMENT);
      final TextValue id = inst.get(InstrumentField.ID);
      final TextValue comment = inst.get(InstrumentField.DESCRIPTION);
      log.error("instrument : {} : {}", id, comment);
      log.error("result : {} ; entry : {} ;", result, entry);
      return;
    }
View Full Code Here

    MarketBook book = get(BOOK);

    if (book.isFrozen()) {

      final MarketInstrument inst = get(INSTRUMENT);

      final MarketBookType type = inst.get(BOOK_TYPE);
      final SizeValue size = LIMIT;
      final PriceValue step = inst.get(PRICE_STEP);

      final VarBookDDF varBook = new VarBookDDF(type, size, step);
      final VarBookTopDDF varBookTop = new VarBookTopDDF(varBook);

      set(BOOK, varBook);
View Full Code Here

  private final RegTaker<Market> regOmniTaker = new RegTaker<Market>(omniTaker);
 
  @Override
  public final void make(final Message message) {

    final MarketInstrument instrument = message.getInstrument();
   
    if (!isValid(instrument)) {
      return;
    }
   
View Full Code Here

  // ########################
 
  @Override
  public void make(final Message message) {

    final MarketInstrument instrument = message.getInstrument();

    if (!isValid(instrument)) {
      return;
    }
View Full Code Here

    listenerList.remove(listener);
  }

  protected final void notifyRegListeners(final MarketDo market) {

    final MarketInstrument inst = market.get(MarketField.INSTRUMENT);

    final Set<MarketEvent> events = market.regEvents();

    for (final MarketRegListener listener : listenerList) {
      try {
View Full Code Here

    return taker;
  }

  final void fire(final RegCenter regCenter, final MarketEvent event) {

    final MarketInstrument inst = regCenter.cache(INSTRUMENT);

    final V value = regCenter.cache(field);

    taker.onMarketEvent(event, inst, value);
View Full Code Here

TOP

Related Classes of com.barchart.feed.base.instrument.values.MarketInstrument

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.