@Override public void run() { DNSOutgoing out = this.createOugoing(); try { if (!this.checkRunCondition()) { this.cancel(); return; synchronized (this.getDns()) { if (this.getDns().isAssociatedWithTask(this, this.getTaskState())) { logger1.finer(this.getName() + ".run() JmDNS " + this.getTaskDescription() + " " + this.getDns().getName()); stateObjects.add(this.getDns()); out = this.buildOutgoingForDNS(out); for (ServiceInfo serviceInfo : this.getDns().getServices().values()) { ServiceInfoImpl info = (ServiceInfoImpl) serviceInfo; if (info.isAssociatedWithTask(this, this.getTaskState())) { logger1.fine(this.getName() + ".run() JmDNS " + this.getTaskDescription() + " " + info.getQualifiedName()); stateObjects.add(info); out = this.buildOutgoingForInfo(info, out); logger1.finer(this.getName() + ".run() JmDNS " + this.getTaskDescription() + " #" + this.getTaskState()); this.getDns().send(out); this.advanceObjectsState(stateObjects); } else { this.advanceObjectsState(stateObjects);
@Override public boolean cancel() { this.removeAssociation(); return super.cancel(); }
/** * Remove the DNS host and service info association with this task. */ protected void removeAssociation() { // Remove association from host to this synchronized (this.getDns()) { this.getDns().removeAssociationWithTask(this); } // Remove associations from services to this for (ServiceInfo serviceInfo : this.getDns().getServices().values()) { ((ServiceInfoImpl) serviceInfo).removeAssociationWithTask(this); } }
@Override public boolean cancel() { this.removeAssociation(); return super.cancel(); }
/** * Remove the DNS host and service info association with this task. */ protected void removeAssociation() { // Remove association from host to this synchronized (this.getDns()) { this.getDns().removeAssociationWithTask(this); } // Remove associations from services to this for (ServiceInfo serviceInfo : this.getDns().getServices().values()) { ((ServiceInfoImpl) serviceInfo).removeAssociationWithTask(this); } }
@Override public void run() { DNSOutgoing out = this.createOugoing(); try { if (!this.checkRunCondition()) { this.cancel(); return; synchronized (this.getDns()) { if (this.getDns().isAssociatedWithTask(this, this.getTaskState())) { logger1.finer(this.getName() + ".run() JmDNS " + this.getTaskDescription() + " " + this.getDns().getName()); stateObjects.add(this.getDns()); out = this.buildOutgoingForDNS(out); for (ServiceInfo serviceInfo : this.getDns().getServices().values()) { ServiceInfoImpl info = (ServiceInfoImpl) serviceInfo; if (info.isAssociatedWithTask(this, this.getTaskState())) { logger1.fine(this.getName() + ".run() JmDNS " + this.getTaskDescription() + " " + info.getQualifiedName()); stateObjects.add(info); out = this.buildOutgoingForInfo(info, out); logger1.finer(this.getName() + ".run() JmDNS " + this.getTaskDescription() + " #" + this.getTaskState()); this.getDns().send(out); this.advanceObjectsState(stateObjects); } else { this.advanceObjectsState(stateObjects);
@Override public boolean cancel() { this.removeAssociation(); return super.cancel(); }
/** * Remove the DNS host and service info association with this task. */ protected void removeAssociation() { // Remove association from host to this synchronized (this.getDns()) { this.getDns().removeAssociationWithTask(this); } // Remove associations from services to this for (ServiceInfo serviceInfo : this.getDns().getServices().values()) { ((ServiceInfoImpl) serviceInfo).removeAssociationWithTask(this); } }
@Override public void run() { DNSOutgoing out = this.createOugoing(); try { if (!this.checkRunCondition()) { this.cancel(); return; synchronized (this.getDns()) { if (this.getDns().isAssociatedWithTask(this, this.getTaskState())) { logger.debug("{}.run() JmDNS {} {}", this.getName(), this.getTaskDescription(), this.getDns().getName()); stateObjects.add(this.getDns()); out = this.buildOutgoingForDNS(out); for (ServiceInfo serviceInfo : this.getDns().getServices().values()) { ServiceInfoImpl info = (ServiceInfoImpl) serviceInfo; if (info.isAssociatedWithTask(this, this.getTaskState())) { logger.debug("{}.run() JmDNS {} {}",this.getName(), this.getTaskDescription(), info.getQualifiedName()); stateObjects.add(info); out = this.buildOutgoingForInfo(info, out); logger.debug("{}.run() JmDNS {} #{}", this.getName(), this.getTaskDescription(), this.getTaskState()); this.getDns().send(out); this.advanceObjectsState(stateObjects); } else { this.advanceObjectsState(stateObjects);
@Override public boolean cancel() { this.removeAssociation(); return super.cancel(); }
/** * Remove the DNS host and service info association with this task. */ protected void removeAssociation() { // Remove association from host to this synchronized (this.getDns()) { this.getDns().removeAssociationWithTask(this); } // Remove associations from services to this for (ServiceInfo serviceInfo : this.getDns().getServices().values()) { ((ServiceInfoImpl) serviceInfo).removeAssociationWithTask(this); } }
@Override public void run() { DNSOutgoing out = this.createOugoing(); try { if (!this.checkRunCondition()) { this.cancel(); return; synchronized (this.getDns()) { if (this.getDns().isAssociatedWithTask(this, this.getTaskState())) { logger1.finer(this.getName() + ".run() JmDNS " + this.getTaskDescription() + " " + this.getDns().getName()); stateObjects.add(this.getDns()); out = this.buildOutgoingForDNS(out); for (ServiceInfo serviceInfo : this.getDns().getServices().values()) { ServiceInfoImpl info = (ServiceInfoImpl) serviceInfo; if (info.isAssociatedWithTask(this, this.getTaskState())) { logger1.fine(this.getName() + ".run() JmDNS " + this.getTaskDescription() + " " + info.getQualifiedName()); stateObjects.add(info); out = this.buildOutgoingForInfo(info, out); logger1.finer(this.getName() + ".run() JmDNS " + this.getTaskDescription() + " #" + this.getTaskState()); this.getDns().send(out); this.advanceObjectsState(stateObjects); } else { this.advanceObjectsState(stateObjects);
@Override public boolean cancel() { this.removeAssociation(); return super.cancel(); }
/** * Associate the DNS host and the service infos with this task if not already associated and in the same state. * * @param state * target state */ protected void associate(DNSState state) { synchronized (this.getDns()) { this.getDns().associateWithTask(this, state); } for (ServiceInfo serviceInfo : this.getDns().getServices().values()) { ((ServiceInfoImpl) serviceInfo).associateWithTask(this, state); } }
@Override public boolean cancel() { this.removeAssociation(); return super.cancel(); }
/** * Associate the DNS host and the service infos with this task if not already associated and in the same state. * * @param state * target state */ protected void associate(DNSState state) { synchronized (this.getDns()) { this.getDns().associateWithTask(this, state); } for (ServiceInfo serviceInfo : this.getDns().getServices().values()) { ((ServiceInfoImpl) serviceInfo).associateWithTask(this, state); } }
@Override public boolean cancel() { this.removeAssociation(); return super.cancel(); }
/** * Associate the DNS host and the service infos with this task if not already associated and in the same state. * * @param state * target state */ protected void associate(DNSState state) { synchronized (this.getDns()) { this.getDns().associateWithTask(this, state); } for (ServiceInfo serviceInfo : this.getDns().getServices().values()) { ((ServiceInfoImpl) serviceInfo).associateWithTask(this, state); } }
@Override public boolean cancel() { this.removeAssociation(); return super.cancel(); }
/** * Associate the DNS host and the service infos with this task if not already associated and in the same state. * * @param state * target state */ protected void associate(DNSState state) { synchronized (this.getDns()) { this.getDns().associateWithTask(this, state); } for (ServiceInfo serviceInfo : this.getDns().getServices().values()) { ((ServiceInfoImpl) serviceInfo).associateWithTask(this, state); } }