Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.provdisc.mdns
Class MDNSProvisioningDiscover

java.lang.Object
  extended by net.java.sip.communicator.impl.provdisc.mdns.MDNSProvisioningDiscover
All Implemented Interfaces:
Runnable

public class MDNSProvisioningDiscover
extends Object
implements Runnable

Class that will perform mDNS provisioning discovery.

Author:
Sebastien Vincent

Constructor Summary
MDNSProvisioningDiscover()
          Constructor.
 
Method Summary
 void addDiscoveryListener(DiscoveryListener listener)
          Add a listener that will be notified when the discoverProvisioningURL has finished.
 String discoverProvisioningURL()
          It sends a mDNS to retrieve provisioning URL and wait for a response.
 void removeDiscoveryListener(DiscoveryListener listener)
          Add a listener that will be notified when the discoverProvisioningURL has finished.
 void run()
          Thread entry point.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MDNSProvisioningDiscover

public MDNSProvisioningDiscover()
Constructor.

Method Detail

run

public void run()
Thread entry point. It runs discoverProvisioningURL in a separate thread.

Specified by:
run in interface Runnable

discoverProvisioningURL

public String discoverProvisioningURL()
It sends a mDNS to retrieve provisioning URL and wait for a response. Thread stops after first successful answer that contains the provisioning URL.

Returns:
provisioning URL or null if no provisioning URL was discovered

addDiscoveryListener

public void addDiscoveryListener(DiscoveryListener listener)
Add a listener that will be notified when the discoverProvisioningURL has finished.

Parameters:
listener - ProvisioningListener to add

removeDiscoveryListener

public void removeDiscoveryListener(DiscoveryListener listener)
Add a listener that will be notified when the discoverProvisioningURL has finished.

Parameters:
listener - ProvisioningListener to add

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.