org.xbill.DNS.Message.clone()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(2.4k)|赞(0)|评价(0)|浏览(246)

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

Message.clone介绍

暂无

代码示例

代码示例来源:origin: posicks/mdnsjava

public void run()
{
  if (logger.isLoggable(Level.FINE))
  {
    long now = System.currentTimeMillis();
    logger.logp(Level.FINE, getClass().getName(), "run", "Broadcasting Query for Browse." + (lastBroadcast <= 0 ? "" : " Last broadcast was " + ((double) (now - lastBroadcast) / (double) 1000) + " seconds ago."));
    lastBroadcast = System.currentTimeMillis();
  }
  
  try
  {
    broadcastDelay = broadcastDelay > 0 ? Math.min(broadcastDelay * 2, 3600) : 1;
    executors.schedule(this, broadcastDelay, TimeUnit.SECONDS);
    
    if (logger.isLoggable(Level.FINE))
    {
      logger.logp(Level.FINE, getClass().getName(), "run", "Broadcasting Query for Browse Operation.");
    }
    
    for (Message query : queries)
    {
      querier.broadcast((Message) query.clone(), false);
    }
  } catch (Exception e)
  {
    logger.log(Level.WARNING, "Error broadcasting query for browse - " + e.getMessage(), e);
  }
}

代码示例来源:origin: posicks/mdnsjava

protected MulticastDNSLookupBase(final Message message)
throws IOException
{
  this();
  queries = new Message[] {(Message) message.clone()};
  
  int type = -1;
  int dclass = -1;
  List list = new ArrayList();
  Record[] records = MulticastDNSUtils.extractRecords(message, Section.QUESTION);
  for (Record r : records)
  {
    if (!list.contains(r))
    {
      list.add(r.getName());
    }
    
    type = type < 0 ? r.getType() : Type.ANY;
    dclass = dclass < 0 ? r.getDClass() : DClass.ANY;
  }
  
  if (list.size() > 0)
  {
    this.type = type;
    this.dclass = dclass;
    names = (Name[]) list.toArray(new Record[list.size()]);
  }
}

代码示例来源:origin: posicks/mdnsjava

final Message query = (Message) request.clone();
final int opcode = query.getHeader().getOpcode();

代码示例来源:origin: org.littleshoot/dnsjava

query = (Message) query.clone();
applyEDNS(query);
if (tsig != null)

代码示例来源:origin: net.sf.dnsjava-osgi/dnsjava-osgi

query = (Message) query.clone();
applyEDNS(query);
if (tsig != null)

代码示例来源:origin: dnsjava/dnsjava

query = (Message) query.clone();
applyEDNS(query);
if (tsig != null)

代码示例来源:origin: tiandawu/IotXmpp

query = (Message) query.clone();
applyEDNS(query);
if (tsig != null)

代码示例来源:origin: posicks/mdnsjava

public Message getResponse(final int timeout)
throws IOException
  Message response = (Message) query.clone();
  Header header = response.getHeader();
  try

代码示例来源:origin: posicks/mdnsjava

final Message query = (Message) m.clone();
final Object id = query.getHeader().getID();
final int opcode = query.getHeader().getOpcode();

相关文章