com.thomsonreuters.ema.access.Key.dataType()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(13.0k)|赞(0)|评价(0)|浏览(112)

本文整理了Java中com.thomsonreuters.ema.access.Key.dataType()方法的一些代码示例,展示了Key.dataType()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Key.dataType()方法的具体详情如下:
包路径:com.thomsonreuters.ema.access.Key
类名称:Key
方法名:dataType

Key.dataType介绍

[英]Returns the DataType of the contained data.
Return of com.thomsonreuters.ema.access.DataType.DataTypes#ERRORsignifies error while extracting content of Key.
[中]返回包含的数据的数据类型。
返回com。汤森路透社。艾玛。通道数据类型。数据类型#error表示提取密钥内容时出错。

代码示例

代码示例来源:origin: Refinitiv/Elektron-SDK

void decode(Map map)
{
  if (DataTypes.FIELD_LIST == map.summaryData().dataType())
  {
    System.out.println("Map Summary data:");
    decode(map.summaryData().fieldList());
    System.out.println();
  }
  for (MapEntry mapEntry : map)
  {
    if (DataTypes.BUFFER == mapEntry.key().dataType())
      System.out.println("Action: " + mapEntry.mapActionAsString() + " key value: " + EmaUtility.asHexString(mapEntry.key().buffer().buffer()));
    
    if (DataTypes.FIELD_LIST == mapEntry.loadType())
    {
      System.out.println("Entry data:");
      decode(mapEntry.fieldList());
      System.out.println();
    }
  }
}

代码示例来源:origin: Refinitiv/Elektron-SDK

void decode(Map map)
{
  if (DataTypes.FIELD_LIST == map.summaryData().dataType())
  {
    System.out.println("Map Summary data:");
    decode(map.summaryData().fieldList());
    System.out.println();
  }
  for (MapEntry mapEntry : map)
  {
    if (DataTypes.BUFFER == mapEntry.key().dataType())
      System.out.println("Action: " + mapEntry.mapActionAsString() + " key value: " + EmaUtility.asHexString(mapEntry.key().buffer().buffer()));
    if (DataTypes.FIELD_LIST == mapEntry.loadType())
    {
      System.out.println("Entry data:");
      decode(mapEntry.fieldList());
      System.out.println();
    }
  }
}

代码示例来源:origin: Refinitiv/Elektron-SDK

void decode(Map map)
  {
    if (DataTypes.FIELD_LIST == map.summaryData().dataType())
    {
      System.out.println("Map Summary data:");
      decode(map.summaryData().fieldList());
      System.out.println();
    }
    
    for (MapEntry mapEntry : map)
    {
      if (DataTypes.BUFFER == mapEntry.key().dataType())
        System.out.println("Action: " + mapEntry.mapActionAsString() + " key value: " + EmaUtility.asHexString(mapEntry.key().buffer().buffer()));

      if (DataTypes.FIELD_LIST == mapEntry.loadType())
      {
        System.out.println("Entry data:");
        decode(mapEntry.fieldList());
        System.out.println();
      }
    }
  }
}

代码示例来源:origin: Refinitiv/Elektron-SDK

void retrieveServer(Map map, String serverName,
  ActiveServerConfig activeServerConfig, int portFnCalled, ServerConfig fileCfg)
{
  for (MapEntry mapEntry : map)
  {
    if (mapEntry.key().dataType() == DataTypes.ASCII &&
        mapEntry.key().ascii().ascii().equals("ServerGroup") &&
        mapEntry.loadType() == DataTypes.ELEMENT_LIST)
    {
      for (ElementEntry elementEntry : mapEntry.elementList())
      {
        if (elementEntry.loadType() == DataTypes.MAP && elementEntry.name().equals("ServerList"))
        {
          for (MapEntry mapListEntry : elementEntry.map())
          {
            if ((mapListEntry.key().dataType() == DataTypes.ASCII) && 
                mapListEntry.key().ascii().ascii().equals(serverName) && 
                mapListEntry.loadType() == DataTypes.ELEMENT_LIST)
            {
              retrieveServerInfo(mapListEntry, serverName, activeServerConfig, portFnCalled, fileCfg);
            }
          }
        }
      }
    }
  }
}

代码示例来源:origin: Refinitiv/Elektron-SDK

