Examples of Exchange


Examples of ch.ethz.inf.vs.californium.network.Exchange

   * before, this method returns the corresponding exchange. If this
   * KeyMID has not yet arrived, this methos returns null, indicating that
   * the message with the KeyMID is not a duplicate.
   */
  public Exchange findPrevious(KeyMID key, Exchange exchange) {
    Exchange previous = incommingMessages.putIfAbsent(key, exchange);
    return previous;
  }
View Full Code Here

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

      if(!(o instanceof Exchange)) {
        return false;
      }

      final Exchange that = (Exchange)o;

      return (desc.equals(that.description()) && id.equals(that.id()));

    }
View Full Code Here

Examples of com.opengamma.core.exchange.Exchange

              return id.getValue();
            }
          } else if (_exchangeSource != null) {
            ExternalId exchangeId = FinancialSecurityUtils.getExchange(security);
            if (exchangeId != null) {
              Exchange exchange = _exchangeSource.getSingle(exchangeId);
              if (exchange == null) {
                s_logger.info("No exchange could be found with ID {}", exchangeId);
                return NO_REGION;
              }
              if (exchange.getRegionIdBundle() == null) {
                s_logger.info("Exchange " + exchange.getName() + " region bundle was null");
                return NO_REGION;
              }
              Region highestLevelRegion = _regionSource.getHighestLevelRegion(exchange.getRegionIdBundle());
              if (s_specialCountriesRegions.contains(highestLevelRegion.getName())) {
                return highestLevelRegion.getName();
              } else {
                Set<UniqueId> parentRegionIds = highestLevelRegion.getParentRegionIds();
                s_logger.info("got " + highestLevelRegion + ", looking for parent");
View Full Code Here

Examples of com.opengamma.financial.timeseries.exchange.Exchange

    if (!BloombergDataUtils.isValidField(currencyCode)) {
      logMissingData("equity currency", name);
      return null;
    }
   
    final Exchange exchangeData = _exchangeDataProvider.getExchange(micExchangeCode);
    if (exchangeData == null) {
      logMissingData("equity exchange data (common stock)", name);
      return null;
    }
   
    UniqueId bbgUniqueId = BloombergSecurityProvider.createUniqueId(bbgUniqueIdString);
    Currency currency = Currency.of(currencyCode.toUpperCase());
    GICSCode gicsCode = gicsCodeString != null ? GICSCode.of(gicsCodeString) : null;
   
    EquitySecurity security = new EquitySecurity(exchangeData.getDescription(), exchangeData.getMic(), name, currency);
    security.setUniqueId(bbgUniqueId);
    security.setName(name);
    security.setShortName(ticker);
    if (gicsCode != null) {
      security.setGicsCode(gicsCode);
View Full Code Here

Examples of com.persistit.Exchange

        private boolean isExpanded() {
            return true;
        }

        private Row getNextRow(final boolean forward) throws PersistitException {
            final Exchange ex = setupExchange();
            final boolean expanded = (isExpanded());
            if (!ex.traverse(forward ? Key.GT : Key.LT, expanded)) {
                return null;
            }
            final Key key = ex.getKey();
            if (key.compareKeyFragment(_rootKey, 0, _rootKey.getEncodedSize()) != 0) {
                return null;
            }
            final int keyBytesSize = key.getEncodedSize() - _rootKey.getEncodedSize();
            final byte[] keyBytes = new byte[keyBytesSize];
View Full Code Here

Examples of com.saasovation.common.port.adapter.messaging.rabbitmq.Exchange

    }

    private MessageProducer messageProducer() {

        // creates my exchange if non-existing
        Exchange exchange =
            Exchange.fanOutInstance(
                    ConnectionSettings.instance(),
                    this.exchangeName(),
                    true);
View Full Code Here

Examples of com.trendmicro.mist.util.Exchange

        private void fix(String [] argv) {
            if(argv.length == 1) {
                myConsole.logResponse("exchange: `%s', missing broker_ip%n", argv[0]);
                return;
            }
            Exchange ex = new Exchange(argv[0]);
            String broker_ip = argv[1];
            if(!isValidBrokerIP(broker_ip)) {
                myConsole.logResponse("broker_ip `%s' not available%n", broker_ip);
                return;
            }

            ZooKeeperInfo.Exchange.Builder builder = ZooKeeperInfo.Exchange.newBuilder();
            builder.setHost(broker_ip);
            ZooKeeperInfo.Exchange ex_data = builder.build();

            String path = String.format("/global/fixed_exchange/%s", ex.getName());
            createAndSetNode(path, ex_data.toString().getBytes());
            myConsole.logResponse("exchange `%s' fixed on broker `%s'%n", ex.getName(), broker_ip);
        }
View Full Code Here

Examples of com.trendmicro.tme.mfr.Exchange

   
    @Path("/{name}/drop")
    @PUT
    @Consumes(MediaType.TEXT_PLAIN)
    public void setDrop(@PathParam("name") String name, String policy) throws Exception {
        Exchange ex = new Exchange(name);
        String path = "/global/drop_exchange/" + ex.getName();
        ZooKeeperInfo.DropConfig dropConfig = ZooKeeperInfo.DropConfig.newBuilder().setPolicy(policy.equals("newest") ? DropConfig.Policy.NEWEST: DropConfig.Policy.OLDEST).build();
       
        ZNode node = new ZNode(path);
        if(node.exists()) {
            node.setContent(dropConfig.toString().getBytes());
View Full Code Here

Examples of com.xeiam.xchange.Exchange

public class DepthDemo {

  public static void main(String[] args) throws IOException {

    // Use the factory to get the VirtEx exchange API using default settings
    Exchange cavirtex = ExchangeFactory.INSTANCE.createExchange(VirtExExchange.class.getName());

    // Interested in the public polling market data feed (no authentication)
    PollingMarketDataService marketDataService = cavirtex.getPollingMarketDataService();

    generic(marketDataService);
    raw((VirtExMarketDataServiceRaw) marketDataService);

  }
View Full Code Here

Examples of name.abuchen.portfolio.model.Exchange

    private Exchange createExchange(String symbol)
    {
        int e = symbol.indexOf('.');
        String exchange = e >= 0 ? symbol.substring(e) : ".default"; //$NON-NLS-1$
        String label = ExchangeLabels.getString("yahoo" + exchange); //$NON-NLS-1$
        return new Exchange(symbol, String.format("%s (%s)", label, symbol)); //$NON-NLS-1$
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.