本文整理汇总了Java中javax.jmdns.impl.tasks.DNSTask类的典型用法代码示例。如果您正苦于以下问题:Java DNSTask类的具体用法?Java DNSTask怎么用?Java DNSTask使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DNSTask类属于javax.jmdns.impl.tasks包,在下文中一共展示了DNSTask类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: advanceState
import javax.jmdns.impl.tasks.DNSTask; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public boolean advanceState(DNSTask task) {
boolean result = true;
if (this._task == task) {
this.lock();
try {
if (this._task == task) {
this.setState(this._state.advance());
} else {
logger.warning("Trying to advance state whhen not the owner. owner: " + this._task + " perpetrator: " + task);
}
} finally {
this.unlock();
}
}
return result;
}
示例2: setTask
import javax.jmdns.impl.tasks.DNSTask; //导入依赖的package包/类
@Override
protected void setTask(DNSTask task) {
super.setTask(task);
if ((this._task == null) && _info.needTextAnnouncing()) {
this.lock();
try {
if ((this._task == null) && _info.needTextAnnouncing()) {
if (this._state.isAnnounced()) {
this.setState(DNSState.ANNOUNCING_1);
if (this.getDns() != null) {
this.getDns().startAnnouncer();
}
}
_info.setNeedTextAnnouncing(false);
}
} finally {
this.unlock();
}
}
}
示例3: associateWithTask
import javax.jmdns.impl.tasks.DNSTask; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public void associateWithTask(DNSTask task, DNSState state)
{
if (this._task == null && this._state == state)
{
this.lock();
try
{
if (this._task == null && this._state == state)
{
this.setTask(task);
}
}
finally
{
this.unlock();
}
}
}
示例4: removeAssociationWithTask
import javax.jmdns.impl.tasks.DNSTask; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public void removeAssociationWithTask(DNSTask task)
{
if (this._task == task)
{
this.lock();
try
{
if (this._task == task)
{
this.setTask(null);
}
}
finally
{
this.unlock();
}
}
}
示例5: advanceState
import javax.jmdns.impl.tasks.DNSTask; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public boolean advanceState(DNSTask task)
{
boolean result = true;
if (this._task == task)
{
this.lock();
try
{
if (this._task == task)
{
this._state = this._state.advance();
}
else
{
logger.warning("Trying to advance state whhen not the owner. owner: " + this._task + " perpetrator: " + task);
}
}
finally
{
this.unlock();
}
}
return result;
}
示例6: associateWithTask
import javax.jmdns.impl.tasks.DNSTask; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public void associateWithTask(DNSTask task, DNSState state) {
if (this._task == null && this._state == state) {
this.lock();
try {
if (this._task == null && this._state == state) {
this.setTask(task);
}
} finally {
this.unlock();
}
}
}
示例7: removeAssociationWithTask
import javax.jmdns.impl.tasks.DNSTask; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public void removeAssociationWithTask(DNSTask task) {
if (this._task == task) {
this.lock();
try {
if (this._task == task) {
this.setTask(null);
}
} finally {
this.unlock();
}
}
}
示例8: isAssociatedWithTask
import javax.jmdns.impl.tasks.DNSTask; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public boolean isAssociatedWithTask(DNSTask task, DNSState state) {
this.lock();
try {
return this._task == task && this._state == state;
} finally {
this.unlock();
}
}
示例9: isAssociatedWithTask
import javax.jmdns.impl.tasks.DNSTask; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public boolean isAssociatedWithTask(DNSTask task, DNSState state)
{
this.lock();
try
{
return this._task == task && this._state == state;
}
finally
{
this.unlock();
}
}
示例10: setTask
import javax.jmdns.impl.tasks.DNSTask; //导入依赖的package包/类
@Override
protected void setTask(DNSTask task)
{
super.setTask(task);
if ((this._task == null) && _info.needTextAnnouncing())
{
this.lock();
try
{
if ((this._task == null) && _info.needTextAnnouncing())
{
if (this._state.isAnnounced())
{
this._state = DNSState.ANNOUNCING_1;
if (this.getDns() != null)
{
this.getDns().startAnnouncer();
}
}
_info.setNeedTextAnnouncing(false);
}
}
finally
{
this.unlock();
}
}
}