Class BonjourBrowserImpl

java.lang.Object
  extended byBonjourBrowserImpl
All Implemented Interfaces:
BonjourBrowserInterface

public class BonjourBrowserImpl
extends java.lang.Object
implements BonjourBrowserInterface

Class to implement the BonjourBrowserInterface


Field Summary
protected  BonjourBrowser _browser
          BonjourBrowser instance for the browser
protected  com.apple.dnssd.DNSSDService _browser_for_single_services
          DNSSDService instance for single services
 boolean _ignore_tree_expansion
          Ignores tree expansion, if true.
protected  java.util.HashMap _map
          Hash map for the tree of the browser
protected  BonjourBrowserSingleServiceListener _single_service_listener
          BonjourBrowserSingleServiceListener instance for single services of the browser
 
Constructor Summary
BonjourBrowserImpl(BonjourBrowser browser)
          Constructs a new BonjourBrowserImpl.
 
Method Summary
 boolean addGeneralNode(BonjourBrowserElement element)
          Adds a general service type node to the JTree.
 boolean addNode(BonjourBrowserElement element)
          Adds a node about BonjourBrowserElement to the JTree.
 boolean removeNode(BonjourBrowserElement element)
          Removes a node about BonjourBrowserElement from the JTree.
 boolean resolveNode(BonjourBrowserElement element)
          Updates a node with the resolved info in the JTree.
 boolean subscribe(java.lang.String domain, java.lang.String regType)
          Subscribes a service provider with the domain to the service type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_ignore_tree_expansion

public boolean _ignore_tree_expansion
Ignores tree expansion, if true.


_map

protected java.util.HashMap _map
Hash map for the tree of the browser


_browser

protected BonjourBrowser _browser
BonjourBrowser instance for the browser


_single_service_listener

protected BonjourBrowserSingleServiceListener _single_service_listener
BonjourBrowserSingleServiceListener instance for single services of the browser


_browser_for_single_services

protected com.apple.dnssd.DNSSDService _browser_for_single_services
DNSSDService instance for single services

Constructor Detail

BonjourBrowserImpl

public BonjourBrowserImpl(BonjourBrowser browser)
Constructs a new BonjourBrowserImpl.
Implements the interface of the browser.

Parameters:
browser - BonjourBrowser instance of the browser
Method Detail

addGeneralNode

public boolean addGeneralNode(BonjourBrowserElement element)
Adds a general service type node to the JTree.

Specified by:
addGeneralNode in interface BonjourBrowserInterface
Parameters:
element - BonjourBrowserElement instance
Returns:
true

subscribe

public boolean subscribe(java.lang.String domain,
                         java.lang.String regType)
Subscribes a service provider with the domain to the service type.

Specified by:
subscribe in interface BonjourBrowserInterface
Parameters:
domain - service provider domain
regType - service type
Returns:
true

addNode

public boolean addNode(BonjourBrowserElement element)
Adds a node about BonjourBrowserElement to the JTree.

Specified by:
addNode in interface BonjourBrowserInterface
Parameters:
element - BonjourBrowserElement instance
Returns:
true

removeNode

public boolean removeNode(BonjourBrowserElement element)
Removes a node about BonjourBrowserElement from the JTree.

Specified by:
removeNode in interface BonjourBrowserInterface
Parameters:
element - BonjourBrowserElement instance
Returns:
true

resolveNode

public boolean resolveNode(BonjourBrowserElement element)
Updates a node with the resolved info in the JTree.

Specified by:
resolveNode in interface BonjourBrowserInterface
Parameters:
element - BonjourBrowserElement instance
Returns:
true