Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.provdisc.dhcp
Class DHCPProvisioningDiscover

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

public class DHCPProvisioningDiscover
extends Object
implements Runnable

Class that will perform DHCP provisioning discovery.

Author:
Sebastien Vincent

Constructor Summary
DHCPProvisioningDiscover(int port, byte option)
          Constructor.
 
Method Summary
 void addDiscoveryListener(DiscoveryListener listener)
          Add a listener that will be notified when the discoverProvisioningURL has finished.
 String discoverProvisioningURL()
          It sends a DHCPINFORM message from all interfaces 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

DHCPProvisioningDiscover

public DHCPProvisioningDiscover(int port,
                                byte option)
                         throws Exception
Constructor.

Parameters:
port - port on which we will bound and listen for DHCP response
option - code of the specific provisioning option
Throws:
Exception - if anything goes wrong during initialization
Method Detail

discoverProvisioningURL

public String discoverProvisioningURL()
It sends a DHCPINFORM message from all interfaces and wait for a response. Thread stops after first successful answer that contains specific option and thus the provisioning URL.

Returns:
provisioning URL

run

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

Specified by:
run in interface Runnable

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.