if ( mapEntry.key().dataType() == DataTypes.ASCII )
  if ( mapEntry.key().ascii().ascii().equals("ConsumerGroup") )

代码示例来源:origin: Refinitiv/Elektron-SDK

switch (mapEntry.key().dataType())

代码示例来源:origin: Refinitiv/Elektron-SDK

boolean validateConsumerProviderName( Map map, String group, String listName, String conProvName )
{
  for (MapEntry mapEntry : map)
  {
    if ( ( mapEntry.key().dataType() == DataTypes.ASCII ) && ( mapEntry.key().ascii().ascii().equals(group) ) &&
       ( mapEntry.load().dataType() == DataTypes.ELEMENT_LIST ) )
    {
      ElementList elementList = mapEntry.elementList();

      for (ElementEntry elementEntry : elementList)
      {
        if ( ( elementEntry.name().equals( listName) ) && ( elementEntry.load().dataType() == DataTypes.MAP ) )
        {
          Map consumerMap = elementEntry.map();
          for (MapEntry consumerMapEntry : consumerMap)
          {
            if ( ( consumerMapEntry.key().dataType() == DataTypes.ASCII ) && ( consumerMapEntry.key().ascii().ascii().equals(conProvName)) )
              return true;
          }
        }
      }
    }
  }

  return false;
}

代码示例来源:origin: Refinitiv/Elektron-SDK

void retrieveChannel( Map map, String channelName, ActiveConfig activeConfig, int hostFnCalled, ChannelConfig fileCfg)
{
  for (MapEntry mapEntry : map)
  {
    if ( mapEntry.key().dataType() == DataTypes.ASCII &&
       mapEntry.key().ascii().ascii().equals("ChannelGroup") &&
       mapEntry.loadType() == DataTypes.ELEMENT_LIST )
    {
      for (ElementEntry elementEntry : mapEntry.elementList())
      {
        if ( elementEntry.loadType() == DataTypes.MAP && elementEntry.name().equals("ChannelList"))
        {
          for (MapEntry mapListEntry : elementEntry.map())
          {
            if ( mapListEntry.key().dataType() == DataTypes.ASCII  &&
              mapListEntry.key().ascii().ascii().equals(channelName) &&
              mapListEntry.loadType() == DataTypes.ELEMENT_LIST )
            {
              retrieveChannelInfo( mapListEntry, channelName, activeConfig, hostFnCalled, fileCfg);
            }
          }
        }
      }
    }
  }
}

代码示例来源:origin: Refinitiv/Elektron-SDK

String retrieveDefaultConsProvName( Map map, String group, String defaulName )
{
  for (MapEntry mapEntry : map)
  {
    if ( ( mapEntry.key().dataType() == DataTypes.ASCII ) && ( mapEntry.key().ascii().ascii().equals(group) ) &&
       ( mapEntry.load().dataType() == DataTypes.ELEMENT_LIST ) )
    {
      ElementList elementList = mapEntry.elementList();

      for (ElementEntry elementEntry : elementList)
      {
        if ( elementEntry.loadType() == DataTypes.ASCII )
        {
          if ( elementEntry.name().equals( defaulName) )
          {
            return elementEntry.ascii().ascii();
          }
        }
      }
    }
  }

  return null;
}

代码示例来源:origin: Refinitiv/Elektron-SDK

if ( mapEntry.key().dataType() == DataTypes.ASCII &&
   mapEntry.key().ascii().ascii().equals("ChannelGroup") &&
   mapEntry.loadType() == DataTypes.ELEMENT_LIST )
        if ( mapListEntry.key().dataType() == DataTypes.ASCII  &&
          mapListEntry.key().ascii().ascii().equals(channelName) &&
          mapListEntry.loadType() == DataTypes.ELEMENT_LIST )

代码示例来源:origin: Refinitiv/Elektron-SDK

if (mapEntry.key().dataType() == DataTypes.ASCII &&
    mapEntry.key().ascii().ascii().equals("DictionaryGroup") &&
    mapEntry.loadType() == DataTypes.ELEMENT_LIST)
        if (dictMapEntry.key().dataType() == DataTypes.ASCII &&
            dictMapEntry.loadType() == DataTypes.ELEMENT_LIST)

代码示例来源:origin: Refinitiv/Elektron-SDK

if (DataTypes.BUFFER != mapEntry.key().dataType())
  return;

代码示例来源:origin: Refinitiv/Elektron-SDK

