public Canceler(JmDNSImpl jmDNSImpl) { super(jmDNSImpl, 0); this.setTaskState(DNSState.CANCELING_1); this.associate(DNSState.CANCELING_1); }
@Override protected void advanceTask() { this.setTaskState(this.getTaskState().advance()); if (!this.getTaskState().isCanceling()) { cancel(); } } }
@Override protected DNSOutgoing buildOutgoingForInfo(ServiceInfoImpl info, DNSOutgoing out) throws IOException { DNSOutgoing newOut = out; for (DNSRecord answer : info.answers(DNSRecordClass.UNIQUE, this.getTTL(), this.getDns().getLocalHost())) { newOut = this.addAnswer(newOut, null, answer); } return newOut; }
@Override public boolean cancel() { this.removeAssociation(); return super.cancel(); }
@Override public String toString() { return super.toString() + " state: " + this.getTaskState(); }
@Override protected DNSOutgoing buildOutgoingForInfo(ServiceInfoImpl info, DNSOutgoing out) throws IOException { DNSOutgoing newOut = out; for (DNSRecord answer : info.answers(DNSRecordClass.CLASS_ANY, DNSRecordClass.UNIQUE, this.getTTL(), this.getDns().getLocalHost())) { newOut = this.addAnswer(newOut, null, answer); } return newOut; }
@Override public boolean cancel() { this.removeAssociation(); return super.cancel(); }
@Override public String toString() { return super.toString() + " state: " + this.getTaskState(); }
@Override protected void advanceTask() { this.setTaskState(this.getTaskState().advance()); if (!this.getTaskState().isCanceling()) { cancel(); } } }
public Canceler(JmDNSImpl jmDNSImpl) { super(jmDNSImpl, 0); this.setTaskState(DNSState.CANCELING_1); this.associate(DNSState.CANCELING_1); }
@Override public boolean cancel() { this.removeAssociation(); return super.cancel(); }
@Override public String toString() { return super.toString() + " state: " + this.getTaskState(); }
@Override protected void advanceTask() { this.setTaskState(this.getTaskState().advance()); if (!this.getTaskState().isCanceling()) { cancel(); } } }