fr.lip6.sma.simulacion.server.http
Class HTTPMDNSBrowser

java.lang.Object
  extended by fr.lip6.sma.simulacion.server.http.HTTPMDNSBrowser
All Implemented Interfaces:
com.kallisys.zeroconf.MulticastDNSClient

public class HTTPMDNSBrowser
extends Object
implements com.kallisys.zeroconf.MulticastDNSClient

Class to handle the list of MDNS advertised servers.

Version:
$Revision: 3 $
Author:
Paul Guyot
See Also:
"aucun test défini."

Field Summary
private  int mBrowseRequestID
          ID of the browse request.
private  EventListenerList mEventListenerList
          List of listeners.
private  Map mHTTPServers
          Set of available servers.
private  com.kallisys.zeroconf.MulticastDNSServer mMDNSServer
          MDNSServer.
private  String mServiceNamePrefix
          Prefix of the name of the services we're searching.
 
Fields inherited from interface com.kallisys.zeroconf.MulticastDNSClient
BROWSERFLAG_MORECOMING, BROWSERFLAG_REMOVE
 
Constructor Summary
HTTPMDNSBrowser(Configuration inConfig)
          Constructor from the configuration.
 
Method Summary
 void addChangeListener(ChangeListener inListener)
          Adds a ChangeListener to this browser's listeners.
protected  void fireStateChanged()
          Fire a state change.
 List getHTTPServers()
          Accessor on the list of servers.
 void multicastDNSBrowserCallBack(int inRequestID, int inBrowserFlags, com.kallisys.zeroconf.NetService inService, IOException inException)
          
 void multicastDNSRegistrationCallBack(int inRequestID, com.kallisys.zeroconf.NetService inService, IOException inException)
           Ignored.
 void multicastDNSResolutionCallBack(int inRequestID, com.kallisys.zeroconf.NetService inService, IOException inException)
          
 void removeChangeListener(ChangeListener inListener)
          Removes a ChangeListener from this browser's listeners.
 void shutdown()
          Shutdown the browser.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mEventListenerList

private final EventListenerList mEventListenerList
List of listeners.


mMDNSServer

private final com.kallisys.zeroconf.MulticastDNSServer mMDNSServer
MDNSServer.


mServiceNamePrefix

private final String mServiceNamePrefix
Prefix of the name of the services we're searching.


mBrowseRequestID

private final int mBrowseRequestID
ID of the browse request.


mHTTPServers

private final Map mHTTPServers
Set of available servers. Keys are the names of the services, values are NetServices.

Constructor Detail

HTTPMDNSBrowser

public HTTPMDNSBrowser(Configuration inConfig)
                throws com.kallisys.zeroconf.MDNSException
Constructor from the configuration.

Parameters:
inConfig - configuration for this client.
Throws:
com.kallisys.zeroconf.MDNSException - if a problem occurs.
Method Detail

shutdown

public void shutdown()
Shutdown the browser.


addChangeListener

public final void addChangeListener(ChangeListener inListener)
Adds a ChangeListener to this browser's listeners.

Parameters:
inListener - the listener to add.

removeChangeListener

public final void removeChangeListener(ChangeListener inListener)
Removes a ChangeListener from this browser's listeners.

Parameters:
inListener - the listener to remove.

getHTTPServers

public final List getHTTPServers()
Accessor on the list of servers.

Returns:
the list of servers.

multicastDNSRegistrationCallBack

public final void multicastDNSRegistrationCallBack(int inRequestID,
                                                   com.kallisys.zeroconf.NetService inService,
                                                   IOException inException)
Ignored.

Specified by:
multicastDNSRegistrationCallBack in interface com.kallisys.zeroconf.MulticastDNSClient

multicastDNSResolutionCallBack

public final void multicastDNSResolutionCallBack(int inRequestID,
                                                 com.kallisys.zeroconf.NetService inService,
                                                 IOException inException)

Specified by:
multicastDNSResolutionCallBack in interface com.kallisys.zeroconf.MulticastDNSClient

multicastDNSBrowserCallBack

public final void multicastDNSBrowserCallBack(int inRequestID,
                                              int inBrowserFlags,
                                              com.kallisys.zeroconf.NetService inService,
                                              IOException inException)

Specified by:
multicastDNSBrowserCallBack in interface com.kallisys.zeroconf.MulticastDNSClient

fireStateChanged

protected void fireStateChanged()
Fire a state change.