if ( mapEntry.key().dataType() == DataTypes.ASCII && mapEntry.key().ascii().ascii().equals("DictionaryGroup") )
            if ( ( mapListEntry.key().dataType() == DataTypes.ASCII ) && ( mapListEntry.key().ascii().ascii().equals(dictionaryName) ) )

代码示例来源:origin: Refinitiv/Elektron-SDK

checkResult( me1.key().dataType() == DataTypes.BUFFER, "MapEntry::getKey().dataType() == DataTypes.BUFFER" );
checkResult( me2.key().dataType() == DataTypes.BUFFER, "MapEntry::getKey().dataType() == DataTypes.BUFFER" );
checkResult( me3.key().dataType() == DataTypes.BUFFER, "MapEntry::getKey().dataType() == DataTypes.BUFFER" );
checkResult( me4.key().dataType() == DataTypes.BUFFER, "MapEntry::getKey().dataType() == DataTypes.BUFFER" );

代码示例来源:origin: Refinitiv/Elektron-SDK

TestUtilities.checkResult( me1.key().dataType() == DataType.DataTypes.BUFFER, "MapEntry.key().dataType() == DataType.DataTypes.BUFFER" );
TestUtilities.checkResult( Arrays.equals( me1.key().buffer().buffer().array() , new String("ABCD").getBytes()), "MapEntry.key().buffer()" );
TestUtilities.checkResult( me1.action() == MapEntry.MapAction.DELETE, "MapEntry.action() == MapEntry.MapAction.DELETE" );
  TestUtilities.checkResult( me1.key().dataType() == DataType.DataTypes.BUFFER, "MapEntry.key().dataType() == DataType.DataTypes.BUFFER" );
  TestUtilities.checkResult( Arrays.equals( me1.key().buffer().buffer().array() , new String("ABCD").getBytes()), "MapEntry.key().buffer()" );
  TestUtilities.checkResult( me1.action() == MapEntry.MapAction.DELETE, "MapEntry.action() == MapEntry.MapAction.DELETE" );
TestUtilities.checkResult( me2.key().dataType() == DataType.DataTypes.BUFFER, "MapEntry.key().dataType() == DataType.DataTypes.BUFFER" );
TestUtilities.checkResult( Arrays.equals( me1.key().buffer().buffer().array() , new String("ABCD").getBytes()), "MapEntry.key().buffer()" );
TestUtilities.checkResult( me2.action() == MapEntry.MapAction.ADD, "MapEntry.action() == MapEntry.MapAction.ADD" );
TestUtilities.checkResult( me3.key().dataType() == DataType.DataTypes.BUFFER, "MapEntry.key().dataType() == DataType.DataTypes.BUFFER" );
TestUtilities.checkResult( Arrays.equals( me3.key().buffer().buffer().array() , new String("EFGHI").getBytes()), "MapEntry.key().buffer()" );
TestUtilities.checkResult( me3.action() == MapEntry.MapAction.ADD, "MapEntry.action() == MapEntry.MapAction.ADD" );
TestUtilities.checkResult( me4.key().dataType() == DataType.DataTypes.BUFFER, "MapEntry.key().dataType() == DataType.DataTypes.BUFFER" );
TestUtilities.checkResult( Arrays.equals( me4.key().buffer().buffer().array() , new String("JKLMNOP").getBytes()), "MapEntry.key().buffer()" );
TestUtilities.checkResult( me4.action() == MapEntry.MapAction.UPDATE, "MapEntry.action() == MapEntry.MapAction.UPDATE" );

代码示例来源:origin: Refinitiv/Elektron-SDK

TestUtilities.checkResult( me1.key().dataType() == DataTypes.UTF8, "MapEntry.key().dataType() == DataTypes.UTF8" );
TestUtilities.checkResult( Arrays.equals( me1.key().utf8().buffer().array() , new String("ABC").getBytes()), "MapEntry.key().utf8().buffer()" );
TestUtilities.checkResult( me1.action() == MapEntry.MapAction.DELETE, "MapEntry.action() == MapEntry.MapAction.DELETE" );
TestUtilities.checkResult( me2.key().dataType() == DataTypes.UTF8, "MapEntry.key().dataType() == DataTypes.UTF8" );
TestUtilities.checkResult( Arrays.equals( me2.key().utf8().buffer().array() , new String("ABC").getBytes()), "MapEntry.key().utf8().buffer()" );
TestUtilities.checkResult( me2.action() == MapEntry.MapAction.ADD, "MapEntry.action() == MapEntry.MapAction.ADD" );
  TestUtilities.checkResult( me3.key().dataType() == DataTypes.UTF8, "MapEntry.key().dataType() == DataTypes.UTF8" );
  TestUtilities.checkResult( Arrays.equals( me3.key().utf8().buffer().array() , new String("DEFGH").getBytes()), "MapEntry.key().utf8().buffer()" );
