Package com.barchart.feed.api.model.meta

Examples of com.barchart.feed.api.model.meta.Instrument


  // ########################

  @Override
  public void make(final Message message) {

    final Instrument instrument = message.getInstrument();

    if (!isValid(instrument)) {
      return;
    }

    MarketDo market = marketMap.get(instrument);

    if (!isValid(market)) {
      register(instrument);
      market = marketMap.get(instrument);

      log.debug("Registering new instrument " + instrument.symbol());
    }

    market.runSafe(safeMake, message);

  }
View Full Code Here


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

    final Instrument instrument = message.getInstrument();

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

    listenerList.remove(listener);
  }

  protected final void notifyRegListeners(final MarketDo market) {

    final Instrument inst = market.instrument();

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

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

    final CharSequence queryPage = query.type.queryPage;

    final CharSequence username = settings.getAuthUser();
    final CharSequence password = settings.getAuthPass();

    final Instrument instrument = query.instrument;
    final CharSequence symbol = formatHistorical(instrument.symbol())// TODO Need to modify symbol

    final DateTimeZone timeZone = DateTimeZone.forOffsetMillis(
        (int)instrument.timeZoneOffset());
    final CharSequence start = requestTime(query.timeStart, timeZone);
    final CharSequence end = requestTime(query.timeEnd, timeZone);

    final CharSequence maxRecords = query.maxRecords <= 0 ? "" : ""
        + query.maxRecords;
View Full Code Here

    if (instrument == null) {
      return Collections.emptyList();
    }

    Instrument inst = ObjectMapFactory.build(InstrumentDDF.class, instrument);
   
    return Collections.singletonList(inst);
   
  }
View Full Code Here

      assert index == entryCount;

    }

    final Instrument instrument = getInstrument();
    setExchange(DDF_Exchange.fromCode(instrument.exchangeCode().getBytes()[0]));

    final long millisUTC = xmlTimeDecode(getExchange().kind.time.zone, tag,
        TIME_LAST, XML_PASS);
    setDecodeDefaults(millisUTC);
View Full Code Here

    /** make an upper case id */
    final TextValue lookup = lookupFromSymbol(ValueBuilder.newText(symbol.toString()));

    final Map<Tag, Object> map = new HashMap<Tag, Object>();
    map.put(InstrumentField.MARKET_GUID, lookup);
    final Instrument instrument = ObjectMapFactory.build(InstrumentDDF.class, map);

    return Collections.singletonList(instrument);
  }
View Full Code Here

      assert index == entryCount;

    }

    final Instrument instrument = getInstrument();
   
    // FIXME This doesnt work, instrument uses the exchange() method to get it's exchange
    // so you can't call exchangeCode() on instrument before it's been set in the message;
    setExchange(DDF_Exchange.fromCode(instrument.exchangeCode().getBytes()[0]));

    final long millisUTC = xmlTimeDecode(getExchange().kind.time.zone, tag,
        TIME_LAST, XML_PASS);
    setDecodeDefaults(millisUTC);
View Full Code Here

    final String stringURL = urlQuery(settings, query);
    log.debug("stringURL : \n\t {}", stringURL);

    final Builder builder = Builder.from(query.type);

    final Instrument instrument = query.instrument;

    final E entryReference = (E) builder.newEntry(0, null, instrument);

    final Result<E> result = new Result<E>(query, entryReference, listener);
View Full Code Here

    final CharSequence queryPage = query.type.queryPage;

    final CharSequence username = settings.getAuthUser();
    final CharSequence password = settings.getAuthPass();

    final Instrument instrument = query.instrument;
    final CharSequence symbol = instrument.vendorSymbols().get(VendorID.BARCHART_HISTORICAL);

    final DateTimeZone timeZone = DateTimeZone.forID(instrument.timeZoneName());
    final CharSequence start = requestTime(query.timeStart, timeZone);
    final CharSequence end = requestTime(query.timeEnd, timeZone);

    final CharSequence maxRecords =
        query.maxRecords <= 0 ? "" : "" + query.maxRecords;
View Full Code Here

TOP

Related Classes of com.barchart.feed.api.model.meta.Instrument

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.