本文整理汇总了Java中javax.jmdns.impl.constants.DNSConstants.FLAGS_QR_QUERY属性的典型用法代码示例。如果您正苦于以下问题:Java DNSConstants.FLAGS_QR_QUERY属性的具体用法?Java DNSConstants.FLAGS_QR_QUERY怎么用?Java DNSConstants.FLAGS_QR_QUERY使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类javax.jmdns.impl.constants.DNSConstants
的用法示例。
在下文中一共展示了DNSConstants.FLAGS_QR_QUERY属性的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: run
@Override
public void run() {
try {
if (this.getDns().isCanceling() || this.getDns().isCanceled()) {
this.cancel();
} else {
if (_count++ < 3) {
if (logger.isLoggable(Level.FINER)) {
logger.finer(this.getName() + ".run() JmDNS " + this.description());
}
DNSOutgoing out = new DNSOutgoing(DNSConstants.FLAGS_QR_QUERY);
out = this.addQuestions(out);
if (this.getDns().isAnnounced()) {
out = this.addAnswers(out);
}
if (!out.isEmpty()) {
this.getDns().send(out);
}
} else {
// After three queries, we can quit.
this.cancel();
}
}
} catch (Throwable e) {
logger.log(Level.WARNING, this.getName() + ".run() exception ", e);
this.getDns().recover();
}
}
示例2: createOugoing
@Override
protected DNSOutgoing createOugoing() {
return new DNSOutgoing(DNSConstants.FLAGS_QR_QUERY);
}
示例3: isQuery
@Override
public boolean isQuery() {
return (this.getFlags() & DNSConstants.FLAGS_QR_MASK) == DNSConstants.FLAGS_QR_QUERY;
}
示例4: createOugoing
@Override
protected DNSOutgoing createOugoing()
{
return new DNSOutgoing(DNSConstants.FLAGS_QR_QUERY);
}
示例5: run
@Override
public void run()
{
try
{
if (this.getDns().isCanceling() || this.getDns().isCanceled())
{
this.cancel();
}
else
{
if (_count++ < 3)
{
if (logger.isLoggable(Level.FINER))
{
logger.finer(this.getName() + ".run() JmDNS " + this.description());
}
DNSOutgoing out = new DNSOutgoing(DNSConstants.FLAGS_QR_QUERY);
out = this.addQuestions(out);
if (this.getDns().isAnnounced())
{
out = this.addAnswers(out);
}
if (!out.isEmpty())
{
this.getDns().send(out);
}
}
else
{
// After three queries, we can quit.
this.cancel();
}
}
}
catch (Throwable e)
{
logger.log(Level.WARNING, this.getName() + ".run() exception ", e);
this.getDns().recover();
}
}
示例6: isQuery
@Override
public boolean isQuery()
{
return (this.getFlags() & DNSConstants.FLAGS_QR_MASK) == DNSConstants.FLAGS_QR_QUERY;
}
示例7: isQuery
/**
* Check if the message is a query.
*
* @return true is the message is a query
*/
public boolean isQuery() {
return (_flags & DNSConstants.FLAGS_QR_MASK) == DNSConstants.FLAGS_QR_QUERY;
}
示例8: isQuery
/**
* Check if the message is a query.
*
* @return true is the message is a query
*/
public boolean isQuery() {
return (_flags & DNSConstants.FLAGS_QR_MASK) == DNSConstants.FLAGS_QR_QUERY;
}
示例9: isQuery
/**
* Check if the message is a query.
*
* @return true is the message is a query
*/
public boolean isQuery()
{
return (_flags & DNSConstants.FLAGS_QR_MASK) == DNSConstants.FLAGS_QR_QUERY;
}