TestUtilities.checkResult( me3.action() == MapEntry.MapAction.ADD, "MapEntry.action() == MapEntry.MapAction.ADD" );
TestUtilities.checkResult( me4.key().dataType() == DataTypes.UTF8, "MapEntry.key().dataType() == DataTypes.UTF8" );
TestUtilities.checkResult( Arrays.equals( me4.key().utf8().buffer().array() , new String("KLMNOPQRS").getBytes()), "MapEntry.key().utf8().buffer()" );
TestUtilities.checkResult( me4.action() == MapEntry.MapAction.UPDATE, "MapEntry.action() == MapEntry.MapAction.UPDATE" );

代码示例来源:origin: Refinitiv/Elektron-SDK

TestUtilities.checkResult(me1.key().dataType(), DataType.DataTypes.BUFFER);
TestUtilities.checkResult(me1.key().dataType(), DataType.DataTypes.BUFFER);
TestUtilities.checkResult(Arrays.equals(me1.key().buffer().asHex().array(), expectedByteBuffer1.array()));
TestUtilities.checkResult(me1.action(), MapEntry.MapAction.UPDATE);
TestUtilities.checkResult(me2.key().dataType(), DataType.DataTypes.BUFFER);
TestUtilities.checkResult(me3.key().dataType(), DataType.DataTypes.BUFFER);

代码示例来源:origin: Refinitiv/Elektron-SDK

TestUtilities.checkResult(me1.key().dataType(), DataType.DataTypes.ASCII);
TestUtilities.checkResult(me1.key().ascii().toString(), "keyData1");
TestUtilities.checkResult(me1.action(), MapEntry.MapAction.UPDATE);
TestUtilities.checkResult(me1.key().dataType(), DataType.DataTypes.ASCII);
TestUtilities.checkResult(me1.key().ascii().toString(), "keyData1");
TestUtilities.checkResult(me1.action(), MapEntry.MapAction.UPDATE);
TestUtilities.checkResult(me2.key().dataType(), DataType.DataTypes.ASCII);
TestUtilities.checkResult(me2.key().ascii().toString(), "keyData2");
TestUtilities.checkResult(me2.action(), MapEntry.MapAction.ADD);
TestUtilities.checkResult(me3.key().dataType(), DataType.DataTypes.ASCII);
TestUtilities.checkResult(me3.key().ascii().toString(), "keyData3");
TestUtilities.checkResult(me3.action(), MapEntry.MapAction.DELETE);

代码示例来源:origin: Refinitiv/Elektron-SDK

switch (mapEntry.key().dataType())

代码示例来源:origin: Refinitiv/Elektron-SDK

TestUtilities.checkResult(mapIter.hasNext());
com.thomsonreuters.ema.access.MapEntry me1 = mapIter.next();
TestUtilities.checkResult(me1.key().dataType(), DataType.DataTypes.UINT);
TestUtilities.checkResult(me1.key().uintValue(), 1);
TestUtilities.checkResult(me1.action(), MapEntry.MapAction.ADD);
TestUtilities.checkResult(me1.key().dataType(), DataType.DataTypes.UINT);
TestUtilities.checkResult(me1.key().uintValue(), 1);
TestUtilities.checkResult(me1.action(), MapEntry.MapAction.ADD);
TestUtilities.checkResult(me2.key().dataType(), DataType.DataTypes.UINT);
TestUtilities.checkResult(me2.key().uintValue(), 2);
TestUtilities.checkResult(me2.action(), MapEntry.MapAction.UPDATE);
TestUtilities.checkResult(me3.key().dataType(), DataType.DataTypes.UINT);
TestUtilities.checkResult(me3.key().uintValue(), 3);
TestUtilities.checkResult(me3.action(), MapEntry.MapAction.DELETE);

相关文章