Drag_n_Drop
Class BNode

java.lang.Object
  extended by Drag_n_Drop.BNode

public class BNode
extends java.lang.Object

A class corresponding to a node that provides the service that it is registered for. This does not relate to a physical node which may provide more than one service, rather, a BNode always corresponds to an entity that provides only the service for which information is requested.


Constructor Summary
BNode(java.lang.String fullName, java.lang.String hostName, int port, com.apple.dnssd.TXTRecord txtRecord)
           
 
Method Summary
protected  void _localTxtRec(com.apple.dnssd.TXTRecord txtRecord)
           
 java.lang.String get(java.lang.String key)
          Return the value corresponding to the key for the node
 java.lang.String getHostAddress()
          Return IP address of the node
 java.lang.String getHostName()
          Return the host name of the node.
 java.lang.String[] getKeys()
          Return all the keys associated with this node.
 int getPort()
          Return the port number for this service.
 java.lang.String getServiceName()
          Return service name of the node
 java.lang.String[] getValues()
          Return all the values associated with this node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BNode

public BNode(java.lang.String fullName,
             java.lang.String hostName,
             int port,
             com.apple.dnssd.TXTRecord txtRecord)
Parameters:
fullName - The full service name of the node
hostName - The host name of the node
port - The primary port that the node is offering service on
txtRecord - TXTRecords for the node
Method Detail

getKeys

public java.lang.String[] getKeys()
Return all the keys associated with this node.

Returns:
String array containing the keys

getValues

public java.lang.String[] getValues()
Return all the values associated with this node.

Returns:
String array containing all the values

getHostName

public java.lang.String getHostName()
Return the host name of the node.

Returns:
Host name of the node

getHostAddress

public java.lang.String getHostAddress()
Return IP address of the node

Returns:
IP address of the node

getServiceName

public java.lang.String getServiceName()
Return service name of the node

Returns:
Service name of the node

get

public java.lang.String get(java.lang.String key)
Return the value corresponding to the key for the node

Parameters:
key - The key name
Returns:
The value corresponding to the key

getPort

public int getPort()
Return the port number for this service.

Returns:
port Port on which service is announced as running.

_localTxtRec

protected void _localTxtRec(com.apple.dnssd.TXTRecord txtRecord)