Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.service.provdisc
Class AbstractProvisioningDiscoveryService

java.lang.Object
  extended by net.java.sip.communicator.service.provdisc.AbstractProvisioningDiscoveryService
All Implemented Interfaces:
ProvisioningDiscoveryService
Direct Known Subclasses:
ProvisioningDiscoveryServiceDHCPImpl, ProvisioningDiscoveryServiceMDNSImpl

public abstract class AbstractProvisioningDiscoveryService
extends Object
implements ProvisioningDiscoveryService

Abstract base class of ProvisioningDiscoveryService that ease implementation

Author:
seb

Constructor Summary
AbstractProvisioningDiscoveryService()
           
 
Method Summary
 void addDiscoveryListener(DiscoveryListener listener)
          Add a listener that will be notified when the discoverProvisioningURL has finished.
abstract  String discoverURL()
          Launch a discovery for a provisioning URL.
 void fireDiscoveryEvent(DiscoveryEvent event)
          Notify all listeners about a DiscoveryEvent.
abstract  String getMethodName()
          Get the name of the method name used to retrieve provisioning URL.
 void removeDiscoveryListener(DiscoveryListener listener)
          Add a listener that will be notified when the discoverProvisioningURL has finished.
abstract  void startDiscovery()
          Launch a discovery for a provisioning URL.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractProvisioningDiscoveryService

public AbstractProvisioningDiscoveryService()
Method Detail

getMethodName

public abstract String getMethodName()
Get the name of the method name used to retrieve provisioning URL.

Specified by:
getMethodName in interface ProvisioningDiscoveryService
Returns:
method name

startDiscovery

public abstract void startDiscovery()
Launch a discovery for a provisioning URL. This method is asynchronous, the response will be notified to any ProvisioningListener registered.

Specified by:
startDiscovery in interface ProvisioningDiscoveryService

discoverURL

public abstract String discoverURL()
Launch a discovery for a provisioning URL. This method is synchronous and may block for some time.

Specified by:
discoverURL in interface ProvisioningDiscoveryService
Returns:
provisioning URL

addDiscoveryListener

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

Specified by:
addDiscoveryListener in interface ProvisioningDiscoveryService
Parameters:
listener - ProvisioningListener to add

removeDiscoveryListener

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

Specified by:
removeDiscoveryListener in interface ProvisioningDiscoveryService
Parameters:
listener - ProvisioningListener to add

fireDiscoveryEvent

public void fireDiscoveryEvent(DiscoveryEvent event)
Notify all listeners about a DiscoveryEvent.

Parameters:
event - DiscoveryEvent that contains provisioning URL

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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